Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '12 at 14:11
1  
What "slow queries" do you imagine "locking up" a web server with (potentially) thousands of threads? –  adaptr May 7 '12 at 15:01
1  
@dm03514: If a single slow query is capable of locking up Apache, UR DOIN IT RONG. –  womble May 8 '12 at 10:28

Your Answer

 
discard

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.