Hi Kamal Sekhar C •.
Welcome to Microsoft Q&A forum and thanks for using Azure Services.
As I understand, you want to know How to select the right instance based on the user capacity for PostgreSQL DB.
Every PostgreSQL connection (even idle ones) uses at least 10 MB of memory, so it's important to limit simultaneous connections. Here are the limits we chose to keep nodes healthy:
- Maximum connections per node
- 300 for 0-3 vCores
- 500 for 4-15 vCores
- 1000 for 16+ vCores
- Maximum connections per node with burstable compute
- 20 for 1 vCore burstable
- 40 for 2 vCores burstable
The connection limits above are for user connections (max_connections
minus superuser_reserved_connections
). We reserve extra connections for administration and recovery.
The limits apply to both worker nodes and the coordinator node. Attempts to connect beyond these limits fails with an error.
Connection pooling
You can scale connections further using connection pooling. Azure Cosmos DB for PostgreSQL offers a managed pgBouncer connection pooler configured for up to 2,000 simultaneous client connections.
Please go through the Maximum Connections table mentioned here: https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-limits
Refer How to Find the Optimal Database Connection Pool Size
and https://learn.microsoft.com/en-us/azure/postgresql/hyperscale/moved?tabs=direct if suits to your requirement.
Thank you.