LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: persistents connections

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: persistents connections
From: Volker Dormeyer <volker@xxxxxxxxxxxx>
Date: Thu, 17 Mar 2005 22:49:32 +0100
 //> On Wed, 16 Mar 2005 19:43:32 -0300,
 //> "Montervino, Mariano" <mmontervino@xxxxxxxxxx> wrote:

  > Volker
  > This is exactly i´m talking about. In my scenario have to use persistent
  > session + a keepalive packet about every minute.

I'm still not sure what you are trying to achieve. When we talk about
persistence, we have to keep in mind that a particular layer-7 protocol
can provide persistence in some way. And on the other hand, LVS can
provide session persistence, for protocols which do not have a build in
persistence mechanism. In your case, I assume your application has an
integrated persistence mechanism in its layer-7 protocol realised by
sending keepalive packets.

  > If understand well because of this i´m loosing the great feature of balance
  > at the linux director. 

When the external system as well as the real server keep the session
open, yes. But, you have a TCP connection here. A TCP connection is
established by a three-way handshake. This handshake was done with the
real server which was determined by the scheduler on first connection
request. If the load balancer would balance further requests within the
same session to another server, your session would break, because the
session was esablished with another server, first.

  > You think could resolve my issue in some way for use balance too?

You can balance the load of new connections across different real
servers, but you cannot balance the load of already established TCP
sessions across the real servers. The load balancer ensures that an
already established TCP session will be directed to the real server,
where it was directed on its first request.

Regards,
Volker

 Volker Dormeyer        <volker@xxxxxxxxxxxx>


  > -----Mensaje original-----
  > De: Volker Dormeyer [mailto:volker@xxxxxxxxxxxx]
  > Enviado el: Miércoles, 16 de Marzo de 2005 18:45
  > Para: LinuxVirtualServer.org users mailing list.
  > Asunto: Re: persistents connections

 //> On Wed, 16 Mar 2005 16:28:27 -0300,
 //> "Montervino, Mariano" <mmontervino@xxxxxxxxxx> wrote:

 >> I need to know if LVS resolve the following issue...
 >> Situation:
 >> 5 external serves connect to the linux director of the lvs system with 3
 >> real servers. The connection of the external server are persistent (they
 >> never close the connection) and use same keepalive packets to force
  > traffic
 >> in the session.

 >> In that scenario the linux director still balance the load or only do
  > that
 >> if each request are a new connection?

  > I am not sure if I understand you correctly, maybe this is what you
  > mean:

  > the scheduler determines the real server to direct the traffic to on the
  > first connection request of the external system. If neither the real
  > server, nor the external system closes the connection, the director will
  > direct further requests within this TCP session to the same real server.
  > If external system and real server are silent for a while, the TCP
  > session timeout on the director will terminate the session. This can be
  > prevented by sending keepalives or setting the timeout value higher. If
  > I remember correctly, the default value is 15 minutes.

  > If you don't use LVS session persistence, the scheduler determines a new
  > real server for the external system on each new request (new connection
  > /session). Otherwise, even new requests will be directed to the same
  > real server like the first connection was directed to.





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