Re: Automatic Client Failover

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Markus Wanner <markus(at)bluegap(dot)ch>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, josh(at)agliodbs(dot)com, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Automatic Client Failover
Date: 2008-08-05 12:47:18
Message-ID: 200808051447.22479.dfontaine@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le mardi 05 août 2008, Markus Wanner a écrit :
> I've thought about that as well, but think about it this way: to protect
> against N failing nodes, you need to forward *every* request through N
> living nodes, before actually hitting the node which processes the
> query. To me, that sounds like an awful lot of traffic within the
> cluster, which can easily be avoided with automatic client failover.
>
> (Why are you stating, that only slaves need to redirect? What is
> happening in case of a master failure?)

I'm thinking in term of single master multiple slaves scenario...
In single master case, each slave only needs to know who the current master is
and if itself can process read-only queries (locally) or not.

You seem to be thinking in term of multi-master, where the choosing of a
master node is a different concern, as a failing master does not imply slave
promotion.

> > So the proposal for Automatic Client Failover becomes much more simpler.
>
> I'm arguing it's the other way around: taking down a node of the cluster
> becomes much simpler with ACF, because clients automatically reconnect
> to another node themselves. The servers don't need to care.

Well, in the single master case I'm not sure to agree, but in the case of
multi master configuration, it well seems that choosing some alive master is
a client task.

Now what about multi-master multi-slave case? Does such a configuration have
sense?
It this ever becomes possible (2 active/active masters servers, with some
slaves for long running queries, e.g.), then you may want the ACF-enabled
connection routine to choose to connect to any master or slave in the pool,
and have the slave be itself an AFC client to target some alive master.

Does this still makes sense?
--
dim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martin Pihlak 2008-08-05 12:55:00 Re: plan invalidation vs stored procedures
Previous Message Heikki Linnakangas 2008-08-05 12:46:30 Re: searching bison guru - grouping sets implementation