public inbox for [email protected]
help / color / mirror / Atom feedFrom: Achilleas Mantzios <[email protected]>
To: vijay patil <[email protected]>
To: [email protected]
Subject: Re: Request for Feedback on PostgreSQL HA + Load Balancing Architecture
Date: Wed, 23 Jul 2025 12:13:26 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAD5k+7wgFmO7V_ncFCHBOzO0d9H51O5aKDD+hcnrCbUgZomqiQ@mail.gmail.com>
References: <CAD5k+7wgFmO7V_ncFCHBOzO0d9H51O5aKDD+hcnrCbUgZomqiQ@mail.gmail.com>
On 6/18/25 18:12, vijay patil wrote:
> Hi Team,
>
> I am planning to implement a PostgreSQL High Availability (HA) and
> Load Balancing setup and would greatly appreciate your feedback on the
> architecture we've designed (see attached diagram).
>
> image.png
>
> *Overview of the Setup:*
>
> *
>
> Two PostgreSQL nodes (VM1 and VM2) configured with:
>
> o
>
> Asynchronous replication from the Primary DB (on VM1) to the
> Standby DB (on VM2) using |repmgr|
>
> o
>
> HAProxy for failover management:
>
> +
>
> HAProxy 1 (active) on VM1
>
> +
>
> HAProxy 2 (passive) on VM2 with Keepalive for heartbeat
> and failover detection
>
> o
>
> PgBouncer on both nodes for connection pooling
>
> *
>
> A Virtual IP (VIP) managed by HAProxy for routing traffic from the
> application
>
> *
>
> Read/Write operations go to the Primary DB, and Read-Only queries
> can be served from either node
>
> *Objectives:*
>
> *
>
> Ensure high availability with automatic failover
>
> *
>
> Enable basic load balancing for read-only queries
>
> *
>
> Maintain connection pooling and routing efficiency
>
> *Request for Feedback:*
>
> *
>
> Is this architecture considered a best practice within the
> PostgreSQL community?
>
> *
>
> Are there any potential bottlenecks or failure points I should be
> aware of?
>
> *
>
> Would you recommend any improvements or alternative tools for
> achieving better reliability and performance?
>
Personally I will test long run via app -> pgbouncer -> pgpool-ii in
order to combine :
* Query Routing (read/write automatic split)
* Load Balancing
* High Availability
* Query caching
Have you consider pgpool-ii ? I know most support / service companies
push for patroni, and manually separating read / write traffic from
within the app, but I still find pgpool's query routing very nice.
> *
>
>
> Thanks
>
> Vijay
>
Attachments:
[image/png] image.png (83.3K, 3-image.png)
download | view image
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Request for Feedback on PostgreSQL HA + Load Balancing Architecture
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox