Hosting site on 2 servers

Senna

Verified User
Joined
Feb 12, 2004
Messages
10
I have a server with DA. I use this server as nameserver for account on this server and on another shared server I rent elswhere. I have 2 IP´s and ns1 & ns2 are both directing to this server.

What I want now is to host a site on this DA server, and if this server is out of order (what seldom but sometimes happens), that my shared server takes over (so I will have 2 identical sites, one on DA and one on the Shared server).

In that case I will have a good chance on 100% uptime. The mail is hosted (mx-records: mail, fallback 1 en fallback 2) on other servers.

What are the settings I should add/delete, etc. Or do I need to use another nameserver.

Thanks for your help.

Marc
 
Hello,

I don't think that named supports dynamic backup IPs.. but it does support round robin. You won't be able to have it check for one server being down to change the A records.

You can add a duplicate dns zone on the other server and in both zones add the new namesever as another NS option (and add the A record for the new server and register it at your registrar). But again, it wouldn't fall back and use different IPs as I don't think NS's have priorities like MX records do.

John
 
If you main server is down (NS), your sites won't resolve so the second site would be mostly pointless.

If you were running DNS on both machines (as ns1, ns2), you could have each machine point to itself for that site.

Example
Code:
ns1=127.0.0.2 and [url]www.site.com[/url] = 127.0.0.2
ns2=127.1.1.3 and [url]www.site.com[/url] = 127.1.1.3

That way, whichever NS they hit, they will get the site on that machine. This would also send people to the closest (network wise) server to them since the answer is taken from the NS that responds first.
 
This works. And we do it.

But if you do this you'd better have a short TTL (we use ten minutes) or all the nameservers that have already cached the DNS of the server that failed will continue to return that IP for the duration of the cache time, which by default is usually 24 hours.

And of course there are ISPs (AOL [but then they're not really an ISP, are they?] comes to mind) who ignore TTLs, and their customers won't see the site on the other server until their own cache ttl expires.

And of course anyone who was looking at the site and not closed their browser since won't be able to see the site until they do, since browser caches, like true love and diamonds, are forever.

But it's the best solution out there (at least as good as those $30,000 high availability solutions some vendors sell)

So we do use it.

Jeff
 
Back
Top