title: What is the difference between Concurrent Login and Concurrent Session?
body: <h1>Background information</h1>
  <p>Working on a Spring application with Hikari Connection Pooling that is connecting to Business Critical Azure SQL Server Instance.</p>
  <p>The <a href="https://docs.microsoft.com/en-us/azure/azure-sql/database/resource-limits-vcore-single-databases#business-critical---provisioned-compute---gen5" rel="nofollow noreferrer">limitations on Azure's side of the DB instance are</a>:</p>
  <ol>
  <li>200 Workers</li>
  <li>200 Logins</li>
  <li>30k Sessions</li>
  </ol>
  <p>We have 3 application servers deployed with a Hikari CP.</p>
  <p>As far as I know:</p>
  <ol>
  <li>The application's Hikari connection pool is opening new TCP connections as they are needed and pooling them for spring data / hibernate / etc.</li>
  <li>An SQLConnection from the application's POV is using the Connectionstring to build a TCP connection to the server through which the protocol data (incl. authentication) and sql queries will be transmitted</li>
  <li>According to the limitations listed above the number of TCP connections is not limited</li>
  <li>In my understanding <strong>workers</strong> are processes/threads that actually execute SQL queries against the database and retrieve results.</li>
  <li>One query/statement might use multiple workers, if it can be parallelized</li>
  <li>(although haven't find the documentation) It is easy to see that the Logins are capped by the workers because whoever logs in, and wants to interact with the DB will need a worker that is executing the statements that is provided with the security context of the logged in user</li>
  <li><a href="https://www.bluematador.com/docs/troubleshooting/azure-sql-sessions-and-workers" rel="nofollow noreferrer">According to this</a>: <em>&quot;Sessions refers to the number of concurrent connections allowed to a SQL database at a time. Workers can be thought of as the processes in the SQL database that are processing queries. The maximum number of sessions and workers allowed depends on your databases’s service tier.&quot;</em></li>
  </ol>
  <h1>Questions</h1>
  <ol>
  <li>Can the spring applications make a total of ~30k connections or ~200 connections (assuming no other application connects to the database) <strong>with the same username and password</strong>?</li>
  <li>How shall Azure SQL Login / Azure SQL Session be interpreted in this context?</li>
  </ol>
  <p><em>Note</em>: I am aware that I can test this by launching N applications to connect and monitor the behavior, what I am frustrated about is how I cannot find the relevant documentation that could help me answer the question for myself.</p>