So I’ve been taking an informal poll of the sysadmins I know to find out how people are managing the synchronization of files across a server farm. Looks like there are three popular ways of handling this, which I’ll list in no particular order:

First, there’s NFS. There are numerous places out there that have a central file server, and then the server farm mounts, say, /opt or /usr/local or something, and then there are lots of configuration files and stuff underneath those trees somewhere. The benefit of this method is that you can make a change in one place and have it take effect everywhere more or less immediately. The downside, as I see it, is something I call the “christmas light syndrome”: if the file server goes down, any services on any hosts relying on the mounted files become unavailable.

There’s another upside to the NFS scenario, which is that your server farms can mount config files read-only, which offers some protection should the machine be compromised in some way.

The second popular method is to use rsync. The upside to this method is that all files are local to the machine, so services on your hosts don’t depend on the availability of a file server. The downside is that generally there is some glue code and duct tape involved, which means you’re maintaining code to take care of all of this, which means there’s not really a standard procedure per se for handling file synchronization with rsync. In addition, you don’t have the benefit of having your config directories mounted read-only, which is just one less protective measure.

The third method is cfengine, which is still hanging on my list of things to make friends with. I tried using it during the version 1.x days, when it was quite a bit more difficult to use. I’m aware that the 2.x versions are much, much easier, more robust, supports RSA keys, and all that jazz, and I promise that once I get through the three projects currently on my plate, cfengine is number 4.

If you’re using other means of handling file synchronization, or you just wanna plug your favorite feature of cfengine, or have a cool rsync hack or something, please share!