Please note: We can no longer offer additional IPv4 addresses for Cloud Servers due to the dwindling pool of addresses available for use. This article is preserved for legacy purposes, but for high availability we recommend our Cloud Load Balancers product until we can expand our IPv6 offerings.
A popular feature available at The Rackspace Cloud is the ability to have a failover IP 'shared' between Cloud Servers.
This article outlines what that means. Further articles will explain how to set this up on your server(s) to allow you to create a High Availability setup.
A standard Cloud Servers account may contain, typically, one or two Servers.
Let's take a look at one server and see how it might be setup to serve a simple website.
The owner installs a web server and creates a virtual host. After a few minutes of hair pulling, he remembers he needs to create a DNS zone for his domain. Once all that is done, he is very happy as he is now serving his website and all is well.
When a request for his domain comes in, the IP address for the domain is matched to his web server and the request is forwarded to the server. On receipt of the request, the web server (whether it is Apache or Nginx, etc) looks at it's virtual host files and then delivers the content for the domain.
Of course, it is slightly more complicated than that but the basics of the system are that simple.
Works well. Everyone is happy.
But what if there is a Cloud Server issue? Perhaps there is rogue process which uses all the resources, or the server has to be rebooted (even we have hardware issues on occasion!).
Once the Server is not available, the domain's website is not available. The same basic process is completed in that the IP address of the domain is matched to it, but nothing is delivered as the web server is not available.
Although not a common issue, this situation could cost you money and time repairing the Server while you have customers yelling at you.
This is where Failover IPs come in. You can actually 'share' an IP between two Servers so when one is not available the other takes over the IP address.
For this you need two Servers. Let's keep it simple and call one the 'Master' and one the 'Slave'.
The Master is setup just as described above (with a web server and virtual host or however you want the setup to be).
Next is the Slave. This is actually a mirror of the Master. We need it to be the same as it will take over the duties of the Master Server if the Master is not available for some reason.
The failover system is not automatic. You need to install an application to allow the failover to occur. There are a couple of ways of approaching this but we will use what is known as 'Heartbeat' for this (full details and instructions on how to install Heartbeat are in the next article).
Heartbeat runs on both the Master and Slave Servers. They chat away and keep an eye on each other. If the Master goes down, the Slave notices this and brings up the same IP address that the Master was using.
This ensures that even though the Master is down, the website will still be served - only this time from the Slave.
What this comes down to is creating a High Availability network with your Cloud Servers. Your site won't go down. It doesn't matter if one of the two servers is down as the other one will take over.
Most sites won't need this sort of High Availability setup (for a start you need a minimum of two Servers), but those sites that do often have a Load Balancing front end.
What that means is that a small server is used as the front end to a cluster of 'Application' Servers. All requests for the website come to the front end. That server then proxies the request to larger Servers running on the backend of the network.
These can be very large Servers running multiple mongrels (for example). Having four or five 4G Servers means a lot of power is available for the site. Often the database is also on another Server.
All these requests go through the front end Server.
Have you noted the issue here? It is the same as with the most basic Cloud Server setup. There is still a 'single point of failure'.
If the front end goes down then then whole site goes down. It doesn't matter that the multiple 4G servers are up and running; if the front end is not available, then the site is kaput.
In comes the failover IP system. You can have two 'front end' servers. If the main front end server goes down, the other one simply picks up where the main one left off.
Most sites would not really need this sort of failover IP setup.
However, for those that do need HIgh Availability, this system offers peace of mind. Not only that, it is very easy to setup.
The next article shows how to setup two Cloud Servers with failover IPs and Heartbeat.
The follow-up article is no longer available, but you can find information about using Heartbeat in the Linux-HA project's user guide.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License