How to load balance traffic across Azure DB for PostgreSQL Flex Read Replicas

IonutMandra 0 Reputation points
2024-03-21T16:11:56.86+00:00

If we have an Azure DB for PostgreSQL Flex, with a number of read replicas and a number of clients (assume a number of VMs), how can the clients load balance the traffic across the different read replicas?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 17,950 Reputation points
    2024-03-21T17:05:05.06+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    Read-Only Endpoint: This endpoint can be configured by users to point either to a read replica or the primary server. However, it can only target one server at a time. Load balancing between multiple servers isn't supported. You can adjust the target server for this endpoint anytime, whether before or after promotion.

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-read-replicas#virtual-endpoints-preview

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **