Which is easier to scale later on - 1 server with a full LAMP stack directly on the OS, or 1 server running VMWare Server 2 with 2 VM's - one running apache and PHP, and the other MySQL.
The applications I will be running off of this are written in PHP, and use MySQL. Eventually, there might be a need to scale this up - and I'm wondering if that will be easier to do from a VM environment or a physical one.
I'm planning on using SLES 64bit as the OS - for both guests and hosts.
Thanks for your help.
If you know you're going to scale your application well beyond what a single server can handle, then virtualization isn't obviously required. It can still be really nice, for server recovery and such. The downside is the overhead, when you distribute a number of networked processes over multiple VMs you slow them down a bit.
A 'classic' scaling story for LAMP could look like this:
First 1 server with the full LAMP stack directly on the one server.
Then 2 servers: 1 for web serving; and 1 with plenty of RAM & disk I/O for MySQL.
Then 4 servers: 1 for load balancing with origin IP address based sticky sessions (and optionally static file serving, SSL offload); 2 for web serving; and 1 with plenty of RAM and disk I/O for MySQL (and optionally a warm standby backup MySQL server).
In this progression, I don't see virtualiation as that useful. Oddly enough, after the 4 servers, virtualization becomes more relevant again -- the next step could be cloud computing.
But there is another thing to consider -- what about about auxiliary servers like mail servers, monitoring server, package installation repositories, etc. Do you need any of those? If so, they could be good candidates for virtualization, as they probably don't require a full servers capacity.
You're going to be adding overhead with the virtualization. I would just go with LAMP on one server and when there is need, add another machine and move MySQL to it (there may be a small downtime required to do the switch if you know what you're doing).
From there on you can start adding more web servers with load balancing between and more MySQL servers with replication.
prepare yourself mentally to shard data [ and sooner or later application servers ]. for instance use few different databases for shards and have already partitioning logic built into your application.
i think at the start you can have all running from single machine - you'll have better performance indeed and moving sql shards away to different machines in the future should be relatively painless.