Re: Question on HTTP 408

On Jun 2, 2014, at 8:16 PM, William Chan (陈智昌) <willchan@chromium.org> wrote:
> 
> But HAProxy uses 408s in an intriguing way that violates some of our architectural assumptions. Namely, HAProxy wants to shut down an idle connection, it sends a 408 irrespective of whether or not there was a HTTP request.

That's a bug (and a complete waste of bytes). In most cases, clients are not expected to read when there is no outstanding request, so that 408 will just sit around the buffers. Even if the client happens to send a request in flight such that it would be ready to read, it is more likely to get a TCP RST than see the 408.

Most clients will assume that a closed connection after idle is due to a timeout. 408 is really for use as an error status in log files, more than anything else, or for communicating an upstream timeout.

...Roy

Received on Tuesday, 3 June 2014 04:51:50 UTC