I have several different applications I need to run to serve my website. To use the minimum amount of servers while still maintaining good performance, which of the following can I put on a single server?
mysql, nginx (2), memcached, sphinx search, Rails Cron jobs
I know that mysql needs a dedicated system to run, so does nginx for serving web pages. However, I have heard that memcached can be put on the web server it's self because it uses almost no cpu and ram only, where the web server uses mostly cpu.
If possible, I would really like to combine memcached, sphinx search and Rails cron jobs on one machine.
What do you think?
AFAIK, you've got decent guidelines. For a definitive answer, you need to do load-testing of your specific application environment under conditions that reflect the usage you expect to see in the real world. Maybe your application generates very little SQL load, so SQL doesn't need to be on its own box. That's not often the case, but it's not an iron-clad rule that SQL must be on its own server. It's definitely a best-practice, especially if you want to scale - I'm just using it as an example.