Macto, a module features spec sheet for authentication
I am going to talk about a few ways of trying to organize a project, mostly as a way to lay out the high level requirements for a feature or a module.
I consider filling in one of those to be the act of actually sitting down and thinking about the concrete design of the system. It is not final design, and it is not set in stone, but in general it forces me to think about things in a structured way.
It is not a very hard to do, so let us try to do this for the authentication part of the application. Authentication itself is a fairly simple task. In real corporate environment, I’ll probably need integration with Active Directory, but I think that we can do with simple username & pass in the sample.
Module: Authentication
Tasks: Authenticate users using name/pass combination
Integration: Publish notifications for changes to users
Scaling constraints:
Up to 100,000 users, with several million authentication calls per day.
Physical layout:
Since the system need to handle small amount of users, we have to separate deployment options, Centralized Service* and Localized Component*. Both options are going to be developed, to show both options.
| Feature | Description | SLA |
| authenticate user | Based on name & password Lock a user if after 5 failed logins | less than 50 ms per authentication request 99.9% of the time, for 100 requests per second per server |
| create new user | User name, password, email | less than 250 ms per change password request 99.9% of the time, for 10 requests per second globally |
| change password | | less than 250 ms per change password request 99.9% of the time, for 10 requests per second globally |
| reset password | | less than 250 ms per change password request 99.9% of the time, for 10 requests per second globally |
| enable / disable user | disable / enable the option to login to the system | less than 250 ms per change password request 99.9% of the time, for 10 requests per second globally |
You should note that while I don’t expect to have that many users in the system, or have to handle that load, for the purpose of the sample, I think it would be interesting to see how to deal with such requirements.
The implications of this spec sheet is that the system can handle about 8.5 million authentication requests per day, and about a 3/4 of a million user modifications requests.
There are a few important things to observe about the spec sheet. It is extremely high level, it provide no actual implementation semantics but it does provide a few key data items. First, we know what the expected data size and load are. Second, we know what the SLAs for those are.
* Centralized Service & Localized Component are two topics that I’ll talk about in the future.