LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Netscape persistence [Was Re: success: LV-NAT working

To: Joseph Mack <mack.joseph@xxxxxxx>
Subject: Re: Netscape persistence [Was Re: success: LV-NAT working
Cc: "Andreas J. Koenig" <andreas.koenig@xxxxxxxx>, Peter Mueller <pmueller@xxxxxxxxxxxx>, lvs-users@xxxxxxxxxxxxxxxxxxxxxx, ja@xxxxxx, Joseph Mack <mack.joseph@xxxxxxxxxxxxxxx>
From: andreas.koenig@xxxxxxxx (Andreas J. Koenig)
Date: 02 May 2001 17:19:49 +0200
Answering both Joe and Julian...

>>>>> On Wed, 02 May 2001 08:33:55 -0400, Joseph Mack <mack.joseph@xxxxxxx> 
>>>>> said:

  > "Andreas J. Koenig" wrote:
  > OK browsers fire off several connections at once.
 
 >> That's fine. Performance second. 'KeepAliveTimeout 15' is *not
 >> incorrect*. If you have 5 servers with 15 secs KeepAliveTimeout, 

  > don't you actually have MaxClients=150 servers available and this
  > can be increased to several thousand presumably?

Sure, and people do this and buy lots of RAM for them. But many of
them servers are just in 'K' state, waiting for more data on these
KeepAlive connections. Moreover, they do not compile the status module
into their servers and never notice.

 >> then
 >> you can serve
 >> 
 >> 60*60*24*5/15 = 28800 requests per day

  > OK

 >> plus all those that actually use KeepAlive.

  > don't understand this. Can you tell me more.

Let's rewrite the above formula:

    MaxClients / KeepAliveTimeout

denotes the number of requests that can be satisfied if all clients
*send* a keepalive header (I think that's "Connection: keepalive") but
*do not actually use* the kept-alive line. If they actually use the
kept-alive line, you can serve more, of course.

>>>>> On Wed, 2 May 2001 16:09:32 +0300 (EEST), Julian Anastasov <ja@xxxxxx> 
>>>>> said:

  >     Hello,

  > On 2 May 2001, Andreas J. Koenig wrote:

 >> That's fine. Performance second. 'KeepAliveTimeout 15' is *not
 >> incorrect*. If you have 5 servers with 15 secs KeepAliveTimeout, then
 >> you can serve
 >> 
 >> 60*60*24*5/15 = 28800 requests per day

  >     This is not true. I don't have this limit of 1 req/15 secs

This may have a variety of reasons. Try this: start apache with the -X
flag, so it will not fork children and set the keepalivetimeout to 60.
Then load a page from it with Netscape that contains many images. You
will notice that many pictures arive quickly and a few pictures arive
after a long, long, long, looooong time.

  >     KeepAlive Off can be useful for banner serving but a short
  > KeepAlive period has its advantages in some cases with long rtt where
  > the connection setups costs time and because the modern browsers are
  > limited to the number of connections they open. Of course, the default
  > period can be reduced but its value depends on the served content,
  > whether the client is expected to open many connections for short
  > period or just one.

When the browser parses the incoming HTML stream and sees the first
IMG tag it will fire off the first IMG request. It will do likewise
for the next IMG tag. At some point it will reach an IMG tag and be
able to re-use an open keepalive connection. This is good and does
save time. But if a whole second has passed after a keepalive request
it becomes very unlikely that this connection will be re-used ever, so
15 seconds is braindead. One or two seconds is OK.

In the above experiment my Netscape loaded 14 images immediately after
the HTML page was loaded, but it took about a minute for each of the
remaining 4 images which happened to be the first in the HTML stream.

-- 
andreas


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