Background
I'm using Azure-Sql-Server. To host my database and I'm using Entity-Framework (C#) on top of it. I using Standart S3 tier. This pricing tier is limited to 200 concurrent connection to DB.
My system working in Micro-services architecture. Each of my services have open connections to the DB.
This is what my connection string looks like
metadata=res:///Model1.csdl|res:///Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=mydb.database.windows.net;Initial Catalog=production;Persist Security Info=True;User ID=user@my;Password=mypass;Pooling=true;Max Pool Size=2;Enlist=false;"
My Scenario
I also read on the SQL Server documentation that the Pooling is enabled by default and the MaxPoolSize is 100 (default).
Now, Am i woundering if it's smart at all to be using connection pooling? because my application contain 50 machines in the cluster. Even if I gave X4 connection per machine, I'll be reaching the MaxAllowedConnection by AzureSql (in my pricing tier, S3).
Scaling the DB is not an option since I'm already paying a lot for this DB. Around 300 USD. I checked it and found that in order to get 400 allowed connection, I'll have to pay 1200 USD for the database. This is not an option.
My application is non db aggresive. Just make few calculation (CPU) and insert some rows.
Questions:
- I really need to use Connection Pooling? How to know if that is redundant (after change)?
- How can it be reasonable that the connection pooling is enabled by default with this high number of MaxConnection (100)? theoretically, it's wont be work even when you pay 300USD with 3 machines.