Re: http-buffer-request details

2019-11-19 Thread Tim Düsterhus
Christopher,

Am 19.11.19 um 16:39 schrieb Christopher Faulet:
> You're right Tim. But this one is small enough to be fixed immediately
> :). I will push the patch with other ones I'm working on. But it is
> already fixed.
> 

That's even better of course! Disregard my comment in *this specific*
case then :-)

Best regards
Tim Düsterhus



Re: http-buffer-request details

2019-11-19 Thread Christopher Faulet

Le 19/11/2019 à 16:32, Tim Düsterhus a écrit :

Christopher,

Am 19.11.19 um 16:23 schrieb Christopher Faulet:

As mentioned in the documentation, HTTP processing is delayed waiting
the whole body is received or the request buffer is full. The condition
about the first chunk of a chunked request is only valid for the legacy
HTTP mode. It was removed in 2.1, so the documentation is a bit outdated
on this point.


Consider filing a short `type: doc` issue if you realize that the
documentation is outdated, but you don't have time to think about a
proper wording / creating a patch:
https://github.com/haproxy/haproxy/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+doc%22

That way one can come around later and make the necessary adjustments
when there's a bit more time.



You're right Tim. But this one is small enough to be fixed immediately :). I 
will push the patch with other ones I'm working on. But it is already fixed.


--
Christopher Faulet



Re: http-buffer-request details

2019-11-19 Thread Tim Düsterhus
Christopher,

Am 19.11.19 um 16:23 schrieb Christopher Faulet:
> As mentioned in the documentation, HTTP processing is delayed waiting
> the whole body is received or the request buffer is full. The condition
> about the first chunk of a chunked request is only valid for the legacy
> HTTP mode. It was removed in 2.1, so the documentation is a bit outdated
> on this point.

Consider filing a short `type: doc` issue if you realize that the
documentation is outdated, but you don't have time to think about a
proper wording / creating a patch:
https://github.com/haproxy/haproxy/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+doc%22

That way one can come around later and make the necessary adjustments
when there's a bit more time.

Best regards
Tim Düsterhus



Re: http-buffer-request details

2019-11-19 Thread Christopher Faulet

Le 19/11/2019 à 13:20, Илья Шипицин a écrit :

hello,

how is that supposed to work ?

https://github.com/haproxy/haproxy/blob/master/doc/configuration.txt#L6225

does it buffer the entire body ? does it use memory / hdd for buffering ?

how are those buffers allocated ? what if I do not have a lot of RAM ?



Hi Ilya,

As mentioned in the documentation, HTTP processing is delayed waiting the whole 
body is received or the request buffer is full. The condition about the first 
chunk of a chunked request is only valid for the legacy HTTP mode. It was 
removed in 2.1, so the documentation is a bit outdated on this point.


BTW, this means that HAProxy waits for the entire request's body before 
processing it, if this one is smaller than a buffer. Otherwise, it waits the 
request buffer is full. In this case, only a part of the payload will be 
available. But there is no extra memory allocated to store the entire body.


About the buffers allocation, as for most of other objects dynamically allocated 
in HAProxy, it uses memory pools to do so. The buffer size if 16k by default and 
may be tuned via the "tune.bufsize" global directive.


Hope it helps,
--
Christopher Faulet



http-buffer-request details

2019-11-19 Thread Илья Шипицин
hello,

how is that supposed to work ?

https://github.com/haproxy/haproxy/blob/master/doc/configuration.txt#L6225

does it buffer the entire body ? does it use memory / hdd for buffering ?

how are those buffers allocated ? what if I do not have a lot of RAM ?

thanks,
Ilya Shipitcin