LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: IPVS hosting on the Internet

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: IPVS hosting on the Internet
From: "Dr. Volker Jaenisch" <volker.jaenisch@xxxxxxxxx>
Date: Fri, 11 May 2007 21:55:44 +0200
Torsten Schlabach schrieb:
Hi Volker!

> If you give your domain e.g. yourdomain.com more than one IP e.g.
> Datacenter1 : IP = 123.123.123.1
> Datacenter2 : IP = 146.234.12.2
> the DNS performes a round robin loadbalancing on DNS -> IP resolving.

I have had that idea as well. But just help me understand what problem this solved and which it doesn't:

> The first time a webbrowser accesses yourdomain.com it will get the
> first IP
> and your customer lands in DC1. If the next webbrowser accesses
> yourdomain.com
> it will land in DC2. Next in DC1 and so on.

That will for sure distribute load. But if one of the DCs (or one of the servers) goes down, doesn't that mean that only every 2nd customer will see our site while every other customer will end up with a timeout?
Thats right. You will have to set the TTL of the domain record as short enought that you can
switch the DNS to only serve the DC that is still up.

We have made some testing on how long webbrowsers will cache the DNS information. It seems as that the DNS information is hold longer in the webbroser than the given TTL. So this gives hope to reduce the TTL to say 10 Seconds.

Now you will need a third instance that monitors your two DCs. If one of the DCs went down the monitoring instance have to modify the DNS entry.


We had also been asking ourselves if we could have a mechanism where the DNS servers will receive a heartbeat from the actual servers and just switch off A records for servers which are currently unavailable. But the problem with that is caching nameservers. AFAIK even if we would set the TTL on our nameservers to 10 minutes to make sure that a cached record for a server that died will expired after no more than 10 minutes, I understand for caching nameservers at any ISP they decide how long they will cache the record or not.
It would be a violation of the DNS if a ISP caches the domain entries longer as the TTL. Have you tested this? Our two big ISPs in germany respect the TTL set by the domain provider.

mira2:~# dig @195.50.140.250 inqbus.de


;; ANSWER SECTION:
inqbus.de.              300     IN      A       193.239.28.142

mira2:~# dig @195.50.140.250 inqbus.de

; <<>> DiG 9.2.4 <<>> @195.50.140.250 inqbus.de

;; ANSWER SECTION:
inqbus.de.              297     IN      A       193.239.28.142

As you see the TTL decreases on consequtive queries, as expected. The DNS server queried is a DNS server of the second largest ISP in germany.

Try it out. We have had to set the "minimum TTL" limit at our Domain to get this to work.
But the naming of this parameter may vary between the domain providers.

One idea: Setup an arbitrary domain with two IPs. I will test your setup from germany. Maybe others on this list will support this testing and we may discover if this IP RR thingy works worldwide over a broad variety of ISPs or not.

Best regards

Volker

--
====================================================
  inqbus it-consulting      +49 ( 341 )  5643800
  Dr.  Volker Jaenisch      http://www.inqbus.de
  Herloßsohnstr.    12      0 4 1 5 5    Leipzig
  N  O  T -  F Ä L L E      +49 ( 170 )  3113748
====================================================


<Prev in Thread] Current Thread [Next in Thread>