LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS with Weighted Least-Connection Scheduling

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS with Weighted Least-Connection Scheduling
From: Joseph Mack NA3T <jmack@xxxxxxxx>
Date: Thu, 21 Feb 2008 07:29:26 -0800 (PST)
On Thu, 21 Feb 2008, Sebastian Krueger wrote:

> Joe,
>
> I checked out persistent=1 and from the man page of ldirectord I find this:
>
> ----------
> persistent = n
>
> Number of seconds for persistent client connections.
> ----------

didn't know what that meant. persistence of 1 sec is not 
going to do anything useful though.

Have you looked at the -SH scheduler to acheive 
client-realserver affinity? It has less problems than 
persistence.

> fwmark sounds interesting, I will google about that one in a moment to find
> out.

if we know about it, it will be in the HOWTO.

> What I'm trying to achieve is to load-balance Java Message Service (JMS)
> connections.

I don't know anything about it. I'll assume it's a service 
with relatively long connection time and requires heavy 
compute service on the realserver.

I don't know why you have three apparenlty identical 
services on consecutive ports. It seems only to make the 
setup more complicated.

>
> So we have multiple JMS clients and multiple JMS servers. LVS does the
> load-balancing
> based on IP address affinity, so in order to load-balance a single JMS
> client across many
> JMS virtual servers the solution was to create multiple virtual servers and
> have the
> JMS client round-robin over all the available JMS virtual servers.
>
> Currently these are set to 3, but the LVS configuration could easily be
> extended to
>
> virtual=10.32.30.125:18007
>        real=192.168.0.10:18007 masq 10
>        real=192.168.0.20:18007 masq 5
>        real=192.168.0.30:18007 masq 5
>        real=192.168.0.40:18007 masq 5
>        real=192.168.0.50:18007 masq 5
>        real=192.168.0.60:18007 masq 5
> virtual=10.32.30.125:18008
>        real=192.168.0.10:18007 masq 5
>        real=192.168.0.20:18007 masq 10
>        real=192.168.0.30:18007 masq 5
>        real=192.168.0.40:18007 masq 5
>        real=192.168.0.50:18007 masq 5
>        real=192.168.0.60:18007 masq 5

is the realserver listening on the same port for both 
virtualservices?

> So let's say a single JMS client connects to both virtual JMS servers.
> If no other clients are connected, he will be scheduled to
> the real server on 192.168.0.10 on both virtual servers. This is because LVS
> chooses the first real server regardless of the weighting if there are no
> existing
> connections.
>
> However, since each received JMS message means a huge amount of processing,
> it is important that each request goes to different real servers (as much
> as possible).

LVS statistics are designed for large numbers of 
connections. Originally LVS was used for http, where the 
connections are short and there are thousands of connections 
open. Presumably connections for small numbers of 
connections is deterministic, but I don't think you have 
much control over it.

> Is there anyone out there that has ever tried to use LVS for JMS
> connections?

can you edit your posts. Nothing below here is relevant but 
it's being sent to 3 archivers and 1000 subscribers.

Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!


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