LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: streaming server with LVS

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: streaming server with LVS
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 23 Feb 2005 11:43:13 +0900
On Tue, Feb 15, 2005 at 05:06:34PM -0500, Daniil Sosonkin wrote:
> Hello,
> 
> Just a small confirmation question. I have this application for 
> streaming stock quotes written in Java which needs to be balanced 
> between several computers. The clients connect to it using an applet via 
> regular sockets, subscribe to some quotes and the server sends out 
> updates over the same open socket. If a client needs to add/remove 
> quote, it connects to the same server to tell about the desired action. 
> The server takes appropriate action. Basically, in the end, there's 
> always one socket connection open for sending updates.
> 
> The question is, can I use LVS-TUN with persistent connections to load 
> balance? There's a timeout variable set on persistent connection and I'm 
> wondering if it will affect open socket? 

No. The persistance timeout has no effect whatsoever on the timeout
of open connections. They have their own timeouts which are generally
in line with those of TCP.

> Since its used only for sending 
> and can be opened for days, will LVS remove it from its table after 
> timeout? Also, wil I run a risk of having another connection from the 
> same client going to the different realserver while there's an open 
> socket with streaming data?

Not if you use persistance. If you use persistance, and either there is
a connection open, or the persistance timeout has not elapsed since the
last connection was closed, then a subsequent connection from the same
end-user will go to the same real-server.

For those who care, this is all controlled by the expiry of
connection entries and persistace templates by ip_vs_conn_expire().

-- 
Horms

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