Failover – What happens when your VPS goes down?

A lot of customers are realizing that having 1 single VPS is great, but if for some reason it goes down and crashes, customers are left wondering what happened.

Whilst rimuhosting monitor long term excessive CPU useage, it might be an hour before we realize a VPS has had an OOM error (out of memory) and by this stage they may already be loosing customers or similar.

A simple solution would be to have a spare VPS. You can use either rsync to sync the files and mysql replication (master/master is probably best in this case) to keep it as an exact match to the first one, this means a lot of configuration time, but 100% website uptime.

The other alternative would be having a low spec MiroVPS1 with a holding page. When you main VPS stops responding, then it fails over to the "this server is undergoing maintenance" page on the spare VPS, this can then email you or txt you to come deal with the problem. This is a much cheaper option, but you do need to be reachable for it to let you know things have broken. Probably the better option for the more budget concious.

As for failover, there are multiple methods on how to do this. Some people have 2 VPS on the same hosts server so they can use heartbeat software to do this. This can work however if the host server itself is having the problem and perhaps being rebooted, or there is a network problem its not going to work.

At about this point in time i will point to pingability.com , which is also run by rimuhosting. This site monitors your server for free, doing various checks from mutiliple places to make sure its going. If its down for whatever reason, it can update your DNS if hosted at rimuhosting and repoint it to the secondary VPS. If your TTL on DNS is low, this is pretty instantaneous. Pingability can check every 15 minutes for free, or if you want checking more often a small fee. It also can send SMS and email alerts if its down.

Another alternative to http://www.pingability.com">pingability is setting up your own monitoring from the secondary VPS itself, then using the rimuhosting API you can update the DNS records yourself.

Yet another 3rd option is using some other external service to monitor and call the API DNS updates.

Here is a quick an dirty way of changing a DNS record via the API and curl

/usr/bin/curl --data "api_key=gobblegobblegobble&action=SET&name=www.domain.com&type=A&value=74.50.50.221" https://rimuhosting.com/dns/dyndns.jsp

Syntax for that would be here https://rimuhosting.com/dns/dyndns.jsp

Now all you need to do is to choose your method and set it up!

This entry was posted in Rimuhosting and tagged , , , , , , , , , , , , . Bookmark the permalink.

Comments are closed.