From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Load balancing in postgres master slave HA cluster
Date: Tue, 19 Feb 2019 11:41:57 +0200
Message-ID: <f7855b92-9453-1349-c75d-aaea2952810b@matrix.gatewaynet.com> (raw)
In-Reply-To: <PN1PR0101MB210960505AC86C0E5C6A2607E07C0@PN1PR0101MB2109.INDPRD01.PROD.OUTLOOK.COM>
References: <PN1PR0101MB210960505AC86C0E5C6A2607E07C0@PN1PR0101MB2109.INDPRD01.PROD.OUTLOOK.COM>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: achill@matrix.gatewaynet.com, pgsql-admin@lists.postgresql.org
Subject: Re: Load balancing in postgres master slave HA cluster
In-Reply-To: <f7855b92-9453-1349-c75d-aaea2952810b@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox