Re: Setup load balancing using HAProxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

Brifely: HAProxy (2, TCP mode) -> PG Bouncer (2 VM) -> PGSQL farm (>=2)

 

Haproxy does not ‘understand’ PostgreSQL at Proxy level, it can only perform healthchecks and work at TCP level, so it does not balance queries between RO & RW nodes. Pure Haproxy-Postgresql deployment seems a bit clunky: https://www.alibabacloud.com/blog/postgresql-haproxy-proxy-for-ha-and-load-balance_597618

 

Still a HAP + native PostgreSQL Proxy would be strongly advised, like: https://dba.stackexchange.com/a/134925

 

If you don’t have a site-wide Haproxy Deployment already, I would also deploy it with 2 instances Active/Backup (i.e. keepalived). Finally, you may have to decide a replication and failover mechanism between PostgreSQL nodes that suits your needs.

 

Regards,

 

 

-----

Gabriel Guillem Barceló Soteras

gbarcelo@xxxxxxxxxxxxxx

Àrea Tecnològica i de Gestió Patrimonial

🏛️ Parlament de les Illes Balears

 

 

From: Mahendra Singh <msmahendrasingh18@xxxxxxxxx>
Date: Sunday, 28 January 2024 at 06:23
To: pgsql-admin@xxxxxxxxxxxxxxxxxxxx <pgsql-admin@xxxxxxxxxxxxxxxxxxxx>, pgsql-admin@xxxxxxxxxxxxxx <pgsql-admin@xxxxxxxxxxxxxx>
Subject: Setup load balancing using HAProxy

Dear Experts,

 

Hope all is well with you.

 

Please share the document or link to configure load balancing in PostgreSQL 15 using HAProxy.

 

What is the best tool or approach to configure load balancing?

 

Regards

Mahendra Singh


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux