This site is run out of a server that sits in my basement. I used to host my websites on a shared web host like GoDaddy, but after spending almost $100 a year and having very little control over my hosting service, I decided that I could run most of my sites from my home. Of course I don't get a lot of traffic so this is possible.
Recently however I started to attract some extra traffic here and there. Nothing major, maybe an extra 25-50 hits a day, but it got me thinking about what would happen if I happened to claw my way to the front page of Digg . A massive spike in traffic would most likely result in my site crashing. I can protect myself from this the best I can; tune apache, setup opt-caching, setup caching on Wordpress, and other modifications. Unfortunately, these can only help so much though when my server has a Sempron 2800+ with less than a GB of memory.
So I decided that something had to be done, I considered a few alternatives, but as I looked over the software and hardware landscape, I decided to focus on virtualization. I decided to purchase some additional memory and setup a Xen hypervisor. There are several benefits to this.
- If my server was brought to it's knees, I am be able to ssh into my system and hard reboot remotely.
- Improved security as I currently run numerous services on my server. I can isolate my internal services from the external services.
- I can setup monitoring, and receive alerts if a service or host fails. Without Xen, if my host failed I wouldn't receive alerts as the monitoring system was down.
- A great learning opportunity and a chance to write about it.
- It makes sense financially. I spent $50 on memory, which is cheaper than most hosting programs.
For those of you who don't know, Xen is a virtualization technology that allows you to host "Guest" operating systems on a single piece of hardware. You have your initial OS that you boot into as you normally would, then you can boot additional systems on top of the original system that independently. These systems are fully operational and can do pretty much anything a non Guest OS can do. The systems share the available hardware resources but the performance hit is minimal.
Throughout the next few weeks I will be putting up a series of posts that will describe the steps it takes to create what in my opinion is the ultimate Linux server.