Re: Thoughts on the mirroring system etc

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: <pgsql-www(at)postgresql(dot)org>
Subject: Re: Thoughts on the mirroring system etc
Date: 2005-01-22 19:44:32
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4766B7@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

>> The major problem with wwwmaster is that we need multimaster
>replication
>> to handle it properly, without having a single point of
>failure. Slony 1
>> will not resolve that basic issue.
>
>This is a bogus conclusion, and the later-proposed solution involving a
>UNION view is just silly.
>
>Supposing that you replicate the database to one or more other machines
>via Slony-I, you have a defense against complete loss of wwwmaster,
>namely you can just (manually) decree that one of the other copies is
>now the master. So that solves one of the problems posed. The other
>problem this poses is getting the web server machines to hit a working
>copy of the database when they need to serve up dynamic content. That
>problem has zero to do with your replication technology. I think a
>DNS-based solution similar to Magnus' proposal would work fine.

Right, as long as you accept that you cannot accept any writes pending
the manual changing of who is the master. It also permits no
load-balancing between the servers, since only one can accept writes.
Unless the "promote to master" step can be automated safely, we're
looking at quite noticeable downtime if this happens. (And it's not all
that simple to do, I beleive. Consider lost connectivity between the two
machines, and you may end up with two machines that beleive they are the
master, unless you have some fairly advanced checks)

I beleive using the bidirectional replication and UNIONs this can be
solved in a very simple way. It does permit two (well, more as well, but
the complexity increases fast) redundant servers with full
functionality. And setting up Slony-I in two directions can't be *that*
much more complicated than setting it up in one, no?

Finally, the dynamic web server *must* have a local database, IMHO. You
don't want to be crossing the atlantic, for example, between the
webserver and the database server - that will kill performance in a
heartbeat.

>Multimaster replication is only important if you need reliable 24x7
>updating of the database, which as far as I understand isn't needed for
>this one. So a single master (at a time) ought to work fine, and that
>can be handled just fine with Slony-I.

As the site is designed now, we need reliable 24x7 read and INSERT, but
not UPDATE. But db INSERTs are done on every download of a file, on
interactive docs and on surveys (I may have missed something there, the
point being there are >0).

>Having just returned from Afilias' mini conference about design of
>Slony-II, I can tell you that multimaster replication isn't right
>around the corner ;-). It's gonna take some work.

Certainly :-)
I still think the UNION way and
different-tables-replicate-in-different-direction can be a decent fake
version of MM replication under certain restricted conditions.

//Magnus

Browse pgsql-www by date

  From Date Subject
Next Message Dave Page 2005-01-22 20:46:06 Re: Thoughts on the mirroring system etc
Previous Message Tom Lane 2005-01-22 19:15:20 Re: Thoughts on the mirroring system etc