High Availability FreeBSD www cluster

Sergej Kandyla sk.paix at gmail.com
Tue Aug 5 15:53:07 UTC 2008

Michael Christie wrote:
> Hi all ,
> I want to cluster some freeBSD servers, The purpose of this is to 
> learn.  I would like to  run some basic services like www and mail on 
> a test network. I would like to set up the servers so if one server 
> falls over the other will take over the services automatically, load 
> balanceing would be good as well.
> web links any thing to help me get started would be good. No I do not 
> want to change over to linux.

High Availability means that your cluster should work even some system 
components fail.


For building HA cluster you should have at last  two machines, first 
will run in master mode, second in slave( standby )mode.

In every time only one machine  works and provide some services (www, 
db, etc)

Very good idea is to use NAS(SAN) - Network Access Storage  ( 
http://en.wikipedia.org/wiki/Network-attached_storage ) with shared disk.
Both nodes of HA cluster will use this shared disk (but only one in 
certain time). If one node fails, second node (standby node) will become 
a master of cluster and will start some services, that cluster provided.
But NAS systems is not cheap!!

Another way is to use software systems such us DRBD, NFS, chironfs, 
rsync etc. 
Most of  this high-availability software solution works by replicating a 
disk partition in a master/slave mode.

Heartbeat + DRBD is one of most popular  redundant solutions.
DRBD mirrors a partition between two machines allowing only one of them 
to mount it at a time. Heartbeat then monitors the machines, and if it 
detects that one of the machines has died, it takes control by mounting 
the mirrored disk and starting all the services the other machine is 
Unfortunately DRBD runs only on linux but I recommend you to see how it 
works for understanding this technology.


For freebsd to mirror content on bouth nodes you can use rsync as in 
this howto:

Another way like as DRBD  is to use chironfs + nfs  

Also look at CARP (Common Address Redundancy Protocol)

man carp

http://www.postgresql.org/docs/8.3/static/high-availability.html  (for 

ps. sorry for my eng

Best Wishes,

More information about the freebsd-cluster mailing list