Poor man's failover cluster

df-sean

Verified User
Joined
Feb 8, 2007
Messages
51
My client doesn't have the budget to hire a team of Sun engineers to set up a true High Availability cluster. So we're looking for a way to just set up a failover box in a separate location which is always mostly in sync with the primary.

We use dnsmadeeasy for DNS, and with TTL's set to 5 mins, we're able to switch between boxes very quickly. So the only issue really is how to keep a fresh copy of all the data on the failover box.

Things to keep in sync:
/home
all mysl dbs
all email
all directadmin data

I'd like to avoid adding layers of complexity such as distributed filesystems, etc. I'm thinking the simplest solution is a cronjob which runs mysqlhotcopy and then rsyncs all the db's and the entire /home directory and any necessary DirectAdmin directories. Assuming the script runs every 5 mins, then in the event of an outage, I can simply log into dnsmadeeasy, point the domain to the failover server, and blammo we're 100% back in business with fresh data no more the 5 minutes out of date. All websites, email, databases -- everything "just works".

My questions are:

1. What DA dirs should be synced? (and what should be excluded)

2. Is syncing mail really just as easy as keeping the imap/ dirs in sync?

3. What obvious thing am I missing here that torpedos my whole idea?

Any ideas would be greatly appreciated.
 
Well I'm not that experienced in what you're doing, so I'll just keep most of my opinions to myself and let someone else give you better advice, but just realize that keeping them synced WILL use a lot of bandwidth to start off and then possibly use a decent bit later depending on how much/often the data changes. Make sure you have the resources to do what you're wanting to.
 
Thanks for the input. I should have mentioned that both server are in Japan on standard 100mpbs fiber -- extremely fast ;-)
 
Both boxes have their own DA licenses, right? They'll both need independent licenses.

Some of these are for ap1 - non dovecot. Using dovecot, all mail is in the user directories, so everything in /home/ is what you need for the users.

Don't forget passwords, groups, dns (/var/named), logs and mysql.


/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
/home/*
/etc/exim.conf
/etc/exim.pl
/etc/system_filter.exim
/etc/exim.crt
/etc/exim.key
/etc/proftpd.conf
/etc/proftpd.vhosts.conf
/etc/proftpd.passwd
/etc/hosts
/etc/resolv.conf
/etc/named.conf
/etc/virtual/*
/etc/httpd/*
/var/named/*
/var/spool/virtual
/var/spool/mail
/var/www/*
/var/log/*
/var/lib/mysql/
/usr/local/directadmin/
 
Hmmm... Thanks hostpc, but I think probably some of those should be excluded for my particular purposes. I'm using dovecot/imap so I think email is sorted. These boxes are on separate networks so I don't think I'll want to sync network specific stuff like resolv.conf. And I'm using 3rd party DNS, so I won't have to worry about that either. Also I don't intend to sync the live databases, just the backups made by mysqlhotcopy.

I'm very much interested in the idea of syncing /etc/passwd and friends. Does anyone have a complete list of all the dirs which would need to be rsynced in order to keep all users, groups, and email accounts consistent across the two boxes?
 
Back
Top