Thread: HA setup with pg pool in docker

HA setup with pg pool in docker

From
Vasu Madhineni
Date:
Hi Team,

We are planning to build a HA setup with pgpool in docker, Could you please let us know prerequisites for it.

1. How many servers are needed for this?, can we plan with 2 servers like below config.
   Primary instance and pgpool in two different docker containers in server 1 and standby instance in docker container server 2.

2. User requirement: any user needs password less authentication between nodes.

3. Port or firewall rules between servers.

4. If planning to create a network bridge between all docker containers between 2 servers will be any prerequisites for that.

Thanks in advance.

Regards,
Vasu Madhineni


Re: HA setup with pg pool in docker

From
Bo Peng
Date:
Hello,

On Wed, 22 Jul 2020 13:29:31 +0800
Vasu Madhineni <vasumdba1515@gmail.com> wrote:

> We are planning to build a HA setup with pgpool in docker, Could you please
> let us know prerequisites for it.
> 
> 1. How many servers are needed for this?, can we plan with 2 servers like
> below config.
>    Primary instance and pgpool in two different docker containers in server
> 1 and standby instance in docker container server 2.

It depends on your requirements.
You can create 3 containers (pgpool, primary and standby)
on one server or on different servers.

> 2. User requirement: any user needs password less authentication between
> nodes.

It is possible by configuring pool_hba.conf (Pgpool-II) and pg_hba.conf (PostgreSQL).

> 3. Port or firewall rules between servers.

Pgpool port and PostgreSQL port need to be accessible.
 
> 4. If planning to create a network bridge between all docker containers
> between 2 servers will be any prerequisites for that.

You need to make sure all containers can connect to each other.
-- 
Bo Peng <pengbo@sraoss.co.jp>
SRA OSS, Inc. Japan