LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: granularity/balancing issue with a small number of client IPs

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: granularity/balancing issue with a small number of client IPs
From: Stefan Schmidt <zaphodb--lvs-users@xxxxxxxxxxx>
Date: Thu, 16 Nov 2006 17:01:36 +0100
On Wed, Nov 15, 2006 at 11:09:43AM -0800, Joseph Mack NA3T wrote:
> >Hi there,
> >i have a problem loadbalancing DNS udp/53 via LVS DR.
> >Whenever i have a small number of clients, in the example below it is DNS
> >realtime blackhole lists used by 10 mailservers.
> >Redundancy is working fine but granularity seems to be an issue and there 
> >is
> >times when i end up with something like this:
> >#ipvsadm --list --rate --numeric
> >UDP  1.2.3.4:53                          0     1889        0   173253      
> >0
> > -> 10.1.53.15:53                       0        0        0       18       
> > 0
> > -> 10.1.53.9:53                        0     1889        0   173235       
> > 0
> 
> I don't know, but I thought I'd pop up and say something as 
> I expect the answer isn't well known. This used to work in 
> the early days.
> 
> UDP schedules by packet (or small groups of packets). The 
> only thing I can think of is that the director sees all your 
> clients as being the one client. However I notice your 
> persistence_granularity is one machine, so that shouldn't be 
> a problem. Does the persistence_granularity actually get to 
> the director? (I don't know where it goes - do you see it in 
> the output of ipvsadm, is it in /proc somewhere?).

Yes i found the ipvsadm --list --persistent-conn command which shows
UDP  1.2.3.4 wrr
  -> 10.1.53.15:domain            1         2           0          6         
  -> 10.1.53.9:domain             1         1           0          17        

i think that explains a lot.

UDP  1.2.3.4:53                   0     1676        0   153676        0
  -> 10.1.53.15:53                       0        0        0       30        0
  -> 10.1.53.9:53                        0     1676        0   153646        0

It does additionally show the persistence template timeout when configured so
keepalived actually gets it in the kernel.

What i don't get is why this is listed as one persistent connection.
All i can gather from documentation is that default granularity is
255.255.255.255 which is per client.
I noticed is that as all our mailservers are running a local BIND process to
forward those RBL questions to us and apparently they tend to use the same
outgoing port when (re)started close to each other.
In the short tcpdump i did i ended up with 7 of 11 total IPs with the same
src port but this should give 11 persistent connections not just 1 right?

Does anybody know any way to totally get rid of persistence? 
(I don't really want to munch around in the source doing things i only get
half the truth of. ;-)

> >I noticed there apparently are some slewing algorythms 
> >doing things like a slow start whenever i add a realserver 
> >but i never stumbled over any documentation, can you give 
> >me a hint on where to look for this?
> 
> It's in the HOWTO as slow start and thundering herd. I 
> thought it was in the code from the early days, but 
> apparently it wasn't and I was mistaken. It's been talked 
> about enough now that I can't remember if it ever went in or 
> not.

Well from what i am seeing it is definitely in now.

        Stefan
-- 
panic ("No CPUs found. System halted.\n");
2.4.3 linux/arch/parisc/kernel/setup.c 

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