disable request buffering in nginx

前端 未结 4 541
滥情空心
滥情空心 2021-02-03 12:34

It seems that nginx buffers requests before passing it to the updstream server,while it is OK for most cases for me it is very bad :)

My case is like this:

I hav

4条回答
  •  心在旅途
    2021-02-03 13:33

    According to Gunicorn, they suggest you use nginx to actually buffer clients and prevent slowloris attacks. So this buffering is likely a good thing. However, I do see an option further down on that link I provided where it talks about removing the proxy buffer, it's not clear if this is within nginx or not, but it looks as though it is. Of course this is under the assumption you have Gunicorn running, which you do not. Perhaps it's still useful to you.

    EDIT: I did some research and that buffer disable in nginx is for outbound, long-polling data. Nginx states on their wiki site that inbound requests have to be buffered before being sent upstream.

    "Note that when using the HTTP Proxy Module (or even when using FastCGI), the entire client request will be buffered in nginx before being passed on to the backend proxied servers. As a result, upload progress meters will not function correctly if they work by measuring the data received by the backend servers."

提交回复
热议问题