[geeks] Remote Failover
Sridhar Ayengar
ploopster at gmail.com
Wed May 21 15:11:57 CDT 2008
Lionel Peterson wrote:
>> From: Sridhar Ayengar <ploopster at gmail.com> Date: 2008/05/20 Tue AM
>> 11:47:43 EDT To: The Geeks List <geeks at sunhelp.org> Subject:
>> [geeks] Remote Failover
>
>> Anyone have a pointer to where I might find some information about
>> configuring a pair of Apache servers and a DNS infrastructure to
>> perform remote web server failover?
>>
>> I'd like it to happen something like:
>>
>> 1. One of the web servers notices that another is down.
>>
>> 2. The web server that noticed the error sends a message to the DNS
>> server updating the "www" CNAME to remove the downed machine.
>>
>> 3. The downed machine comes back up and notices that it is no
>> longer in the DNS round-robin so it sends a message to the DNS
>> server to add itself back into the "www" CNAME.
>>
>> Of course, I could write code (or even shell scripts) to do all of
>> this, but I'd rather not reinvent the wheel if there is a solution
>> already available.
>
> I'm asking because I don't know:
>
> You set up two servers, one at 10.0.0.1 and another at 10.0.0.2[0],
> and point a public DNS record at 10.0.0.1.
>
> I browse your web site, and I get a record for 10.0.0.1 and I cache
> that locally.
>
> Then your first web server goes down, and you update public DNS to
> point to 10.0.0.2.
>
> If I return to your site and my cached DNS record has not expired,
> will my browser find your new IP address for your server? Will it
> only become available once my cached DNS records expire and I query
> the public DNS servers and retrieve your new IP address for the
> second server?
>
> Again, I ask because I don't know, and I'm not sure how to find the
> answer without reading a *ton* of material...
Well, the kicker is that the way DNS is *supposed* to work is that you
cache my DNS information for as long as I've *told* you to cache it.
That's what the TTL field in my DNS record is for. If I set a TTL for 5
seconds, the way it *should* work, according to the standards, is that
if you try to connect to my web server a second time, and five seconds
have passed, you will need to refer back to an authoritative DNS server
for my zone.
How it's supposed to work, and how it works when big crappy ISPs ignore
the standards are two different thing though. Der Mouse mentioned that
it was his opinion that anyone who purposely breaks the DNS standard
doesn't deserve to see the web site at all. I tend to agree with him,
but I don't know if my customer will.
Peace... Sridhar
More information about the geeks
mailing list