Link to home
Start Free TrialLog in
Avatar of Jan Vojtech Vanicek
Jan Vojtech VanicekFlag for Czechia

asked on

Multiple DNS A records for HTTP Failover

Hi experts,
Im planning a multi-location Webserver cluster. I test how the browsers are handling multiple A records.

Test configuration was:
four A records to different IP addresses, only one was IP of a working webserver.

I used a Wireshark to see what is going on and there are the results from Windows 10 machine:
IE and Edge takes 7 seconds timeout for each A record. in the worse case when the A record of working webserver is on the last tried IP opening of page takes 21 seconds.

In Chrome and FireFox, each try takes 21 seconds, so worst case takes 63 seconds to open a page.

Once the page was opened, all browsers are holding the working IP so after initial connection it is fast, as usual.

Is there any other method that is faster on failover?
Avatar of weifai
weifai

Were the other hosts up and just without the webserver, or totally down?

In case they were down, was there the router to tell "no route to host" via ICMP quickly? Default ARP expiration is 20 minutes, AFAIK, maybe it makes sense to lower that on the router in front of the servers.
Avatar of Jan Vojtech Vanicek

ASKER

Since I want it for failover, lets assume the servers are completely down or disconnected.
See my last edits regarding router's ARP. With quicker ARP expire, the router will start to report "no route to host" sooner after the server failure.
The server is in datacenter network. I do not have access to any router on the path from NIC of my server to NIC of server.
Then it's little you can do. If there's no response whatsoever about the failed server, the only resort is the dumb timeout.
Avatar of Aard Vark
Is there any other method that is faster on failover?
Round robin DNS isn't really an acceptable fail over solution. It is basically a basic very dumb load balancing solution to quickly distribute load. Even then its just dumb load distribution because it is not monitoring existing connections or anything like that. You want a proper load balance solution (F5, AWS ELB's, etc.). Some DNS providers give you built in load balancing with health checks and will drop an IP from the round robin pool or stop serving it up if a host goes down.
The only thing that I cannot accept is the delay in browser. If browsers handle more As more rapidly, everytihng else would be good enough. Because each client will be locked to one server - once the correct IP is resolved, browser is not resolving again.

@weifai: thank you for ARP thoughts, maybe I can negotiate it with my datacenter provider, but what if they lost connectivity? So ARP response cannot be guaranteed.

@Learnctx: ok, load balancer would be nice solution, but how it is with multiple geographically separated locations? How it is working when load balancer lost connectivity?

Best solution for now is get some DNS provider with API and set low TTL on A records. Then monitor servers statutes and accordingly changes the zone file. If that functionality would be outsourced by DNS provider, it would be nice, but I do not know any who are providing that functionality.
ok, load balancer would be nice solution, but how it is with multiple geographically separated locations? How it is working when load balancer lost connectivity?
Yes, you would need a DNS provider which offers a geographic solution. I know services like UltraDNS and DynDNS provide load balancing and monitoring services with their DNS products as well as geographic services like resolving to the closest available up server, and that kind of thing. I'm sure there are plenty of other services out there that do it too.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.