On Mon, 23 Apr 2001, Graham Leggett wrote:

> Nathan Lutchansky wrote:
>
> > When the following conditions are true, there is a 15-20 second delay in
> > getting back a response:
> >
> > 1) The browser supports keepalive.
> > 2) The browser has the current page in the cache.
> > 3) Current mod_proxy 2.0 is talking to an HTTP/1.1 backend server.
> > 4) The backend returns a 304 status code for the request.
>
> Hmmm - I originally encountered this when I was working on the keepalive
> stuff. It happens when the backend server switches on keepalives, when
> the proxy doesn't expect it to. The proxy then expects the backend
> server to send data until it the connection is closed, but the backend
> server keeps the connection alive - which eventually times out and
> closes, causing the delay you are experiencing.

Err...  Since HTTP/1.1 specifies that keepalive is enabled by default, the
proxy should *always* expect it to be on.  Unless, of course, it sends a
"Connection: close" header in the request.

I'm assuming that Victor knows what this problem is since he said he was
working on it.  :-)

> > Interestingly, when the browser does not have the page in its cache,
> > keepalive seems to work fine when passing the full page back to the
> > client.
>
> The plot thickens...
>
> When the page is in the cache, the browser will send an If-None-Match
> conditional header. If the object is fresh, the backend will send back a
> 304 Not Modified. I have a feeling that the proxy is assuming that
> responses without bodies (such as 304) are always non-keepalive - which
> is bogus... will need to investigate this some more.

If I had to make a guess, I'd say that the proxy is waiting for the server
to send the data associated with the reply, but according to HTTP/1.1
spec, the 304 code is "special" and explicitly has no data.  This should
probably be a special case in the proxy code then...  -Nathan

-- 
+-------------------+---------------------+------------------------+
| Nathan Lutchansky | [EMAIL PROTECTED] |  Lithium Technologies  |
+------------------------------------------------------------------+
|  I dread success.  To have succeeded is to have finished one's   |
|  business on earth...  I like a state of continual becoming,     |
|  with a goal in front and not behind. - George Bernard Shaw      |
+------------------------------------------------------------------+


Reply via email to