Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a website that runs on multiple web servers. Those servers need to be in synchronization - program files and user uploaded data should be present on both servers. For now this is implemented having post commit hook to synchronize code files. And script doing synchronization in one minute intervals to keep user uploaded files in synchronization. This setup has some drawbacks and seems kinda a little bit like a kludge to me. There should be a better way, maybe someone can suggest something?

share|improve this question
What storage do you have? All local, iSCSI, some other SAN? Also, do you want two sets of storage which are synced, or would you prefer / desire one set of storage which is shared? – EightBitTony Apr 30 '12 at 14:23
up vote 2 down vote accepted

Linux: drdb
Windows: DFS-R
*: rsync

share|improve this answer
It seems drdb in general/only provides read-write access to main server (node in their terms) only. We however need both servers to have ability to read and write date that should be visible across them. But maybe I just haven't dug enough and there is possibility to do that? – morphles Apr 30 '12 at 13:56
You are correct, in that case I'd recommend rsync or if you want to centralize the storage nfs, as the other answer points out. – Chris S Apr 30 '12 at 15:10

Syncing is quite tricky by nature. Instead, you could also make the servers access a shared storage. Turn one of the webservers (or another server) into an NFS server, and have the other servers mount the shared storage.

NFS is quite efficient and has locking to prevent conflicts. On a local network you'll have good performance, unless you have a large number of webservers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.