Howdy, Stranger!

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


Server Fail-over - DNS Based
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Server Fail-over - DNS Based

Hi Guys,

I am looking into implementing a corss DC fail over solution for one of my setup. It's needed for one kind of services that setup is offering. I am trying to keep it simple but still have redundancy in case the main server fails (for whatever reason).

I actually want an Active-Passive setup. (the Passive setup kicks in if Active goes down)

I know there are various solutions and limitations of DNS Based failover (mainly IP cache on the ISP end).
If the there is a proxy IP running in-front of the main server IP, it will be the ideal solution.

I was looking into dnsmadeeasy.com or cloudns.net but their failover will take few minutes. (And then ISP Cache may take more time)
CloudFlare also seems to have that option but reading more into it, it looks more like Active-Actrive solution (aka Load Balancing)

Do you have any suggestions / any recommendations about achieving this kind of redundancy?? With minimal downtime (lets say 1 min/2 minutes)

The servers provider is pretty solid and I have zero downtime so far but shit can happen anytime. (You never know).

What would be ideal solution for Active-Passive server setup ??
Or should I take the bait and use CloudFlare Active-active solution ?? (The benefit of running it being CloudFlare is their Proxy IP being used instead of server's IPs and no DNS propagation delay).

Thanks for your insight.

Comments

  • No one has anything to say on this ?? :/

  • quanhua92quanhua92 Member
    edited October 2023

    Cloudflare Load Balancer has option to turn of Traffic Steering. see this link https://developers.cloudflare.com/load-balancing/load-balancers/create-load-balancer/

    If you turn off that steering then it is active passive mode. ISP will cache the IP of Cloudflare node so it doesn't matter if your server is down or not.

    If you don't want to use Cloudflare for any reason then DNS based is the next choice. To avoid the ISP cache, you can setup 2-3 HAProxy servers in front of your web server. You can set multiple A records to each IP and the browser can select another IP if the first one fails. You can configure those HAProxy to route traffic in active passive mode with ease.

    Another option is to use Floating IP feature so that you can switch that IP from the down node to active node.

    Thanked by 1Umair
  • DooDoo Member

    I've implemented failover for my personal blog by putting multiple backends behind 2 load-balancer IPs(to check the availability of the backends and to choose the best one based on some rules I've set) and setting one load-balancer as active, the other backup. I use failover-check DNS to monitor the two load-balancers, when the active one is down, the backup will be up.

    Thanked by 2abtdw Umair
  • gDNSd - If you want already compiled versions, with a setup script, DM me.

    Thanked by 1ariq01
  • @quanhua92 said:
    Cloudflare Load Balancer has option to turn of Traffic Steering. see this link https://developers.cloudflare.com/load-balancing/load-balancers/create-load-balancer/

    If you turn off that steering then it is active passive mode. ISP will cache the IP of Cloudflare node so it doesn't matter if your server is down or not.

    I am already look into it. CF seems to be a much better options (the reason your outgoing IP will be a proxy IP from CF and there is no TTL issue at ISP end)

    I was asking if there is any other solution / provider that you guys think would work better than CF.

  • gbshousegbshouse Member, Host Rep

    Yeah, we offer it with higher plans. Feel free to test it free of charge for one month.

  • I have used Cloudflare Load Balancers in a few cases with clusters on prem and I couldn't set up the usual haproxy+keepalived due to lack of floating IPs. CF load balancing service is pretty good and quite cheap, I really like how it works. You can have health checks very frequently from several locations and it just works.

  • check AWS Route53

  • Daniel15Daniel15 Veteran
    edited October 2023

    It's probably easiest to use a provider with floating IPs and have some automation that attaches the floating IP to the secondary server when you detect that the first server is down. That means the IP won't change so there's no need to update DNS.

    You can do this with DNS, but it means you need a very low TTL (like 1 minute) which will significantly increase traffic to your DNS server, and make page loads slower since the DNS records will effectively never be cached.

    Thanked by 1quicksilver03
  • @Daniel15 said: It's probably easiest to use a provider with floating IPs and have some automation that attaches the floating IP to the secondary server when you detect that the first server is down. That means the IP won't change so there's no need to update DNS.

    Would this work across providers? I'm not sure if IPs can float across providers. E.g. I have a Vultr VPS IP that I want to float to a GreenCloud VPS if I detect that the Vultr VPS is down.

  • Daniel15Daniel15 Veteran
    edited October 2023

    @repoxide said:

    @Daniel15 said: It's probably easiest to use a provider with floating IPs and have some automation that attaches the floating IP to the secondary server when you detect that the first server is down. That means the IP won't change so there's no need to update DNS.

    Would this work across providers? I'm not sure if IPs can float across providers. E.g. I have a Vultr VPS IP that I want to float to a GreenCloud VPS if I detect that the Vultr VPS is down.

    Usually not, unless you own your IP space.

    To have failover across different providers with a fast failover time, you'd need one or more load balancers too, sitting between the user and the origin servers. The load balancer/s would do the failover. Ideally more than one load balancer, because otherwise you've just introduced a different single point of failure :).

    Or just give up on self-hosting it and just use Cloudflare :P

    If you're still interested in the DNS solution and want to self-host, PowerDNS allows instant failover using Lua records (https://doc.powerdns.com/authoritative/lua-records/) but again you're limited by the records's TTL plus how long client DNS servers keep the record in their cache (since they may potentially keep it for longer than the TTL)

Sign In or Register to comment.