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 am wanting to implement a multi-server specialised hosting environment.

I currently have a cloud solution comprising of 3 centos boxes (2 lamp web servers, 1 mysql).

What I am wanting to do is, implement a 5 server solution where they is 3 web servers, 1 mysql box and a fileshare.

Basically I want the fileshare to host all the web files for the servers, the caching will remain on the individual servers and the sessions will be stored in mysql. So what I am asking is how do I map the servers to share the same "docroot"? Is it NFS? if so whats the best way about doing this?

Thanks in advance.

share|improve this question
up vote 1 down vote accepted

Yes, use NFS server on the box you label as "fileshare" and the webheads are NFS clients. Google "nfs howto centos" and you'll get a million tutorials.

share|improve this answer
Thank you Troy. – Kyle Hudson Dec 26 '10 at 14:30
you're welcome! btw, I just read about your sessions; consider using memcached running on your fileshare or mysql box instead, and use php-memcache module to store the sessions. It's a lot faster, writing sessions to MySQL can introduce a lot of performance hits for the other databases/tables with your real data. – troyengel Dec 26 '10 at 15:41

Have you taken a look at ? This might do what you want. I'd also suggest ignoring the filesystem entirely, and using something like Memcached to store you data. This would give you the advantage of being able to scale your web servers up and down with no configuration/data sync issues.

You could also setup an rsync job on a somewhat fast cron (do you need the pages to be fully live, or is a 1 minute delay good enough)? Just sync the files from the fileserver every minute.

I'd suggest avoiding NFS, it's not exactly high performance.

share|improve this answer
so many bad ideas in one comment I don't even want to get into it. NFS is plenty high performance depending on how you use it, the guy didn't say he needs to run Google Images on the thing, just share content between two nodes. – troyengel Dec 23 '10 at 1:06
A one minute delay would be fine, decided to just use NFS for now. – Kyle Hudson Dec 26 '10 at 14:31
Other reasons to avoid NFS: 1) lack of security (if you're using the typical NFSv3), which may be a bigger concern since you're "in the cloud" rather than your own datacenter; 2) craziness with locking; 3) limitations on the number of supplemental groups a process can belong to. – mattdm Jan 17 '11 at 4:34

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.