Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Azure maximum concurrent sessions

I would like to use SQL Azure as the database for an ASP.NET MVC application. I looked up the Azure SQL Database resource limits which are listed on this page: https://azure.microsoft.com/en-us/documentation/articles/sql-database-resource-limits/

I have a couple of questions:

  1. One of the metrics listed is "maximum concurrent sessions". If I understand correctly, this refers to the maximum number of users that can be logged in at one time. So, if I have an ASP MVC website which uses Forms authentication, the users are stored in the AspNetUsers table on SQL Azure), and 2,000 logged in users are actively using the website at the same time, does this mean I have 2,000 concurrent sessions?

  2. It is possible a user might never log out, and just close the browser. If the authentication cookie stored in their browser doesn't expire, the next time they visit the website they won't need to log in again. Does this mean that the individual is occupying a session the entire time, even when he was not using the website, simply because he didn't log out?

  3. At present the database that can hold the largest number of concurrent session is the Premium P11 database. It can hold 32,000 max concurrent sessions. This seem like a really small number. There are many websites and apps that have hundreds of thousands of users logged in at the same time. What if our website needed to have 50,000 users logged in and actively using the website at the same time? Does this mean we cannot use SQL Azure? (This does not sound correct to me, which leads me to believe my entire understanding of concurrent sessions is incorrect)

like image 553
Gary Avatar asked May 18 '16 21:05

Gary


1 Answers

SQL Server (and SQL Database) sessions have nothing to do with your application's user sessions, and nothing to do with whether your end-users log out.

SQL sessions are related to a connection construct, so basically your app tier has a set of connections to SQL Database (maybe one, maybe a few - depending on the way you built the app, how many instances are running, etc.). There are sessions associated with those connections.

So... your comment about 32,000 sessions being a low number: It's not 32,000 users. It's 32,000 connections being created between your app server and the database.

like image 89
David Makogon Avatar answered Nov 17 '22 14:11

David Makogon