Re: [PATCH] Do not reuse persistent connections for PUTs

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Sat, 01 Sep 2012 15:05:52 +0200

fre 2012-08-31 klockan 10:58 +0300 skrev Tsantilas Christos:

> 1) To decide if it can reuse a healthy persistent connection. Inside
> FwdState::connectStart, we are getting a persistant connection and even
> if it is healthy, if we want to send eg a PUT request we are closing the
> persistent connection and we are opening a new one.

How do we know it's healthy?

The issue here is that we cannot retry some kinds of requests, and HTTP
requires us to handle when the server closes the connection while we are
sending the request. It is a speed of light problem, we cannot know if
the server is just about to close the connection or if it have already
closed the connection but the FIN have not yet been seen on our side.

> From what I can understand there is not any reason to not reuse a
> healthy persistent connection, for PUT requests. Am I correct? If yes
> then the problem is only in the case (2).

There is, because we often cannot retry the PUT because we have not kep
a copy of the already partially sent PUT body, and it's expected to
sometimes fail tp send requestso n a persistent connection due to above
race condition.

THe race condition between HTTP server and client (squid) is fairly big
and easily fits many MB of traffic.

Regards
Henrik
Received on Sat Sep 01 2012 - 13:05:57 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 11 2012 - 12:00:05 MDT