pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Load balancing in postgres master slave HA cluster
4+ messages / 4 participants
[nested] [flat]

* Load balancing in postgres master slave HA cluster
@ 2019-02-19 09:13 soumitra bhandary <soumitra.bhandary@hotmail.com>
  2019-02-19 09:20 ` Re: Load balancing in postgres master slave HA cluster Prince Pathria <prince.pathria@goevive.com>
  2019-02-19 09:40 ` Re: Load balancing in postgres master slave HA cluster Shreeyansh Dba <shreeyansh2014@gmail.com>
  2019-02-19 09:41 ` Re: Load balancing in postgres master slave HA cluster Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 3 replies; 4+ messages in thread

From: soumitra bhandary @ 2019-02-19 09:13 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; pgadmin-support@lists.postgresql.org <pgadmin-support@lists.postgresql.org>

Hi ,

Any one has experience on working with HA proxy set up with Postgres Master Slave replication  .

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Load balancing in postgres master slave HA cluster
  2019-02-19 09:13 Load balancing in postgres master slave HA cluster soumitra bhandary <soumitra.bhandary@hotmail.com>
@ 2019-02-19 09:20 ` Prince Pathria <prince.pathria@goevive.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Prince Pathria @ 2019-02-19 09:20 UTC (permalink / raw)
  To: soumitra bhandary <soumitra.bhandary@hotmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; pgadmin-support@lists.postgresql.org <pgadmin-support@lists.postgresql.org>

Use pgpool to achieve query balancing. It can send inserts/updates etc to
master and selects to all nodes.
Flow: app_server(app+pgpool) -> db_servers(pg_master +pg_slave1+pg_slave2)

Happy to help :)
Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com


On Tue, Feb 19, 2019 at 2:44 PM soumitra bhandary <
soumitra.bhandary@hotmail.com> wrote:

> Hi ,
>
> Any one has experience on working with HA proxy set up with Postgres
> Master Slave replication  .
>
> 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
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Load balancing in postgres master slave HA cluster
  2019-02-19 09:13 Load balancing in postgres master slave HA cluster soumitra bhandary <soumitra.bhandary@hotmail.com>
@ 2019-02-19 09:40 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Shreeyansh Dba @ 2019-02-19 09:40 UTC (permalink / raw)
  To: soumitra bhandary <soumitra.bhandary@hotmail.com>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; pgadmin-support@lists.postgresql.org <pgadmin-support@lists.postgresql.org>

Hi Sumitra,

You can achieve this by using the pgpool which support load balancing/load
connections and allow huge insert/updates. Either you can divert your read
queries to slave for read and write to master for read/write operations

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com


On Tue, Feb 19, 2019 at 2:44 PM soumitra bhandary <
soumitra.bhandary@hotmail.com> wrote:

> Hi ,
>
> Any one has experience on working with HA proxy set up with Postgres
> Master Slave replication  .
>
> 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
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Load balancing in postgres master slave HA cluster
  2019-02-19 09:13 Load balancing in postgres master slave HA cluster soumitra bhandary <soumitra.bhandary@hotmail.com>
@ 2019-02-19 09:41 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Achilleas Mantzios @ 2019-02-19 09:41 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-02-19 09:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 09:13 Load balancing in postgres master slave HA cluster soumitra bhandary <soumitra.bhandary@hotmail.com>
2019-02-19 09:20 ` Prince Pathria <prince.pathria@goevive.com>
2019-02-19 09:40 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2019-02-19 09:41 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>

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