LAMP scaling and NFS. Good Idea or Not?
March 30, 2007 2:41 PM
Subscribe
So, I've got myself a web application. LAMP. I need to scale it up. Can I run the php application across multiple machines loaded off a mounted NFS share on another machine?
I'm running gig-e with jumbo frames on a private LAN. Our application is fairly high load, hence the need to scale it up. We can't afford a real fiber SAN, so, can we replicate the benefits of having all of our application scripts live in one place, and each of the web-servers mount the nfs share and serve the application off of the nfs share?
We've thought about other possibilities, such as rsync, etc. But we're concerned about race conditions. Particularly two servers communicating with clients and with the DB using different codebases.
other datapoints:
We use a bytecode cache, called eaccelerator. those caches would be on the local webserver, not on the NFS share.
We use memcache for stuff like sessions across machines.
Would there be significant network throughput setting up our application this way? What are the downsides? Would it outweigh the benefits of having one codebase for our application?
posted by Freen to computers & internet (15 comments total)
1 user marked this as a favorite
If you're using the L part of LAMP, you could consider deploying GFS, also. It's somewhat terrifying, but I know people who use it in production.
NFS is such an awful shitty protocol, and the Linux implementation has been so uneven over the years that my gut reaction is to run away from it, even though it will probably work reasonably okay.
That said, I think you're missing the big problem, which is what to use as a load balancer in the first place. If you just do RRDNS, you're going to hate life, as any single failure will end up bringing down the whole thing, and if one machine starts getting a little too loaded at random, it'll snowball.
If you use a decent load balancer, then you can map users to particular servers, and you can easily knock a server off-line, do maintainance/upgrade whatever, then bring it back, without having any silly DNS trickery, or concerns about stupid providers that ignore your short TTL and rewrite it to be 3600 seconds.
posted by Tacos Are Pretty Great at 3:12 PM on March 30, 2007