From owner-freebsd-stable@FreeBSD.ORG Wed Apr 7 06:05:52 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 58B97106566B for ; Wed, 7 Apr 2010 06:05:52 +0000 (UTC) (envelope-from ari@ish.com.au) Received: from fish.ish.com.au (eth5921.nsw.adsl.internode.on.net [59.167.240.32]) by mx1.freebsd.org (Postfix) with ESMTP id D966E8FC18 for ; Wed, 7 Apr 2010 06:05:51 +0000 (UTC) Received: from ip-149.ish.com.au ([203.29.62.149]:64062) by fish.ish.com.au with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NzOOZ-0000Pi-19; Wed, 07 Apr 2010 16:05:47 +1000 Message-ID: <4BBC20BA.6090604@ish.com.au> Date: Wed, 07 Apr 2010 16:05:46 +1000 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Maciej Jan Broniarz 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> In-Reply-To: <4BBA51B9.6010803@gausus.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 06:05:52 -0000 On 6/04/10 7:10 AM, Maciej Jan Broniarz wrote: > W dniu 10-04-05 22:43, jfarmer@goldsword.com pisze: >> Quoting Maciej Jan Broniarz : >>> W dniu 10-04-05 22:08, Tonix (Antonio Nati) pisze: >>>> Maciej Jan Broniarz ha scritto: >>>>> W dniu 10-04-05 17:45, Mike Jakubik pisze: >>>> >> >> So first you have to define your workload, then define what errors you >> must avoid or allow, and then define how to deal with failures, errors, >> etc. >> Then you can start talking about High Availability vs. level of Fault >> tolerance, vs. .... > > Let's say i need to run a few php/sql based web sites and I would like > to maintain uptime of about 99,99% per month. No matter how good the > hardware - it will always fail at some time. My goal is to build a > system, that can maintain that uptime. > > From what You say I need some level of HA system, to maintain the > required uptime. > > So, as I've said earlier (correct me, if I'm wrong) - the setup could > look something like that: > > - 2 web servers with carp > - 2 storage servers with on-line sync mechanism running > - 2 mysql servers with on-line database replication > > (i'm skiping power and network issues at the moment). > > Few people have told me about a setup with linux, drbd and heartbeat > which offers them some level of HA. Has anyone tried anything similar on > FreeBSD? We've recently set up a new colo facility with the following: * dual ethernet links from our upstream * dual HA pfSense (FreeBSD) boxes running haproxy to load balance incoming requests amongst live web servers * dual switches * 2 (or more) web (application) servers * database 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. You need redundancy within the database application across multiple machines. Possible, but not easy. You aren't going to be doing that completely within the operating system itself. DRDB sort of gets you there, but DRDB isn't synchronous with the database activity, so you might still lose data. A cheaper option is to use master-slave replication (postgresql and mysql offer this) and CARP failover (just don't fail back!). But it hasn't been quite robust enough for my liking. Ari Maniatis -- --------------------------> Aristedes Maniatis ish http://www.ish.com.au Level 1, 30 Wilson Street Newtown 2042 Australia phone +61 2 9550 5001 fax +61 2 9550 4001 GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A