Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Any "standby" backup solution for LEB?
New on LowEndTalk? Please Register and read our Community Rules.

Any "standby" backup solution for LEB?

CoolMoonCoolMoon Member
edited September 2012 in General

Let's say I have one LEB in US and another one in UK. And I would like to host my website on them.

My goal is simply like this: if either vps is down, users can be re-directed to the other one automatically. i.e. they can still type the same address in their browsers.

I am not looking for a performance improvement solution by directing the users to the closest/best server like CDN does, just want an automatic standby backup solution on low end vpses to achieve almost 100% uptime.

Is it possible? Can anyone point me to the right direction? Thanks


  • Round robin DNS setup / auto fail over.

  • @Taz_NinjaHawk said: Round robin DNS setup / auto fail over.


    That's the way to go. The more complicated solutions just add in geo ip and other stuff.

  • Hi, The easiest way of achieving this would be dnsmadeeasy's failover service, which will redirect your visitors given that they are using nameservers that respect low ttl. Dnsmadeeasy consts tly monitors your primary ip and switches once the primary is unreachable. You can set ttls as low as 60-90 seconds, however google public dns for instance will only accept 180 seconds as i recall.

    Another option would be to run two small loadbalancers in front using haproxy to monitor the main servers. With this setup you can achieve almost realtime failover however you loadbalancers would require a floating ip (if one goes down the other takes over). As such they need to be located in the same dc (corrrect me if im wrong), and you would build in the same type of problem (single point of failure) as you're trying to overcome.

  • mojedamojeda Member
    edited September 2012

    Wouldn't you want a load balancer vs a round robin DNS? If you have a round robin dns setup, clients could be caching the servers, even the ones that are down.

    If users are having to go through a load balancer you wouldn't have to deal with that, as you could set it up to remove the server that goes down and only serve traffic to the server(s) that are up, and that would be instant.

    Edit: Seems I've been ninja'd

  • Thanks a lot...any recommendation for a good round robin dns and load balancer software/solution on LEB?

  • Rage4 can do this as well, IIRC. Uptime checking by UptimeRobot.

  • AlexBarakovAlexBarakov Patron Provider, Veteran

    I achieve this by load balancing. I do not find a round robin dns to be suitable fr high-availability operation. On the other side, I can always load balance the load balancers through DNS.

  • KuJoeKuJoe Member, Host Rep

    DNSMadeEasy's DNS Failover + very low TTL = EXCELLENT.

    Thanked by 2Ash_Hawkridge klikli
  • @KuJoe said: DNSMadeEasy's DNS Failover + very low TTL = EXCELLENT.

    Not every DNS resolvers respects TTL's...

  • KuJoeKuJoe Member, Host Rep
    edited September 2012

    @klikli said: Not every DNS resolvers respects TTL's...

    I've never had any complaints nor have I ever encountered an ISP that didn't. If a user is using a DNS resolver that doesn't respect TTLs they can always change it to one that does.

    Either way, for a $6.65 a month, it's better than any other solution I've seen and near 100% uptime.

  • bdtechbdtech Member
    edited September 2012

    @mojeda Modern browsers (chrome, IE 9/10, etc) will try the second IP if the first is down. So round robin works better than most would expect.

  • For these LEBs, do they have to be exactly the same in term of setting?

    If one has apache and another uses nginx while some others are lighttpd...does that work for dns failover or load balance?

  • gbshousegbshouse Member, Host Rep

    @CoolMoon - from DNS point of view it doesn't matter

  • I looked into the DNS round robin stuff but it seems not exactly what I want.

    By setting up the DNS round robin, my understanding is that, (ideally) the load will be evenly distributed between different servers. However, what I would like to achieve is that, if server A is up and normal, all the traffic should still go to server A, the server B only kicks in when server A is down or way too busy to handle the requests.

  • @Raymii also had an interesting setup IIRC

  • @djvdorp Correct. I use round-robin DNS and now 9 servers (vps). They all use lighttpd, are deployed either with chef or ansible, and share the /var/www folder either via glusterfs or the /var/www folder gets updated via rsync.

    The lighttpd configs are the same (rewrite rules). My website is in a git repo, and when I update the "deploy" branch, it has a post-receive hook which updated one of the "master" nodes, (as in, checkout the /var/www/ folder which is a git repo), starts the rsync to the non-gluster nodes and updates the git.php file. (that is the "website version" you see on my website, down below).

    I also do this for a big drupal site I manage, it runs on 5 big VPS servers, 2 of which are mysql with master-master and heartbeat. The /var/www/ folder is glusterfs, and the webservers are apache (on 8080) + nginx with static caching as frontend. Site has about 2 million hits/month, gets doxed once a month and the servers do "meh, is that all you got?". Drupal handles this synced webroot very well, and since the database is just mysql, works fine also. (drupal connects to, that is a round-robin dns to one of the 2 virtual IP's which auto failover if one of the db nodes is unreachable). Has happend 2 times, auto failover worked fine, and getting the replication working again was a bit more hassle.

    So, tl;dr, round robin + gluster = awesome.

    Thanked by 1ElliotJ
  • What site is so popular @raymii?

  • Found an interesting article here:

    Basically it uses nagios to monitor the site's status. If current server is down, it changes the dns record of that domain to another server's ip by cloudflare's api.

    Is nagios easy to implement on a vps? or any alternatives?

  • You can use PHP, Perl, or maybe Bash to do that too... I guess :P

  • @djvdorp said: What site is so popular @raymii?


  • @raymii PM me the link :p

Sign In or Register to comment.