From owner-freebsd-stable@FreeBSD.ORG Wed Apr 7 07:37:19 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A91281065672 for ; Wed, 7 Apr 2010 07:37:19 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E05748FC0A for ; Wed, 7 Apr 2010 07:37:18 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o377bEQn027295 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 7 Apr 2010 08:37:14 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4BBC362A.9010306@infracaninophile.co.uk> Date: Wed, 07 Apr 2010 08:37:14 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Joshua Boyd References: <1209800810.33861270466947931.JavaMail.root@dagobah.intersec.pl> <4BBA05A2.40706@intertainservices.com> <4BBA1823.1090305@gausus.net> <4BBA4334.1020506@interazioni.it> <4BBA4478.7030302@gausus.net> <20100405164306.hmy4n8pvs4goc8ks@www.goldsword.com> <4BBA51B9.6010803@gausus.net> <4BBC20BA.6090604@ish.com.au> <4BBC2DAB.2050704@icyb.net.ua> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-stable@freebsd.org Subject: Re: fault tolerant web servers on freebsd X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 07:37:19 -0000 -----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 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-----