Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
I've already set up a simple web server at my own house using Ubuntu, Apache, PHP and MySQL. Works well enough but I was curious if it makes more sense, or if it is even faster for me to pick up some separate boxes for MySQL, the DNS and file server. Wouldn't it just be faster for all of these services to remain on a single box? At what point do I need to start branching out?
If coded efficiently (caching, quick db queries etc), today's software and hardware should allow you to serve thousands of concurrent users from one physical box.
Branching out is expensive, more servers mean more juice (electricity) and more maintanence.
Hope this helps,
For years, we ran web, DB, and mail on the same server. About 6 months ago we added a new server just for DB. Instead of often redlining CPU & memory usage, both boxes are now comfortably in the green. Granted, the new box has more processing and memory, so if we moved everything to the new box things might still be in the green (but probably still jumping at least into the yellow) for now. But we also plan for continued expansion of the site so would eventually need 2 boxes later anyway.
Often disk IO is the issue. Check into tools like sysstat to monitor performance.
Putting the database server and a seperate machine means all your queries are going to go over a network connection. This may (or may not) slow things down. It depends a lot on how much data you actually transfer.
We've setup clients where the the separate servers were physically hardwired to each other, so it was an extremely fast and private/secure connection between the two boxes.
If you have an extremely DB heavily application, it might be a good idea to have multiple servers.
OR, you can build in a memory caching solution (ie - memcached) to replace the heavy dependency on your database. We do this and it allows us to keep everything on one server. Of course we don't get a million pageviews a day, only about 200k or so.