Proxy Request buffering not working as expected
francis at daoine.org
Thu Nov 9 13:36:03 UTC 2017
On Tue, Nov 07, 2017 at 06:04:26PM +0330, Mohammad Puyandeh via nginx wrote:
> >>If you add "--limit-rate 16000" to that curl command, do you see output
> >>from your back-end server immediately, or only after enough time has
> >>passed that your client has sent all of the content to nginx?
> It's after, so Nginx buffers correctly here and I was mistaken
> but now the question is, this behavior is not much different than
> when proxy_request_buffering is set to off
If you repeat the test with "proxy_request_buffering off" in nginx.conf,
you should see that the back-end server starts receiving content sooner.
That is pretty much the only thing that proxy_request_buffering is for.
> the whole point of using nginx is to buffer request and pass
> request body to back-end server at once in a single chunk, but nginx
> pass it in small chunks, there is some other configuration for that
> ? how can we achieve this goal then ?
What do you mean by "single chunk" and "small chunks"?
Do you mean "nginx uses Transfer-Encoding: chunked in its request to
upstream", or do you mean something else?
Because if you mean "Transfer-Encoding: chunked", you can disable
that by using HTTP/1.0 in the connection from nginx to upstream
(http://nginx.org/r/proxy_http_version); but that is the default and
you did not show it having been changed.
Francis Daly francis at daoine.org
More information about the nginx