G
G
gremlintv22018-02-05 17:09:42
PostgreSQL
gremlintv2, 2018-02-05 17:09:42

What to use: pgpool II or pgbouncer + haproxy?

It is necessary to raise a postgres cluster with repmgr asynchronous replication and load balancing - please tell me which load balancing tools would be more appropriate to use at present: pgpool II or pgbouncer + haproxy?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Kuznetsov, 2018-02-05
@DarkRaven

Have you considered this?
The first one is asynchronous.
Well, Pgbouncer, if you have a lot of connections, so as not to drop it.
Here - https://www.slideshare.net/ZalandoTech/high-availa... and here https://pgday.ru/files/papers/55/Patroni%20Rejection... they even wrote something about this business.
stolon seems to be aimed specifically at data integrity and there is synchronous replication. I do not remember exactly.

M
Melkij, 2018-02-05
@melkij

pgpool is a pain in the ass to maintain. Better not.
Further, it should be taken into account that auto-failover is its own bouquet of problems and features. And often there are more problems with it than without it. repmgr comprehension test: "how exactly is a new master chosen?". Regular streaming replication is usually used and the master is switched manually. Because the main difficulty is in determining what needs to be switched, and not a short-term failure, for example, of the network.
pgbouncer + haproxy are quite widely used for balancing on equivalent replicas (and on several pgbouncers if you have grown to a gigabit of traffic). For equivalent ones - that is, it is not necessary to shove OLAP analytics queries onto OLTP replicas - this requires separate replicas specially configured for this.
The aforementioned Alexander Kuznetsovpatroni - in any case, I could not provoke him to split brain, so in general I like him. Yes, and in a couple of places in production already seen. It knows how to both synchronous and asynchronous replicas, it is friends with haproxy quite regularly for polling where the master is now used by the authors anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question