It looks like you're new here. If you want to get involved, click one of these buttons!
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
Comments
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!
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks+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?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksHi, 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.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWouldn'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
ExploreLinux.com - mojeda.com - Server Status
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksThanks a lot...any recommendation for a good round robin dns and load balancer software/solution on LEB?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksRage4 can do this as well, IIRC. Uptime checking by UptimeRobot.
how did this get here i am not good with computer
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI 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.
LiquidHost - https://liquid-solutions.biz
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksDNSMadeEasy's DNS Failover + very low TTL = EXCELLENT.
-->FREE cPanel Hosting<--</a>
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksNot every DNS resolvers respects TTL's...
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI'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.
-->FREE cPanel Hosting<--</a>
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@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.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksFor 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?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@CoolMoon - from DNS point of view it doesn't matter
Rage4 DNS - Anycast, GeoDNS, failover, vanity NS and more
Follow us on Facebook, Twitter, Google+ or Linkedin
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI 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.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Raymii also had an interesting setup IIRC
I use http://tuxlite.com to configure all my VPSes and I love it!
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@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?
Raymii.org - About Me - Need a VPS Control Panel? - Need a VPS that doesn't suck?
@joepie91 said: I have always been a pain in the ass about the security for pretty much anything, and will continue to do so here. -
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhat site is so popular @raymii?
I use http://tuxlite.com to configure all my VPSes and I love it!
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksFound 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?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksYou can use PHP, Perl, or maybe Bash to do that too... I guess :P
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankspr0n
Quis custodiet ipsos custodes?
Raymii.org - About Me - Need a VPS Control Panel? - Need a VPS that doesn't suck?
@joepie91 said: I have always been a pain in the ass about the security for pretty much anything, and will continue to do so here. -
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@raymii PM me the link :p
I use http://tuxlite.com to configure all my VPSes and I love it!
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks