[pgpool-general: 2030] Re: Suggestion about two datacenters connected through WAN

Tatsuo Ishii ishii at postgresql.org
Wed Aug 14 23:23:55 JST 2013


> Hi.
> 
> I was considering using pgpool in our environment, but I don't know if it is
> the best idea. I would appreciate some suggestions, pros, cons of the
> solution using pgpool. Or is there another way how to do it?
> 
>  
> 
> We have 2 technical centers TC1 and TC2. In each runs postgres server.
> Technical centers are connected with WAN link. 
> 
> Clients are connecting through postgres JDBC driver to the TC1. If TC1 goes
> down JDBC driver will connect to TC2 automatically. Each technical center
> has the IP address from other subnet.
> 
> We need to have replicated data from postgres in TC1 to postgres in TC2.
> 
> Moreover:
> 
> -          TC1 can act as read-write server
> 
> -          TC2 can act as read server
> 
> -          after TC1 goes down TC2 should became read-write -> this
> FAIL-OVER should be automatic
> 
> -          FAIL-BACK procedure doesn't have to be automatic. we can do it
> manually
> 
>  
> 
> I know the fine way with manual fail-over can be postgres streaming
> replication from TC1 to TC2. However I expect the pgpool can add more
> control over automatic fail-over and better control for manual fail-back.
> 
>  
> 
> My questions.
> 
> Is the aforementioned scenario possible to build using pgpool?

Yes. You set up pgpool server on TC1 and TC2.


> Can pgpool fail-over to the IP address from different subnet? I mean not
> providing virtual IP address but making TC2 as R/W.

Yes.

- If pgpool/TC2 detects TC1 goes down, it will automatically promote
  PostgreSQL/TC2 by properly setting "failover script" on TC2.

- After TC1 goes up again, you can use "online recovery" feature of
  pgpool to sync PostgreSQL/TC1 with PostgreSQL/TC2. After resync,
  PostgreSQL/TC1 will become the standby server(read only).

> If it is possible I will have more questions while building it :)

Sure:-)
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-general mailing list