0

Say, a dozen applications have to hosted on a single Dell Server using open source technologies like XenServer. Some of the applications are resource intensive while others are not.

What should be the architecture of the virtual machines given the Server has 32GB of RAM? Is creating a separate VM for each application a good architectural decision?

It would be great if someone could give a elaborate information on such optimizations.

The tech stack is PHP, MySQL almost everywhere.

  • This question can't be answered. We have no information about the host other than the amount of RAM and we have no information about the workloads, such as performance baseline, disk I/O, memory and CPU profiles, what applications and services you're going to be running, etc., etc. – joeqwerty Apr 19 '14 at 20:26
  • possible duplicate of [Can you help me with my capacity planning?](http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning) – MichelZ Apr 19 '14 at 21:43

1 Answers1

1

If you are having same technical stack almost everywhere, then having a virtual machine per application sounds like would bring too much overhead. You would not only have extra kernel running, but MySQL, Apache/nginx and PHP. What I would suggest instead, is having separate virtual machine for MySQL server. You can dedicate most RAM to it if you applications are database heavy.

For apache/nginx & PHP I would have separate VMs for different versions/configurations of PHP, so for example if you have some legacy applications which need PHP 5.3<= or PHP4 even, you can have a separate VM for them. If all your applications can be run on same versions and configurations of PHP, then I would just use apache/nginx vhosts to virtualize them. If you setup multiple VMs (e.g. for different PHP configurations or versions) it will be easier to maintain servers.

Keep in mind that if you setup multiple apache/web VMs, you will need a separate public IP per different VM to access it from outside of the world. To overcome this (if you want to go separate VM route), you will have to setup an httpd proxy on either one of the VMs or on a separate VM. This would generally be nginx, then you can only need 1 public IP on this VM and then you will proxy all requests to other VMs on internal network.

phoops
  • 2,073
  • 4
  • 18
  • 23