Hi Niko, Niko Dittmann wrote: > option http-buffer-request # buffer the whole request before dispatching it > to the backend > > None the less the server starts to receive the request while the > client is still sending. Am I missing something? Any help is highly > appreciated.
With `option http-buffer-requests`, HAProxy still won't buffer the whole request in all cases. This would be mostly impossible since HAProxy buffers requests in memory which is often pretty limited. As such, the option has the following effect (as quoted from the docs): > This option placed in a frontend or backend forces the HTTP > processing to wait until either the whole body is received, or the > request buffer is full, or the first chunk is complete in case of > chunked encoding. In your case, the buffer probably is just full. If you want to ensure that an intermediary buffers the full request in all cases, you probably want to use e,g, nginx instead (or in addition to HAProxy) as they fallback to disk storage if their in-memory buffers are full. In fact, with some app-servers (e.g. most Ruby/Rack servers, most Python servers, ...) the recommended setup is to put a fully buffering webserver in front. Due to it's design, HAProxy can not fill this role in all cases with arbitrarily large requests. Instead, its builtin buffering capabilities are merely targeted towards content inspection at the beginning of the body to make a proper routing decision. Regards, Holger

