Date: Sat, 10 Apr 2004 13:38:12 +1000 From: Aristedes Maniatis <ari@ish.com.au> To: freebsd-isp@freebsd.org Subject: synchronising failover web servers Message-ID: <7E8A3A1C-8AA0-11D8-B20E-003065A9024A@ish.com.au>
next in thread | raw e-mail | index | archive | help
We have two web servers configured in an identical manner. Both machines have an identical web server (Apache) setup with identical copies of the html directories and config files. Each machine is capable of handling the load alone, but the redundancy allows us to upgrade one at a time, or have a second machine available as failover in case of hardware failure. We simply swap the IP addresses of the interfaces, or apply DNAT at the upstream router. I know there are more automatic failover options available, but this is sufficient for our needs. Both machines are currently FreeBSD 4.9. There is a separate secure gigabit network linking the servers together which carries no internet traffic. The problems we have right now are: 1. how to sync the html directories 2. how to sync config files (eg httpd.conf, contents of /usr/local/etc, and so on) I have been experimenting with various options. For (2), I have been thinking of creating a cvs repository to which we commit all changes and then creating cvs checkout scripts on the deployment machines. That way rollback is easy, we can comment changes, and testing on a third testing box is easy. However, cvs is not well suited to files scattered all over a file system. It expects to deal with a single folder full of files and folders. For (1), users have the ability to upload files directly to the server via ftp, so cvs is not appropriate. I've looked at rsync, but found it to not be ideal for a two way synchronisation - it is better suited for a mirror type situation where one machine is master. In our setup, it is possible, through DNS changes that either machine is the master at any point in time. What solutions have others used for these situations? We are at the small end of the scale, with dozens of sites rather than hundreds, so a simple solution is what we are looking for. Our sites are all complex database driven beasts, but I only need to solve this particular part of the problem now. Cheers Ari Maniatis --------------------------> ish group pty ltd 7 Darghan St Glebe 2037 Australia phone +61 2 9660 1400 fax +61 2 9660 7400 http www.ish.com.au | email info@ish.com.au PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7E8A3A1C-8AA0-11D8-B20E-003065A9024A>