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

I have 2 web servers with a load balancer in front of them.

They both have mounted a nfs share, so that they can share some common files, like images uploaded from the cms and some run time generated files.

Is nfs robust? Are there any specific weaknesses I should now about?

I know it does not support file locking but that does not matter to me. I use memcache to emulate file locking for the runtime generated files.


share|improve this question

I already posted a question related to NFS performance.

You can have a look. I hope it will help.

share|improve this answer

NFS does have some down sides. If network communication is interrupted, the behaviour of NFS varies depending on which Operating System you are using (you didn't specify). I have seen some Linux distributions simply drop the share silently and revert to using the mount point as if it were on the local disk. This can cause problems if you suddenly find your root partition full because a scheduled task copied data to the local drive instead of a remote mount point. I have also seen some distributions try to contact the remote server and simply never receive a response, and remain waiting for network communication indefinitely. So among other things, detecting a disconnected share and automatically re-connecting can be troublesome.

share|improve this answer
It depends on the mount options (retry, timeo, async, sync, intr, etc). – gtirloni Jan 1 '11 at 21:51

You usually want to decrease the amount of operations going over the network for NFS. Check your mount options and analyze if you can increase the time things get cached. This is specially important for web servers. We run a fairly intensive NFS environment where the web servers usually do very little read/write but a lot of meta-data (check file timestamp, permissions, size, etc). You can tune how long that information stays cached and it'll improve performance.

A downside is that you've a single point of failure being the NFS server. If you can't make it a active-active or active-passive cluster, make sure your backups are being done on a regular basis and can be restored quickly. Another approach is to make sure the NFS server itself doesn't have single points of failure within it (eg. RAID-0 is a no-no in this situations). Assess your risks accordingly.

As far as if it works or if it's a common setup: it works and it's common so you're not running anything crazy at all.

share|improve this answer

It would be better to put another web server on the back end rather than NFS. Serve the common components over HTTP and use a reverse proxy on your front end web servers.

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.