public inbox for [email protected]  
help / color / mirror / Atom feed
Load balancing of write queries among health-checked nodes
3+ messages / 2 participants
[nested] [flat]

* Load balancing of write queries among health-checked nodes
@ 2024-10-08 03:03 [email protected]
  2024-10-08 03:30 ` Re: Load balancing of write queries among health-checked nodes Ron Johnson <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: [email protected] @ 2024-10-08 03:03 UTC (permalink / raw)
  To: [email protected]

Hello. I have a PostgreSQL high availability cluster with Pgpool-II, but I don't use the virtual IP feature so my clients don't know which node to send queries to. DNS round-robin is not a solution because it can't distinguish between healthy and dead nodes.

I thought about having a Pgpool-II instance on each client (client Pgpool-II -> cluster Pgpool-II -> PostgreSQL), but AFAIK it can't distribute write queries. I also know that libpq may have multiple nodes to connect, but I need an advanced health check because a node may have connectivity but be separated from the whole cluster so it must be considered dead.

Is there any solution?






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

* Re: Load balancing of write queries among health-checked nodes
  2024-10-08 03:03 Load balancing of write queries among health-checked nodes [email protected]
@ 2024-10-08 03:30 ` Ron Johnson <[email protected]>
  2024-10-08 03:41   ` Re: Load balancing of write queries among health-checked nodes [email protected]
  0 siblings, 1 reply; 3+ messages in thread

From: Ron Johnson @ 2024-10-08 03:30 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

On Mon, Oct 7, 2024 at 11:04 PM <[email protected]> wrote:

> Hello. I have a PostgreSQL high availability cluster with Pgpool-II, but I
> don't use the virtual IP feature so my clients don't know which node to
> send queries to. DNS round-robin is not a solution because it can't
> distinguish between healthy and dead nodes.
>
> I thought about having a Pgpool-II instance on each client (client
> Pgpool-II -> cluster Pgpool-II -> PostgreSQL), but AFAIK it can't
> distribute write queries. I also know that libpq may have multiple nodes to
> connect, but I need an advanced health check because a node may have
> connectivity but be separated from the whole cluster so it must be
> considered dead.
>

Isn't that multi-master clustering?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> crustacean!


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

* Re: Load balancing of write queries among health-checked nodes
  2024-10-08 03:03 Load balancing of write queries among health-checked nodes [email protected]
  2024-10-08 03:30 ` Re: Load balancing of write queries among health-checked nodes Ron Johnson <[email protected]>
@ 2024-10-08 03:41   ` [email protected]
  0 siblings, 0 replies; 3+ messages in thread

From: [email protected] @ 2024-10-08 03:41 UTC (permalink / raw)
  To: [email protected]

Among PostgreSQL instances there is only one master. But yes, each server may be considered master by the clients because it's Pgpool-II will redirect write queries to the actual master. Maybe it's even better to avoid this unnecessary traffic between servers and decide which Pgpool-II is in front of the master on the client side, but this is optional.

Dnia 8 października 2024 07:30:05 GMT+04:00, Ron Johnson <[email protected]> napisał/a:
>On Mon, Oct 7, 2024 at 11:04 PM <[email protected]> wrote:
>
>> Hello. I have a PostgreSQL high availability cluster with Pgpool-II, but I
>> don't use the virtual IP feature so my clients don't know which node to
>> send queries to. DNS round-robin is not a solution because it can't
>> distinguish between healthy and dead nodes.
>>
>> I thought about having a Pgpool-II instance on each client (client
>> Pgpool-II -> cluster Pgpool-II -> PostgreSQL), but AFAIK it can't
>> distribute write queries. I also know that libpq may have multiple nodes to
>> connect, but I need an advanced health check because a node may have
>> connectivity but be separated from the whole cluster so it must be
>> considered dead.
>>
>
>Isn't that multi-master clustering?
>






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


end of thread, other threads:[~2024-10-08 03:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08 03:03 Load balancing of write queries among health-checked nodes [email protected]
2024-10-08 03:30 ` Ron Johnson <[email protected]>
2024-10-08 03:41   ` [email protected]

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox