fault tolerant web servers on freebsd

Robert Joosten robert at ml.erje.net
Thu Apr 8 14:01:35 UTC 2010


Hi,

> 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. 
>  From what You say I need some level of HA system, to maintain the 
> required uptime.

Okay

> (i'm skiping (..) network issues at the moment).

Then you won't succeed. Four nines availabillity without regarding network 
outages... sjeesh.

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

Did you actually *look* around for possible solutions ? I mean, I searched 
with google and found geom + ggated solutions... Go figure.

Depending on your budget, I would build two 'systems', spread over two 
coloc's. Use two squid/memcached caches, two backend servers with 
http-daemons and php on it, two sql servers that replicate in realtime, 
all (maybe exclude the sql servers from that.. depending on writes 
figures) connected to a NAS. Having caches at the frontend, make sure you 
fully understand http://www.mnot.net/cache_docs/ (for example, may more 
resources are available).

Then, have that NAS replicate to the other coloc site (don't forget the 
encryption heh). Pay attention to the switched LAN behind it. Maybe 
redundant switches would be a very clever investment.

At last, have 2 dns A/AAAA pointers to both sites with a reasonable 
but short TTL that you can change right away. These autoritive dns servers 
must be as redundant as well.

Now we're talking about resiliency. And money, so skip out all what proves 
to be too expensive. I'm sure you already estimated how many dollars 
unavailabillity costs you, so invest wisely. If this is a commercial 
hosting exercise, buy stuff for the upcoming 36 months. After that, 
redesign may be wise.

You wanna learn how other folks are doing this ? Have a look at wikipedia 
! And also try to learn from their power outage few weeks ago :-/ You may 
poke around at http://wikitech.wikimedia.org/view/Main_Page and get some 
idea's.

Goodluck.
Robert


More information about the freebsd-stable mailing list