LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: persistence

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: persistence
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 31 Mar 2005 14:18:31 +0900
On Tue, Mar 29, 2005 at 02:35:30PM -0600, Casey Zacek wrote:
> 
> I am a little confused about the connection tracking in IPVS.
> 
> What I need is a 1 to 1 mapping from client IP to realserver IP.  This
> is for HTTP access for websites that need sessions maintained at the
> load-balancer level.
> 
> I have one such customer's site that has a session timeout of 1h30m
> (5400 sec).
> 
> My problem is with this customer's site .. we're seeing clients who
> don't get stuck to one realserver, and I haven't been able to figure
> out why.
> 
> % ipvsadm -lnc | grep CLIENT-IP
>  [...]
> TCP 01:49  ESTABLISHED CLIENT-IP:4152 VIP:80 RIP2:80
> TCP 00:40  ESTABLISHED CLIENT-IP:2221 VIP:80 RIP1:80
>  [...]
> 
> This shouldn't happen, should it?
> 
> I really don't need client ports (or destination ports, for that
> matter) tracked at all, and it seems like there should be a way to do
> it this way (which could also save some space..).  For example, load
> balancing on Riverstone gear allows you to choose a persistence level:
> 
> tcp    - (client IP:Port -> VIP:Port)
> ssl    - (client IP -> VIP:Port)
> sticky - (client IP -> VIP)
> (there are a few others, but I've never used them)

Hi,

If you want this kind of sticky behaviour it can be achieved
using a fwmark virtual service. Or if that doesn't meet your needs,
by coding up a custom scheduler module.

-- 
Horms

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