3

I'm trying to figure out where to place servers that use HTTP calls to another server for retrieving results. I cannot seem to locate any definition of HTTP that defines the maximum response time although I have a vague recollection of 1800ms.

Does anyone know where this is defined, or even have a relatively authoritative source for a latency time?

Jim B
  • 23,938
  • 4
  • 35
  • 58

1 Answers1

2

No RFC seem wrote for that ! but there is some default value from major web server.

IIS: connectionTimeout;

The HTTP.sys Timer_EntityBody timer expired. The connection expired before the request entity body arrived. When it is clear that a request has an entity body, the HTTP API turns on the Timer_EntityBody timer. Initially, the limit of this timer is set to the connectionTimeout value. Each time another data indication is received on this request, the HTTP API resets the timer to give the connection more minutes as specified in the connectionTimeout attribute.

<system.applicationHost>
   <sites>
      <siteDefaults>
         **<limits connectionTimeout="00:02:00" />**
      </siteDefaults>
   </sites>
</system.applicationHost>

Apache

Default: header=20-40,MinRate=500 body=20,MinRate=500

Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body:

RequestReadTimeout header=10 body=30

Allow at least 10 seconds to receive the request body. If the client sends data, increase the timeout by 1 second for every 1000 bytes received, with no upper limit for the timeout (except for the limit given indirectly by LimitRequestBody):

RequestReadTimeout body=10,MinRate=1000

Allow at least 10 seconds to receive the request including the headers. If the client sends data, increase the timeout by 1 second for every 500 bytes received. But do not allow more than 30 seconds for the request including the headers:

RequestReadTimeout header=10-30,MinRate=500

Usually, a server should have both header and body timeouts configured. If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low:

RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500

Edited:

If you mean on the client side; then it's something coded in. As per the select's function; the read buffer can return in those cases:

readfds:

  • If listen has been called and a connection is pending, accept will succeed.
  • Data is available for reading (includes OOB data if SO_OOBINLINE is enabled).
  • Connection has been closed/reset/terminated.

That mean between select's call, as long the remote connection is not dropped, the select will return nothing and will wait until a value you define to close yourselft the connection on the client side.

yagmoth555
  • 16,300
  • 4
  • 26
  • 48