From: Maksim Milyutin <milyutinma@gmail.com>
To: Dirk Krautschick <Dirk.Krautschick@trivadis.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: High Availability, guarantee to use sync nodes
Date: Tue, 1 Sep 2020 20:10:41 +0300
Message-ID: <211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.com> (raw)
In-Reply-To: <AM0PR05MB60829E7C9F904DE537220587E9510@AM0PR05MB6082.eurprd05.prod.outlook.com>
References: <AM0PR05MB60829E7C9F904DE537220587E9510@AM0PR05MB6082.eurprd05.prod.outlook.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: milyutinma@gmail.com, Dirk.Krautschick@trivadis.com
Subject: Re: High Availability, guarantee to use sync nodes
In-Reply-To: <211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.com>
References: <AM0PR05MB60829E7C9F904DE537220587E9510@AM0PR05MB6082.eurprd05.prod.outlook.com> <211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.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