High Availability and Replication for Web Servers

apache-2.2high-availabilityreplicationrsync

I have a 3-layer web solution like this:

  • Frontend with load balancing + proxies + static content
  • Backend with 2 Apache web servers each one serving different sites
  • Publishing System that pushes content to the apache web servers

So I am working in a solution with High Availability for the web servers in the backend. My idea is to replicate the content between the backend servers and if one fails the other will serve all the sites (this could be manual or using Heartbeat).

Problem is that the sites are big in terms of total size and number of files. I try to replicate the contents between servers with rsync but it takes a long time. Also I thought of using NFS to share the contents but this is not an option for High Availability. Another way is for the publishing system to push content to both web servers, but what will happen if I put another web server in the backend?

Is there a better way to do this? I don't need both servers serving the same content at the same time, but having the same content synchronized is a must.

Best Answer

You really should consider DRBD (RAID-1 over TCP/IP) with a multi-node filesystem such as OCFS or GFS.

You can also consider getting a SAN on which you will be able to put any one of these filesystems as well.

Related Topic