DNS manager - several A Records - same host - different IP

Hello,

Let's say that I enter several A records with different IPs but same host name:

(1) do I get load balancing between the different IPS?

(2) Is is a decent way to implement failover between datacenters?

thanks

8 Replies

As far as failover goes, I would say no, because it may as well relay one of your IPs that is down.

Adding multiple IPs to the same host, I'm not sure that's even rfc compliant, but I'm no authority on that, so I don't know.

If a hostname has multiple IP addresses assigned to it, the DNS server will hand out a list of all of them (up to a certain limit), but not always in the same order. Clients usually only care about the first IP address in the list, so different clients end up connecting to different IP addresses. It's a basic form of load balancing.

As for failover, no, it doesn't work. Suppose you assign 3 IP addresses to a hostname. And one of those servers goes down. Unless you remove that server from the DNS asap, approximately one third of your visitors will keep trying to connect to the server that is down. Some browsers will try another IP address if the first connection attempt times out, but that usually takes 30-60 seconds so the visitor will probably just quit.

The DNS can be controlled using the Linode API, though. So you could write a script that monitors your servers and automatically changes the DNS if one of them goes down. But even with the lowest TTL value, some of your users will still see ~10 minutes of downtime.

Linode gives you automatic IP failover, by the way. Try it.

@hybinet:

Linode gives you automatic IP failover, by the way. Try it.
In the same datacenter, and not 100% automatic. A watchdog has to notice the other has gone down, and instruct our infrastructure to move the IP to the new Linode with gratuitous ARP.

The Linode's DNS manager refreshes every 15 minutes; why 15 minutes? why not every minute for instance?

@jcr:

The Linode's DNS manager refreshes every 15 minutes; why 15 minutes? why not every minute for instance?
I've never felt that the DNS is the appropriate place to configure failover. Load balancing, maybe (there's better ways to do that too), but not failover. There are numerous problems with doing so. The biggest one is probably resolver caches, as has already been covered in this thread. The DNS itself isn't really designed to be a high-speed update process.

That said, there's a few technical reasons the DNS manager regenerates on the schedule that it does.

> I've never felt that the DNS is the appropriate place to configure failover.

How could I move all the traffic from my linode in Newark to my linode in Dallas when the Newark's datacenter becomes unresponsive without using DNS?

Linode is such a good service but this issue of failover between datacenters is bugging me!

Could you elaborate on those technical reasons that make the schedule the way it is? Thanks

@jcr:

The Linode's DNS manager refreshes every 15 minutes; why 15 minutes? why not every minute for instance?

My experience, from back when I ran DNS servers:

There's 96 15-minute intervals in a day, so generating a meaningful serial number for the SOA becomes a simple and stateless affair: YYYYMMDDXX, where XX is the number of minutes since midnight integer-divided by 15.

Plus, the zone regeneration process can take some number of minutes as it is.

So, when are those pesky HTTP folks going to start supporting SRV records? :-)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct