Re: High Availability, guarantee to use sync nodes

From: Maksim Milyutin <milyutinma(at)gmail(dot)com>
To: Dirk Krautschick <Dirk(dot)Krautschick(at)trivadis(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: High Availability, guarantee to use sync nodes
Date: 2020-09-01 17:10:41
Message-ID: 211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 31.08.2020 14:06, Dirk Krautschick wrote:

> Hi all,
>

Hi

> if there are several PostgreSQL nodes replicating synchronous and I
> configure a guarantee that
>
> for example 3 of 5 nodes have to be in sync to go on with
> synchronous_standby_names and
>
> now I want to implement a load balancing scenario with active standby
> DBs…how or with what
>
> tool can I achieve that my read clients only use sync nodes. For sure
> somehow a check in the
>
> pg_stat_replication before is possible but is there something in
> parameters or with solutions
>
> like repmgr, patroni, etc. to do this?
>

For such tools as patroni or stolon the list of sync replicas could be
got from DCS storage (etcd, consul, etc). Your application or some
proxy, e.g. haproxy with confd, might extract the list of sync nodes,
subscribe on changes in KV entry that stores this list and routes
queries according it.

--
Regards,
Maksim Milyutin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2020-09-01 17:23:00 Re: Is it possible to set end-of-data marker for COPY statement.
Previous Message Pavel Stehule 2020-09-01 16:46:01 Re: How bad is using queries with thousands of values for operators IN or ANY?