Two masters for failover web server?

Barry Margolin barmar at genuity.net
Tue Mar 26 15:42:44 UTC 2002


In article <a7pmju$r0 at pub3.rc.vix.com>,
Erik Wheeler  <020430 at wheeler.com> wrote:
>I'm looking to set up a failover web server, and I'm wondering about doing 
>the following.
>
>Host1 would be the main web server, and Host2 would be a mirror of Host1.
>Host1 would also be the primary nameserver, and Host2 would have the same 
>zone file as Host1, and be configured as a master server.

Presumably Host2 won't actually have the same zone file as Host1.  They'll
differ in the addresses of www.<domain>, so that they each point to each
other.

>So if Host1 goes down, the secondary nameserver will take over, and point 
>web requests to itself.

It should work, as long as you realize that when both servers are up,
they'll *both* be used, since you can't control the order that DNS servers
are queried.  So you should get load sharing when both servers are running,
and failover when one dies.

You'll need to set your TTLs low so that failover occurs quickly.  This
means that the DNS load on your servers will be higher.  But unless it's a
really popular web site, it probably won't be a noticeable load increase.

>Is this kosher? Or am I going to pollute the nameservers of the world and 
>crash the internet, thereby ending life as we know it? I searched for info 
>on a setup such as this, but didn't find much.

That's funny, because we get the same question here at least once a week.
Where did you search?

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list