Wicket Posted November 23, 2017 Share Posted November 23, 2017 Hi All, How do people generally restrict the number of concurrent users? I am currently writing an application (SaaS) and ideally want to limit the number of concurrent users per customer install. (So each customer has the same build of the software, but a different database backend) Is it enough to set the ServerLimits > MaxConnections > AValue ? If it is, how can I achieve this? My deployment method is IIS. I don't want to have to issue a totally separate dll (with a different MaxConnections value) per customer, if I can help it. I would rather it be dynamic, so that the value can be changed easily, without a build/redeployment. Also I would need to check this at the point of logging into the application, and provide a meaningful message to the user - if the login is unsuccessful, due to max users reached. Any suggestions welcome, Regards, Dan. Quote Link to comment Share on other sites More sharing options...
Wicket Posted November 23, 2017 Author Share Posted November 23, 2017 Some thoughts include having a 'license' database table which stores the number of users (hashed if required) But I am still not sure how I can apply this value, is it enough to set the ServerLimits > MaxConnections > AValue on the server module, or do I need to change something in IIS? Quote Link to comment Share on other sites More sharing options...
mierlp Posted November 23, 2017 Share Posted November 23, 2017 Hi I restrict it by the limit of users in the user table There's a separate table for the configuration which contains : - company information - field for maxAllowedUsers - field for maxAllowedUsertSessions (how many session a user may start) The can't add more users in the user table as the maxAllowedUser value. I do all the checks at the user login and decide what to do: - when the maxAllowdUsers is reached - when the maxAllowdUserSessions is reached Now it's only a matter of controlling the parameters. For me it's working Regards Peter Quote Link to comment Share on other sites More sharing options...
Wicket Posted November 23, 2017 Author Share Posted November 23, 2017 Thanks for the help Peter. I am thinking along the same route - So I will go forward and try to implement something similar. Regards, Dan. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted November 23, 2017 Share Posted November 23, 2017 An other way, maybe more security : Use your RDBM. For exemple FireBird can return the DB number of connexions. http://www.firebirdfaq.org/faq10/ Best regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.