Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Hello ServerFault Community,

I'm usually a StackOverflow lurker/contributor, however I've been playing with a server cloud service recently and would appreciate your thoughts.

I build web applications (generally small to medium in size with low-ish traffic) and at present I have 3 virtual machines running on Debian and serving web files through Apache and data with MySQL. Each VPS runs between 10 and 30 sites; some custom apps, some Wordpress and a few static HTML sites.

With the new cloud service that I'm playing with (currently in beta so it's free!) I have the ability to start/stop and scale servers as I please. The first experiment on my list is to replace Apache with Nginx and so far this is going well. However, I am beginning to wonder whether there would be any benefit in having one server 'optimised' to serve files via Nginx and store media files and then another server 'optimised' to run and serve data through MySQL.

I don't know whether there's much you could do to optimise each server for either web or database hosting or whether there'd be any other great benefits to separating the services apart? I would appreciate any thoughts/comments on the matter and any other options that I may have missed.

Sidenote: Using the cloud service, I have the option to fully customise the servers on the fly including memory, disc space and disc speed (SATA, SAS, SSD).

share|improve this question
Possible duplicate of… – Khaled Nov 29 '11 at 11:21
Thanks, certainly answers aspects of my query but still interested in how disc, memory allocation may differ between the two servers to achieve optimum performance. – Matt Nov 29 '11 at 11:34
up vote 1 down vote accepted


  • DBs want as much (if not all) of their data in memory and CPU, HDD speed is less important.
  • HTTPDs want HDD I/O since files are being served from disk.

If you can specify any type of server then I see no reason why you couldn't create high spec servers and run both DB and HTTPD off the same machine, however cost aside, I think these are the main advantages and disadvantages:


  • Load on one does not effect other
  • Can be scaled independently as need arises
  • Kernel tweaks can be applied specific to the task at hand
  • Specification of machines specific to needs (DB=RAM, HTTPD=SSD)
  • Easier to configure/manage (my opinion)
  • Easier to move to CDN in future [?]
  • Isolated machines mean less is potentially compromised from a security breach


  • MySQL TCP/IP vs Unix SOCKs (DB Latency)
  • Twice as many points of failure

Unsure as to where cost fits in (which is more expensive).

While not specific to splitting the servers, one thing that may be useful is to split the web content into static and dynamic content to reduce the overhead on processing static content (no need to load PHP if you are just sending a static file).

Personal Note: We run VMware both at a datacenter (rent some blades) and locally. I much prefer to keep the DB/HTTPD separate. We have separate DB/HTTPD VMs at the datacenter but not locally. I much prefer the former and while I have no statistics the VMs at the datacenter run on alot lower spec than our combined HTTPD/DB VMs do locally with less performance issues.

share|improve this answer
Thanks very much. This all sounds great and answers much of my questions. – Matt Nov 29 '11 at 13:50

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.