W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2008

Re: NEW ISSUE(S): Retrying Requests

From: Adrien de Croy <adrien@qbik.com>
Date: Fri, 07 Mar 2008 12:52:56 +1300
Message-ID: <47D083D8.4000806@qbik.com>
To: Robert Siemer <Robert.Siemer-httpwg@backsla.sh>
CC: Jamie Lokier <jamie@shareable.org>, Brian Smith <brian@briansmith.org>, 'HTTP Working Group' <ietf-http-wg@w3.org>



Robert Siemer wrote:
> On Thu, Mar 06, 2008 at 08:22:13PM +0000, Jamie Lokier wrote:
>   
>> Robert Siemer wrote:
>>     
>>> On Thu, Mar 06, 2008 at 12:33:45AM +0000, Jamie Lokier wrote:
>>>
>>>       
>>>> I'm still puzzled as to when a client should reuse a persistent
>>>> connection for requests that (it knows) shouldn't be retried.
>>>>
>>>> Since all servers close a persistent connection an unspecified time
>>>> after the first request, and that's perfectly healthy (all servers
>>>> must do it), ...
>>>>         
>>> Why must all servers do that?
>>>       
>> Two reasons:
>>
>>    1. Because idle TCP/IP sockets get into a stuck state, if the other
>>       end disappears off the net.  Especially on internet facing
>>       servers, these tend to accumulate without bound (older servers
>>       had to be rebooted from time to time because of this).
>>     
>
>
> Newer servers have TCP keepalive.
>
>
>   
Last time I looked at keepalive specs for TCP the sorts of timeouts 
before keepalives were sent were in the order of hours.

IOW not particularly useful, and definitely not useful for a highly 
loaded HTTP server.

>>       Servers will accumulate these until they run out of ports or
>>       memory, if they don't have some way to drop old, idle connections.
>>     
>
>
> The server runs out of port 80? What ports are you talking about?
>
>   
* connection handles then. 
* kernel resources,
* Memory
* firewall hash entries
* authentication tokens
* etc etc etc

There are lots and lots of things you really don't want hanging around 
forever for idle clients.  Until we all have ready access to an OS that 
has truly unlimited numbers of these things with no performance 
penalties as the number grows, we'll want to clean up.  As long as we 
use physical matter for RAM, it's a limited resource.  Demand can always 
exceed supply capability in this case.

> Apart from that you just switched from "persistent connections" to "old, 
> idle connections". TCP connections don't grow old. Servers don't need to 
> close connections in use - be it after the 100th or 100000th request or 
> be it after a "long" time.
>   

As someone who has seen what happens if you don't clean up... it's 
definitely necessary.



>
>   
>>    1. To defend against too many clients keeping connections open for
>>       an arbitrarily long time, whether maliciously or too popular.
>>     
>
>
> You give your second reason the same number (1.), because it is actually 
> the same? ;-)   Apart from memory consumption is there anything else to 
> defend?
>
>
>
> Robert
>
>   

-- 
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com
Received on Thursday, 6 March 2008 23:51:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:50:37 GMT