Howdy, Stranger!

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

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Any "standby" backup solution for LEB?

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 example.com 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 example.com. 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

A list of VPS Providers with their Data Center information: vpsdb.net

Comments

  • TazTaz Disabled

    Round robin DNS setup / auto fail over.

    Time is good and also bad. Life is short and that is sad. Dont worry be happy thats my style. No matter what happens i won't lose my smile!

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

    +1.

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

    Internap VPS, Web Hosting and more - Cloud Shards | Need a VPS Upgrade?
    Query Foundry, LLC AS62638
  • 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?

    A list of VPS Providers with their Data Center information: vpsdb.net

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

    "We are in a prison drama. This is like The Shawshank Redemption, only with more tunneling through shit and no fucking redemption."
  • 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.

  • 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...

    Selling multiple 2000-user GApps :) Shoot me a message to make an offer.

  • KuJoeKuJoe Member
    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?

    A list of VPS Providers with their Data Center information: vpsdb.net

  • 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.

    A list of VPS Providers with their Data Center information: vpsdb.net

  • @Raymii also had an interesting setup IIRC

    I use http://tuxlite.com to configure all my VPSes and I love it!

  • @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 db.domain.eu, 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.

    Quis custodiet ipsos custodes?
    http://raymii.org - http://sparklingnetwork.nl - Need a VPS Control Panel? http://z1s.org/ - Need a VPS that doesn't suck? https://www.digitalocean.com/?refcode=7435ae6b8212
    Thanked by 1ElliotJ
  • What site is so popular @raymii?

    I use http://tuxlite.com to configure all my VPSes and I love it!

  • Found an interesting article here: http://www.tuxz.net/blog/archives/2012/09/25/high_availability_-_automated_origin_failover_usin/

    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?

    A list of VPS Providers with their Data Center information: vpsdb.net

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

    Selling multiple 2000-user GApps :) Shoot me a message to make an offer.

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

    pr0n

    Quis custodiet ipsos custodes?
    http://raymii.org - http://sparklingnetwork.nl - Need a VPS Control Panel? http://z1s.org/ - Need a VPS that doesn't suck? https://www.digitalocean.com/?refcode=7435ae6b8212
  • @raymii PM me the link :p

    I use http://tuxlite.com to configure all my VPSes and I love it!

Sign In or Register to comment.