[Pgpool-general] 3 Servers needed?

Jacinta Carvalho jacinta.carvalho at gmail.com
Wed Feb 22 17:18:38 GMT 2006


Hello

> I am about to set up a postgresql replication system and would like to
> try out pgpool.
>
> But I couldn't find anywhere one important information:
> Do I need a seperate machine to run pgpool? Or is it possible to run it
> on both - the primary and secondary pgsql machine?
>
> I mean in case of a total failure of one machine the switchover has to
> be managed somehow. So if the primary pgsql server goes down (with its
> pgpool) is it possible that a (second running) pgpool instance on the
> secondary server takes over?

You want some kind of high availability. Some solutions :
- pgpool on both servers but you need heartbeat. It would be the best
solution using only two servers. I haven't tested yet.
- pgpool on both servers for replication, and a high availability
system (LVS) that forwards requests to the running server.

What you want can't be made with 3 servers. If pgpool runs on a server
and sends requests to two other servers, the pgpool server is a
weakness : total failure of this server means no possible connection
to the database.

Let's take 4 servers. LVS runs on two of them, pgpool and postgreSQL
run on the two other ones (pgpool AND postgres run on each server).
The requests are made to a virtual address thanks to LVS. On the LVS
system, you define a primary and a secondary pgpool server. If the
primary server is up, pgpool will get the requests and send them to
both database servers. If the primary server is down, as pgpool is
also running on the secondary server, it will get and forward the
requests to both databases servers. This solution works.

Running LVS, pgpool and Postgres on the same two servers would be an
implementation of the first solution using only two servers.

It's a bit hard to explain, but I hope it will help...

Best regards.
--
Jacinta Carvalho
jacinta.carvalho at gmail.com


More information about the Pgpool-general mailing list