1

I have a server with multiple different sites hosted on it. Additionally it has mysql-server that housing information for every site. Over the weekend I had slow queries for one of the databases on mysql-server. Naturally it was locking up apache.

I am just wondering, with hardware so cheap, and an abundance of virtualization products out, are the days of having multiple sites on the same server outdated? I can think of only one benefit of hosting multiple sites on the same server, and that is just easiness (not having to start/configure a new instance). I can think of many negatives though. Comprimizing one site gives a user access to many other sites. Also something like the slow query problem locking up apache for EVERY site would no longer happen.

So it clearly seems that hosting many sites on 1 instance is bad practice? Am I right to assert this?

1 Answer 1

3

No, you're very, very wrong. The days of multi-tenant web applications is far from gone. All of the negatives you list can be managed fairly easily, and the efficiencies of not having to run many redundant copies of software via different virtual machines can be quite considerable when you're talking about hosting several tens of thousands of sites per machine.

3
  • so for an issue where a slow query locks up apache, how might you handle that problem if it gets to the point of locking up? A monitoring platform like nagios for quick detection? Are there better ways (besides thorough query testing before deploying to production)?
    – dm03514
    May 7, 2012 at 14:11
  • 1
    What "slow queries" do you imagine "locking up" a web server with (potentially) thousands of threads?
    – adaptr
    May 7, 2012 at 15:01
  • 1
    @dm03514: If a single slow query is capable of locking up Apache, UR DOIN IT RONG.
    – womble
    May 8, 2012 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .