Re: Load balancing in postgres master slave HA cluster

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Load balancing in postgres master slave HA cluster
Date: 2019-02-19 09:41:57
Message-ID: f7855b92-9453-1349-c75d-aaea2952810b@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin

On 19/2/19 11:13 π.μ., soumitra bhandary wrote:
> Hi ,
>
> Any one has experience on working with HA proxy set up with Postgres Master Slave replication  .
HAProxy does not know the specifics of pgsql protocol neither does it parse queries. So your infrastructure has to know in advance which activity should be redirected to the readonly port and which to
the readwrite port. So in essence you will have to have at least two datasources defined .

You may find this helpful : https://severalnines.com/blog/postgresql-load-balancing-using-haproxy-keepalived

>
> Query :  I would like to divert the Write requests to Master and all read requests to Slave server .
>
> To achieve that can I use HA proxy server ? If any one has already implemented the same . Please share me the steps .
>
> Or ,
>
> Any other method can be used to achieve the same using freeware .
>
> Thanks
> Soumitra

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message 길P.day93 2019-02-20 07:27:30 Make.bat environment
Previous Message Shreeyansh Dba 2019-02-19 09:40:56 Re: Load balancing in postgres master slave HA cluster

Browse pgsql-admin by date

  From Date Subject
Next Message Rohan Kadekodi 2019-02-20 17:41:39 Regarding postgreSQL performance on DRAM
Previous Message Shreeyansh Dba 2019-02-19 09:40:56 Re: Load balancing in postgres master slave HA cluster