Re: Patroni vs pgpool II - Mailing list pgsql-general

From Alexander Kukushkin
Subject Re: Patroni vs pgpool II
Date
Msg-id CAFh8B=m5dhaozOzGrduqw3jQ5ML8-sVtM6+P9Lc-Bu6rmHsNAQ@mail.gmail.com
Whole thread Raw
In response to Re: Patroni vs pgpool II  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: Patroni vs pgpool II
List pgsql-general
Hi,


On Wed, 5 Apr 2023 at 01:01, Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
Hi,

I am not sure if Patroni provides load balancing feature.

It depends on understanding of load-balancing:
- If we talk about load balancing read-only traffic across multiple replicas - it is very easy to achieve with Patroni.
- If we talk about parsing all queries in order to figure out whether they are read-write or read-only, then no.

BUT, even if there is a solution that parses queries to make a decision it I would not recommend anyone to use it unless all consequences are understood.
Specifically, not every read-only query could be salefy sent to a replica, because they could be lagging behind the primary.
Only application (developers) could decide whether for a specific query they could afford slightly outdated results. Most of the popular application frameworks support configuring two connection strings for this purpose.

Regards,
--
Alexander Kukushkin

pgsql-general by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Patroni vs pgpool II
Next
From: Tatsuo Ishii
Date:
Subject: Re: Patroni vs pgpool II