Results 1 to 3 of 3
I have a Load Balanced High-Availability Web Cluster with 3 nodes. Therefore all 3 nodes must have the identical websites otherwise there will be inconsitencies with what appears on the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-11-2007 #1
- Join Date
- Nov 2006
Two-way mirroring of Web Servers Sites
I have a Load Balanced High-Availability Web Cluster with 3 nodes. Therefore all 3 nodes must have the identical websites otherwise there will be inconsitencies with what appears on the browser with each http request. To keep the web sites consitent on all web servers I originally used rsync in a circular loop which caused many problems when files were created, deleted, or modified on a particular web server node. As you can imagine some changes were overwritten since rsync is one-way mirroring software. To make matters worse in order to get rsync to run automatically I had set up cronjobs to run every 5 minutes. Can you imagine someone uploading a file to one of these nodes and having to wait up to 10 minutes for them to replicate to the other nodes, and that is if it wasn't overwritten/deleted by the rsync process itself.
So I started to experiment with Unison. It achieves the two-way mirroring I need, but not the continuos part. It has a --repeat option that can be used for continuos replication but it does not operate in the background so it locks up your terminal window, for servers that have no GUI installed and administered remotely would eventually have the problem that the connection will time out not to mention the security risk of leaving a remote terminal window open (CTRL-C breaks the command and grants access to the shell ).
As a small band-aid solution I have created cronjobs to run unison on one of the nodes as it syncs with the other two every minute (Hub and Spoke topology as recommended by Unison docs). But still changes may take as long as 2 minutes to propagate to all nodes. Recently Unison has cease to exist in development and there is no support for it.
What I need is continuos two-way mirroring for these three nodes so that files on the websites are consitently the same. Either a daemon or background process that can achieve this will be greatly helpful. I was looking into Pavuk but the commands are horribly long and when I sent a message on their mailing list about it having two-way mirroring capabilities I received no reply, after 3 weeks!
All machines (3 nodes + 2 load-balancers):
Ubuntu 6.06 Server (no X-Windows/GUI)
Any suggestions or help would be greatly appreciated. Thanks for your support.
- 09-11-2007 #2
- Join Date
- Sep 2007
rather than trying to keep 3 filesystems in sync, why not just NFS mount the same export as /var/www on all three?
- 09-11-2007 #3
- Join Date
- Jun 2006
I agree with tycho, but not sure I would do it NFS unless I was exporting read only (which it doesn't sound like you are). From my experience and what I have read, samba seems to be a more secure alternative. Its a bit trickier to setup though, and hopefully I didn't just open up a can of worms with the NFS vs Samba debate. However, I am sure there are more qualified people than myself in this forum that can give you a more indepth look into both than me.
Also not sure if it applies, but have you also considered using an external storage solution that can be accessed by all 3 machines simultaneously. This way you wouldn't be dependant on OS protocol that may provide a means for a breach. I have setup several fibre and iSCSI environments in the test labs my team supports, and I have seen this work first hand. Then setup the RAID to handle your redundancy and you only have one storage set that needs to be backed up. It also gives you a sort of continued support since the management software is still maintained by the company you purchased the hardware from.
- Just a thought =]