Say I'm expecting about 100 requests a second, each request should take anywhere between 1 - 3 seconds (In a perfect world).
Would I create a pool of 300 connections? Or something slightly higher to compensate for potential spikes?
A connection pool maintains a specific number of open database connections to an application in the main memory. The default size of the database connection pool is eight, but you can change this number while deploying or updating an application in the SAP BTP cockpit.
A connection pool is created for each unique connection string. When a pool is created, multiple connection objects are created and added to the pool so that the minimum pool size requirement is satisfied. Connections are added to the pool as needed, up to the maximum pool size specified (100 is the default).
By default, SQL Server allows a maximum of 32767 concurrent connections which is the maximum number of users that can simultaneously log in to the SQL server instance.
That depends on the distribution of arriving events. Queuing theory can give you a formula (for a given distribution) how many connections you need so that the probability of failure (no free connection in your case) will be no more than certain percentage.
You may want to look at these notes (page 17) which give you some formulas, such as probability that you have n requests being served at the same time or you have a non-empty queue (the state that you want to avoid)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With