Re: Thoughts on the mirroring system etc

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

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 22 January 2005 19:15
> To: Dave Page
> Cc: Magnus Hagander; pgsql-www(at)postgresql(dot)org
> Subject: Re: [pgsql-www] Thoughts on the mirroring system etc
>
> "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> > 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.

Assuming there is someone available who is able to do that. We are
looking for a robust solution that requires no manual intervention to
keep the site running in the event of a failure.

> 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.

The webservers and the database machines are the same boxes. The current
implementation has a fully dynamic version of the website running on
wwwmaster, which also builds a static HTML version of the site. This is
currently rysnc'd to three distributed front end servers which link back
to wwwmaster only on pages that cannot be statically generated.

> 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.

A single master will work fine assuming that a replacement can be
swapped in quickly somehow. We then of course have the fun of reversing
the master/slave relationship(s) when the original master comes back up,
and making sure that both (or more) servers are properly in sync. Also,
having a single master doesn't help at all with load distribution of
course.

The beauty of Magnus' union idea is that having any small number of
masters is possible, and it would be easy to support and pretty much
self-maintaining - the existing mirror tracker would do everything that
is required if run regularly enough with a small DNS ttl giving a system
that can patch up a failure after only a few minutes.

> 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.

Yeah, I guessed as much :-)

Regards, Dave.

Browse pgsql-www by date

  From Date Subject
Next Message Tom Lane 2005-01-22 21:25:22 Re: request: search engine for PostgreSQL site
Previous Message Magnus Hagander 2005-01-22 19:44:32 Re: Thoughts on the mirroring system etc