2

I will receive my new server hardware in some days, and of course I am already planning on how to use it the most effective way.
My current thoughts are about scaling the web and database server on a single dedicated server.

I had the idea to build 4 virtual machines on this dedicated server (KVM virtualization), give them private IP addresses and use the dedicated server itself as a loadbalancer. I would use an installation of HAproxy which could balance the load to the aforementioned virtual servers.

My question is: Would this concept be more effective than just having a single install of the web and database server on the dedicated host? If so, how does that happen? If not, what could I do to scale my software to use the machine as good as possible? The software I am using for web and database are Apache2 and MySQL Server.

The new dedicated server which I am talking about would have the following specs:

  • Intel Xeon E3-1265L
  • 32 GB DDR3 ECC RAM
  • 2x 300 GB SAS 10k RPM HDD's in Hardware RAID 1
  • 100 MBit/s Dedicated Bandwith / 10 GBit/s Switchport

I am interested in your thoughts and ideas about my fast-written concept. To avoid some "bad" comments: I am not unexperienced in server administration, but scaling to such big hardware is pretty new for me, so please don't be too angry if this idea is just stupid.

ceejayoz
  • 32,910
  • 7
  • 82
  • 106
Niklas S.
  • 167
  • 7
  • 1
    If you have only one physical server, it is the single point of failure whether you use virtualization on it or not. – jscott Nov 03 '15 at 12:58
  • I am aware of that, of course. To be clear: I am not talking about high availability in this scenario, just about using the hardware as good as possible. For high availability, I already have an existing solution which will be integrated with the new servers. – Niklas S. Nov 03 '15 at 13:00
  • 2
    I guess I'm confused as to why you bought a server before you had a plan on how you were going to use it. That's a bit like putting the cart before the horse. – joeqwerty Nov 03 '15 at 14:52
  • My plans where pretty precise until yesterday night when I had the idea that I was writing about in my OP. I am just evaluating alternatives to my current plans. – Niklas S. Nov 03 '15 at 17:04

1 Answers1

2

No. It wouldn't. Virtualization always adds overhead compared to installing say Apache and MySQL on the host.

In my experience Nginx is far more efficient with its worker processes than Apache, so if you want to make the most of that setup, I'd just install Nginx and a performant MySQL fork like Percona. No VMs needed here.

You could still put HAproxy in front of it for some prod/dev testing, or to run both Nginx and Apache if you so wish.

JayMcTee
  • 3,923
  • 1
  • 13
  • 22