Share via

Azure PostgreSQL Managed DB: Scaling Query

Harsh 20 Reputation points
2026-04-14T06:45:39.7466667+00:00

We are currently using an Azure PostgreSQL Flexible Server in the Australia East region as a shared managed database for our application. Going forward, we plan to have one PostgreSQL Flexible Server per country, with multiple application servers in the same region using separate databases within that server.

Recently, we received a high CPU alert (98%) on this Postgres server, which caused application timeouts. We upgraded it from Burstable to General Purpose (Standard_D2ds_v5), and the issue was resolved. Currently, around 4-5 application servers are connected to their respective databases on this server.

Our concern is around future scaling, as we expect to have 40+ application servers connecting to the same Postgres server. Since Azure PostgreSQL Flexible Server does not support automatic compute scaling, we would like guidance on how to handle this efficiently.

Azure Database for PostgreSQL

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 20,745 Reputation points MVP Volunteer Moderator
    2026-04-14T07:15:14.39+00:00

    Harsh hi and thx for join us at Q&A portal

    scaling here is not “more apps” its more connections + more CPU contention, Flexible Server does not auto scale compute so u must design for it, first problem is connections so use connection pooling (PgBouncer) otherwise 40+ app servers will kill u with connection overhead before CPU even spikes, second is workload separation, dont just stack everything in one server, better split by country like u said or even by heavy vs light workloads, third is read scaling, use read replicas and move read traffic off primary, fourth is vertical scaling but thats manual so u need monitoring + autoscale logic via automation (alerts scale up/down), also check queries bc 98 percent CPU often = bad queries not just load, add indexes, tune queries, check pg_stat_statements, finally consider caching (Redis) to reduce DB hits.

    Other words dont rely on one server, use pooling + replicas + sharding + tuning.

    rgds,

    Alex

    1 person found this answer helpful.
    0 comments No comments

  2. SAI JAGADEESH KUDIPUDI 2,625 Reputation points Microsoft External Staff Moderator
    2026-04-14T07:38:56.3666667+00:00

    Hi Harsh,
    Thank you for reaching out with your scaling concern.

    As you continue to scale and onboard more application servers (for example, 40+ instances) connecting to a single Azure Database for PostgreSQL – Flexible Server, it is expected that the database may experience higher CPU usage due to increased concurrent connections.

    Currently, Azure PostgreSQL Flexible Server does not support automatic compute scaling. Any increase in compute (vCores or tier) must be done manually, and the server may briefly restart during this process

    Microsoft documentation also highlights that a large number of simultaneous connections can put pressure on server resources and result in high CPU utilization.

    To better handle this type of workload at scale, Microsoft recommends:

    • Using connection pooling (PgBouncer) to reduce the overhead caused by multiple direct connections from application servers.
    • Configuring read replicas to offload read‑intensive workloads from the primary server.
    • Setting up Azure Monitor alerts to proactively detect high CPU usage and take action before application impact occurs.

    Implementing the above recommendations can help reduce CPU pressure on the primary server and improve performance in high‑concurrency environments.

    Microsoft Reference Links:
    Scale compute in Azure Database for PostgreSQL Flexible Server [Scaling Re...soft Learn | Learn.Microsoft.com]
    Limits in Azure Database for PostgreSQL Flexible Server
    Connection pooling best practices [video2.ski...cademy.com]
    Scaling resources in Azure Database for PostgreSQL Flexible Server [Configure...soft Learn | Learn.Microsoft.com]
    Configure alerts for PostgreSQL Flexible Server [Pricing -...soft Azure | Azure.Microsoft.com]

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.