Answer the question
In order to leave comments, you need to log in
Nginx reverse proxy: What is the performance impact of proxy_buffering on large files and slow upstream?
The documentation says that when proxy_buffering is disabled, a response from the backend server is sent to clients simultaneously with its receipt, and when it is enabled, the response is read into buffers, and, if necessary, written to a file, and only then sent to the client.
If we have a "slow but large" backend (large storage on ordinary disks) - of course, we want to give the client data at the same time as receiving it in order to minimize the delay for the client.
However, in practice, when testing on 100Mb files and a slow network (2Mb/s for both backend and clients), there is a feeling that nginx is leaking data to the client as it loads from the backend, even with proxy_buffering enabled.
Is there an inaccuracy in the documentation, or is the behavior of nginx more complicated? Do I understand correctly that if nginx starts sending data to clients immediately, then there is no point in turning off proxy_buffering?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question