Large POST-request are buffered to disk, before passed to the backend.
The backend has troubles to parse the POST-data, if the requests are
huge
(some GB).
We use “haproxy” in front of “nginx”, to workaround this issue.
But this causes extra load on the server.
Is there a chance to disable the request buffering?
On Mon, Feb 25, 2013 at 04:39:53AM -0500, double wrote:
Hello,
Large POST-request are buffered to disk, before passed to the backend.
The backend has troubles to parse the POST-data, if the requests are huge
(some GB).
We use “haproxy” in front of “nginx”, to workaround this issue.
But this causes extra load on the server.
Is there a chance to disable the request buffering?
Yep, it’s possible, see the other active threads for a patch from
tengine
to implement non-buffered uploads.
Also it’d be very nice to get this feature to standard nginx,
many people need it!
Example:
Size of POST-request: 10 GB (e.g. HD video)
Upload-time: 4h
The front-server proxies the request to the upload-server.
After the upload has finished, the uploading client wants a quick “all
fine”-message (maximum 30 seconds).
If the upload-server gets the stream directly, the machine has has 4h to
parse the request (e.g. “upload-module” or “apache-fastcgi-module”). And
this does not overload the system.
thanks for your reply. but i am still confused with the workground
about haproxy.
i know haproxy dose not buffer request, but if use haproxy in
front
of nginx,
when haproxy pass request to nginx, nginx will still buffer the
request to disk
as you said, you use haproxy in front of nginx, that means the
request
will be proxied by haproxy first, and then be proxied by nginx,
although haproxy can proxy request immediately, but nginx can not pass
the
request on-the-fly, it will buffer request anagin. Have i made
some mistakes?