LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: maxconns per real server

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: maxconns per real server
Cc: Roberto Nibali <ratz@xxxxxx>, Benoit Gaussen <ben@xxxxxxxxxx>
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Wed, 3 Jul 2002 22:30:46 +0800 (CST)
Hello,

On Tue, 2 Jul 2002, Julian Anastasov wrote:

> > >         Once Wensong mentioned about modifying the user space
> > > structures and separating them. May be such features can
> > > use their own setsockopt command to modify the kernel
> > > structures without creating problems for the other libipvs
> > > users. I.e. we have generic structure for working with the
> > > real/virtual servers and other extra structures for additional
> > > stuff which again modifies the kernel ones.
> >
> > Oh, and how would you disable the feature? I mean it would be
> > nice to do it with a setsockopt because then the ifdef would
> > be gone. But then we have the a test like
> 
>       The feature is disabled by default because the l_thresh and
> u_thresh fields will be always present in the kernel structure
> but there will be different user space structures for editing
> a RS. Think for it like your patch is applied to the kernel
> without any ifdefs but the user space struct is not touched. It
> contains only the basic fields every user relies on. There will
> be another user space structure again mentioning the
> vs, rs and the new threshold fields:
> 
> struct edit_rs_thresholds {
>       cmd;            // Always the first field identifying
>                       // what kind of struct follows
>       vs part
>       rs part
>       u_thresh
>       l_thresh
> };
> 
>       setsockopt uses only one registered value, the variations
> are in the cmd value. Sort of this.
> 
>       The result: the generic user space structures allow the
> binaries to work even while new kernels are compiled with new
> features that allocate new user space structures. The binaries
> not using thresholds will not notice that your patch extended
> the kernel RS structure as long as the default values (thresholds
> disabled) do not hurt them. Of course, we should think about the
> atomicity of editing the RS in so many ways.
> 

Yes, we will use the ipvs sockopt structures to configure real server's
thresholds. The current single big structure is used to setsockopt for
ipvs, it is really ugly, we will change it in ipvs 1.1 development branch
and make libipvs nice, and will add the feature of connection thresholds
for each real server there together.

# add/edit a real server
ipvsadm -a|e -t|u|f service-address -r server-address [-g|i|m] \
        [-w weight] [--lthreshold v1] [--uthreshold v2]

# this command still output rules in the format we are familiar to. :)
ipvsadm -ln

# show threshold values, just like showing the stats and rate info
ipvsadm -ln --threshold


If users don't configure the connection thresholds for real servers, the 
ipvs just works as before.

 
Regards,

Wensong



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