LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Using LVS for WWW flow control ?

To: Jean-Francois Nadeau <jna@xxxxxxxxxxxx>
Subject: Re: Using LVS for WWW flow control ?
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Michael Sparks <zathras@xxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Dec 1999 01:55:14 +0000 (GMT)
On Mon, 20 Dec 1999, Jean-Francois Nadeau wrote:
> Hi !
> 
> I want to use LVS to load balance 2 APACHE web servers. But first, I want to
> control how many clients gets to our first web server before sending
> requests to our second web server.  Here`s an example :
> 
> The first 400 connections goes to real server 1 and will be persistent for
> 10 minutes.  The exeding requests goes to server 2.

Thinking out loud about somthing similar, but not quite the same as
this... (Thoughts below that maybe directly useful)

Currently we have:
  * services have real servers + persistance/weights/routing tags

If we also had optionally:
  * An upper limit on tcp connections per real server.
  * A failover server per service, with it's own, optional maximum.

Used as follows:
  * When no server near upper limitload balancing happens as normal.
  * When a server is on it's maximum connections, it's excluded from teh
    decision.
  * If all real servers are at maximum, connection goes to failover if
    it's not at maximum.
  * If all servers - real/failover at maximum - SYN packet silently
    dropped. (Though perhaps counted somewhere so we can find out about
    it?)

>From a realserver failover point of view this could be extremely useful
given the following current scenario:

  * 10 machines in an LVS cluster, all pushed into an overloaded scenario
    due to excessive client requests.
  * 1 machine falls over increasing the load on the others by 10%, causing...
  * Another machine to fall over increasing load again... 
  * Domino style failover of the rest of the machines...

If the peak connections level for a server are known, we could use that
to set the maximum rate for a server, thereby avoiding the above domino
effect. Elimination of cascade failure :-) (Something which IIRC,
commercial Level X switches don't handle much better )

As well as allowing people like yourself to do what you want to do, it
acts to prevent machine failover.

As I said, some random thoughts for the kernel developers.


Something that may be of more use immediately:

> Maybe I could rewrite ipvsadm rules when the load on server1 gets over and
> under 400 connections using a scripts.

This is equally possible, and would be fairly simple to implement, without
any changes to the LVS - simply set your weights like this initially:

server 1 weight 1000
server 2 weight 0

Then when the number of connections goes over 399 on server 1, change the
weights to:

server 1 weight 0
server 2 weight 1000

Then when the number of connections goes below 400 on server 1, change the
weights back. You may want to do something like over 420 turn off server
1, and when it goes below 380 turn on, to avoid flipping the weights too
often during peak times.

Hmm. I like this - I take it server 1 would provide the main service
that's intensive somehow on the server, whereas server 2 just serves a
page saying "too busy now, please try again Real Soon" ?

Hmm... With the right user level code, the maximum connections per
server/failover server could probably be done in user spae, rather than
kernel space .... Now there's a thought!


Michael.
--
National & Local Web Cache Support        R: G117
Manchester Computing                      T: 0161 275 7195
University of Manchester                  F: 0161 275 6040
Manchester UK M13 9PL                     M: Michael.Sparks@xxxxxxxxxxxxxxx
> 
> I will use DR, WRR and persistent port.
> 
> Thanks in advance.
> JNA
> 
> 
> ----------------------------------------------------------------------
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx
> 


----------------------------------------------------------------------
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx

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