Design a centralized authentication system

Problem statement:
Design a centralized authentication system for millions of users. The objective is to only design authentication system and not authorization system. More than 1M daily active users and 100M calls to verify authentication token.
Solution Summary:
We use a simple JWT based authentication. An AuthenticationService handles most complex operations. We help scaling by using an in memory hot cache that keeps all the active JWTs. A CryptoService is used to sign and verify tokens by cache reduces calls to this service.




