Re: Setup load balancing using HAProxy

Поиск
Список
Период
Сортировка
От Gabriel Guillem Barceló Soteras
Тема Re: Setup load balancing using HAProxy
Дата
Msg-id DU0PR08MB7921F430174316350266DE5AA67D2@DU0PR08MB7921.eurprd08.prod.outlook.com
обсуждение исходный текст
Ответ на Setup load balancing using HAProxy  (Mahendra Singh <msmahendrasingh18@gmail.com>)
Список pgsql-admin

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@parlamentib.es

Àrea Tecnològica i de Gestió Patrimonial

🏛️ Parlament de les Illes Balears

 

 

From: Mahendra Singh <msmahendrasingh18@gmail.com>
Date: Sunday, 28 January 2024 at 06:23
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>, pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: pg_repack vs. running logical/physical replication
Следующее
От: Andrey Glazunov
Дата:
Сообщение: Pam NIS authentication