1

i've a web server in a DMZ reachable from 2 different public static ip addresses provided by 2 different internet connection by 2 different ISPs.

I want to create a record let's say "myserver.contoso.com" that load balance the two ip in normal situation (round robin).

The main goal however is that the server is still reachable if one internet uplink (so one public static ip) goes down.

What can i do to achive this?

UPDATE FYI: I created a dns record "pippo.disney.com" with 2 record "A" with TTL 5 minutes and everything works great! I hope this may be useful for someone in the future :) Thank you!

eldblz
  • 385
  • 2
  • 11
  • 21

2 Answers2

2

You can create two A records, each set to one of the two public IPs for the site. Although, this won't prevent clients from caching (and trying to access) one of the records if the one ISP is down.

Dependent on the client platform, clients will cache both records and hit the first record the first time, then the second, then the first, and so on.

Some clients will rotate between the records per connection, and some will tend to use the first address received.

HostBits
  • 11,796
  • 1
  • 25
  • 39
  • What about fault tolerance? Is there a better way to do it? – eldblz Oct 20 '12 at 09:54
  • well the cheap way would be to keep your TTL on the A records to a smaller time frame. You could then remove the A record for the downed link (if it will be down longer than your TTL). For automated fault tolerance you would need something like a global load balancer. – HostBits Oct 20 '12 at 12:58
0

Just add two A records for your hostname, one for each IP. I think it will rotate them by default, but it depends on the DNS provider.

You can configure BIND to not rotate them, but I'm not sure how that is handled on cached lookup (from a persons local DNS server).

However, in real life scenarios I think this is of no concern. I think that modern browsers will try the next lookup if the first connection failed, giving you a form of redundancy on a browser level. It will probably also cache this.

jishi
  • 868
  • 2
  • 11
  • 25