fault tolerant web servers on freebsd

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed Apr 7 07:37:19 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/04/2010 08:15:16, Joshua Boyd wrote:
> On Wed, Apr 7, 2010 at 3:00 AM, Andriy Gapon <avg at icyb.net.ua> wrote:
> 
>> on 07/04/2010 09:05 Aristedes Maniatis said the following:
>>> Until we get to 'database' everything is HA and quite easy to build and
>>> manage. Having a clustered database solution is expensive and beyond
>>> most smallish budgets. mysql and postgresql don't have anything
>>> available that is quite ready yet (IMO), so you'll need to be talking to
>>> the bigger (expensive) players about their clustered offerings.
>>
> 
> Master-master circular replication in mySQL probably fits the bill.
> Master-slave requires a slave to promote itself to master, which can get
> tricky.

Although with master-master you need to be really careful to only use
one instance read-write at any one time.  In theory you can design your
DB schema and SQL to work correctly with multiple masters; in practice
virtually no downloadable applications will work like this.

Also remember that MySQL replication runs in a single thread on a single
CPU core.  It's quite easy for a busy DB master with plenty of CPU cores
to go so fast the replica can't actually keep up even if the replica
uses exactly the same hardware.  Anyone who has a really good solution
to this problem is going to make themselves rich beyond the dreams of
avarice...

>> Out of curiosity: have you considered MySQL Cluster:
>> http://en.wikipedia.org/wiki/MySQL_Cluster
>> http://www.mysql.com/products/database/cluster/faq.html
>>
>> If yes, can you share your evaluation results?
>> Thanks!

You need at least three machines to build a MySQL cluster; preferably
more like 6 or 7.  All of your data has to fit in RAM on those machines
and you need at least two copies of each item of data for resilience, so
don't bother trying this with anything other than a well populated 64bit
box.  Also, if /all/ of your servers crash at the same time (power
problems tend to have this result) then your data has gone *poof* and
you'll be restoring from backup.  You did remember to set up a regular
job to create snapshots of the clustered data didn't you?

Cluster tends to be slower than what you can achieve with straight MySQL
on the same hardware.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku8NioACgkQ8Mjk52CukIxofQCePWmRADsM8r8+dLuA8MjDSL4U
3YEAoIxwGJrnQbzXABK9YU3Pc6+MVo8r
=tmTo
-----END PGP SIGNATURE-----


More information about the freebsd-stable mailing list