synchronising failover web servers

Roman Volf volfman at keystreams.com
Fri Apr 9 22:52:18 PDT 2004


Depending on your resources and possible space limitations, I'm not sure 
if the following applies.

A setup I have built that works very well:

1x Load Balancer - simple 1ghz machine running LVS (linuxvirtualserver.org)
4x Web Servers -  All identical setups, all identical Apache's etc..

The Load Balancer has all the IP's bound on the primary interface and 
the web servers have those same IPs bound on their loop back interface. 
This is what LVS calls Direct Routing load balancing. The web servers 
return request over their own WAN links, but all incoming requests com 
in through the load balancer. You can include/take out any web server 
from the "round robin", so to speak, at any time.

In reference to how the 4 servers get their html and config files 
sync'd, its rsync. There is a 5th "Master" distribution server where all 
user accounts are actually created. The files are synced/pulled from 
there every 5-10 minutes via LAN. Rsync has many options for this sort 
of application, so if you do have the ability to setup a master server, 
it works very well.

Excuse the long prelude to getting to your question..

Roman Volf
Keystreams Internet Solutions
volfman at keystreams.com



Aristedes Maniatis wrote:

> 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 at ish.com.au
> PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8
>
> _______________________________________________
> freebsd-isp at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-isp
> To unsubscribe, send any mail to "freebsd-isp-unsubscribe at freebsd.org"




More information about the freebsd-isp mailing list