Here is how I did it once. It works, although far from perfect...
- suppose you have 3 different servers, www1.domain.com, www2.domain.com
and www3.domain.com;
doesn't matter where they are.
- instal a DNS server on each one of them, with only one primary zone
for "www.domain.com", with the apropriate "SOA"'s and stuff and include:
        60 IN CNAME www[1,2,3].domain.com.
                ; meaning "I am www.domain.com", with TTL one minute
  (I used "A" records instead of "CNAME" on my setup, but I figure it
should work)
- on your primary DNS for "domain.com" add:
        www     IN      NS      www1.domain.com.
        www     IN      NS      www2.domain.com.
        www     IN      NS      www3.domain.com.

The result? Well, it looks kind of weird, but what you'll get is quite
efective round robin with fault tolerance. Suppose "www1" goes down;
clients trying to reach "www.domain.com" won't be able to get a "A"
record for "www.domain.com" from "www1" and will try the next NS. When
the server comes up again, it will start answering "www.domain.com"
queries again and it will enter the server pool. Round-robin is done at
the DNS's for "domain.com" for the "NS" record for "www.domain.com".
This only works for "host down" or "destination unreachable", not
"service down" or "server error". There is a delay whenever one of the
hosts goes down (or up) until the client switches to another, but you
can tweak that using a lower TTL value.

Hope it helps

Webmaster wrote:
> 
> To all,
> Please apply some of your gray matter to my problem :)
> 
> Scenario, different locations, different companies managing a T1 into each
> location.  Main web server sits at one location, back-up at another.  No
> connection between each machine other than the T1 to the internet.
> 
> Round Robin makes 50% of hits go to each web server.  But if one is
> unavailable, 50% of folks get can't reach the host. Not acceptable.
> 
> Question: How do I have packets go to main web server, then if main web
> server is un-reachable (for any reason) the packets are automatically routed
> to the back-up machine? (Which is up 24/7 waiting)
> 
> This is pretty urgent, and help/guidance/flames would be appreciated
> greatly!

-- 
Rui Pedro Bernardino / Av. Miguel Bombarda, 4, 8o / 1049-058 Lisboa /
Portugal 

life, n.:
        That brief interlude between nothingness and eternity.

S/MIME Cryptographic Signature

Reply via email to