-2

We are currently hosting about 10 of our own various websites on a virtualised host. Each website is hosted by its own virtual machine with its own apache. Some of the sites connect to a shared database (MySQL) some use a different locally hosted database (again MySQL).

We're starting to run out of resources to allocate to virtual machines as there are now quite a few separate VMs. There are clearly some websites that are busier than others.

I've been considering combining a few websites onto a single host to reduce the total number of VMs to say 4.

The upshot of doing this would be to reduce the overhead required for each website but of course with that comes reduced stability; if Apache/MySQL/PHP fails for whatever reason (or needs restarting) a cluster of websites goes down rather than just one.

My question is: at what point does a website deserve its own dedicated VM?

2 Answers2

2

The answer is clear: At the point where it's more beneficial to run the site in its own VM.

What this point is is entirely dependent on your environment, but for low to medium traffic sites I always separated around technical concerns only, e.g. when I have contradictory technical requirements or need to separate more than it's possible with vhosts.

Sven
  • 100,763
1

Ultimately this would come down to performance monitoring and profiling to see which sites are creating the most load. A 'busy' site might not cause performance hits depending on what it is doing.

You would need to define the problem more specifically and ask specific questions.

Do you have any resource contention issues (CPU, storage, memory, network) that are directly attributable to particular site(s)?

Are some sites consistently less utilised / less resource intensive than others (i.e are they 'always' consuming little in the way of resources?)

Are your 'busy'/resource intensive sites 'always' busy/high consumers of resources or are there consistently peak times?

Can you consolidate less resource intensive sites with higher utilised sites and still maintain good overall performance for all the sites on that host? This would take more performance measurement after any changes.

Once you have profiled individual performance and resource utilisations of your sites you would be in a better position to determine whether consolidation or isolation to individual VM's.

It's also a case of continuing to monitor the performance of your sites over time, archive previous performance logs etc so that you can determine if you need to refine things later.

Unfortunately there is no ideal formula for calculating when would be the best time to isolate a site to it's own VM as we all have different needs, limitations etc that impact the hosting decision.

Enigman
  • 491