[KLUG Members] Postgres Cluster

Jamie McCarthy jamie at mccarthy.vg
Tue Jul 19 11:30:37 EDT 2005


adam at cisco-inc.com (Adam Tauno Williams) writes:

> Yep, agree.  I've looked at MySQL and PostgreSQL's "cluster"
> support. And I don't think any of then qualify as a "cluster" in
> the way most people intuitively think of the term.  They either
> user enourmous amounts of RAM to keep data resident or they are
> simply replicants.

MySQL does support master-master replication under certain
conditions, and this does qualify as high-availability clustering.

This does require careful setup by someone who knows what he or
she is doing, and is not to be undertaken lightly, but it can be
done.  Essentially you have two masters, each of which also is a
slave to the other;  your application writes to only one at a time
and you have to roll your own hot-failover application that will
redirect your application's requests from one to the other when a
problem occurs.  Of course doing that failover as an atomic
transaction can be tricky as well, especially if you want multiple
boxes handling it to avoid _that_ being your single point of
failure, and I suppose whether this whole thing qualifies as a
proper "cluster" depends on whether you're clever enough to write
proper failover handling software.

Slashdot will probably be moving to this setup within the next
year.  LiveJournal is using this as part of its setup, and it's
been working well for them for over a year. Their slides on their
architecture are here (scroll down to "Master-Master Clusters"):
<http://www.danga.com/words/2004_mysqlcon/mysql-slides.pdf>

There is also the product simply called "MySQL Cluster" which is
the resident-RAM solution you're talking about.  Works great if
you can afford boxes that hold enough RAM to hold your entire
database, including indexes, 2-3 times over.  A lot of web-based
applications qualify for this (Slashdot's entire DB is on the
order of 8 GB) but obviously that's not going to work for everyone.

> > Unidata keeps a transaction log.
> 
> Right.  Our Informix database keeps transactions logs

MySQL calls them binlogs, same thing.
-- 
  Jamie McCarthy
 http://mccarthy.vg/
  jamie at mccarthy.vg



More information about the Members mailing list