On Fri, Apr 22, 2016 at 2:13 AM, Peter Rabbitson <rabbit+d...@rabbit.us>
wrote:

> Greetings!
>
> I am sending this to the list, but I specifically want to hear from Bill
> Moseley, as I know they (used to) run an involved Pg replicated setup.
>

I'll take a closer look tomorrow, but our Pg replication setup has changed
quite a bit.

We were using Slony and had added code to check replicant (slave) lag and
when exceed a threshold would stick to the master. We did experience lags
often.

We would also stick to the master (for a given user) after an update for
about the current replicant lag.

Me moved to using Postgresql native replication support.   But, we removed
the replicant lag checks because we now do that via HAProxy -- and HAProxy
falls back to the master if needed.  We use PgBouncer for connection
pooling.

I know it doesn't sound like it, but it simplifies things a bit.   The apps
are just configured for a master and a single replicant using the existing
DBIC replication code and the slave should always be available (even if all
real replicants have failed because will ultimately fall back to the
master).

Also, this means DBAs can add or move replicants (or promote a replicant to
a master) w/o making any application changes.





>
> There is a proposal to "bless" the Pg 9.0 hot-standby replication into the
> core DBIC::Storage::DBI::Pg driver:
> https://github.com/dbsrgits/dbix-class/pull/103/files
>
> The patch itself is small and straightforward. But given this is a one-way
> change (we can't un-bless it once it ships) I want to ask the thoughts of
> any existing users.
>
> This "request for comments" will be open for about a week, so please do
> speak up sooner rather than later.
>
> Cheers
>



-- 
Bill Moseley
mose...@hank.org
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to