Nginx receiving bytes from Amazon ELB (Performance Issue)
Maxim Dounin
mdounin at mdounin.ru
Fri May 9 02:46:46 UTC 2014
Hello!
On Thu, May 08, 2014 at 02:47:47PM +1200, Nicholas Sherlock wrote:
> On 8 May 2014 06:05, rodrigo.aiello <nginx-forum at nginx.us> wrote:
>
> > Nginx is receiving the bytes and then
> > delivering. I wonder if anyone has gone through this problem and found a
> > better solution.
As already suggested, the original problem is likely to be related
to micro instance. In particular, there were reports that network
is very slow on such instances.
> Indeed, Nginx reads the whole response from the backend before a single
> byte is sent to the client. That can add latency if your response is very
This is not true.
> large. This is controlled by the proxy_buffering setting, so try setting it
> to "no":
>
> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering
Using buffering allows to read a resonse from a backend as fast as
possible, while sending the response to the client. This allows
to save expensive backend processes while serving large responses
to slow clients.
It doesn't imply reading "the whole response from the backend
before a single byte is sent to the client" - as long as at least
one buffer is full, it will be sent to a client.
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list