What would be a good way to limit your ASP.NET web application to serving only a certain number of concurrent users?
Some requirements:
- The application requires a login (no need to worry about anonymous users).
- Support for multiple servers (farm / load balancing).
- The active user can be considered the same as the active session (not signed or not expired).
- Additional logins should be deprived if the maximum number of concurrent users has been reached.
- Accountability is needed (administrators should be able to see which of the active users).
- Minimum overhead for each web request (especially avoiding costly trips to the database for each request).
- The total number of concurrent users must be supported correctly, even if the web server freezes, disconnects from the network, or must be restarted.
- Additional servers are available for host services (for example, application servers).
source
share