Time To First Byte and proxy_buffering
Maxim Dounin
mdounin at mdounin.ru
Mon Oct 24 22:53:50 UTC 2011
Hello!
On Mon, Oct 24, 2011 at 11:17:05PM +0100, Jonathan Matthews wrote:
> Does "proxy_buffering on" (especially when it'll definitely buffer to
> disk) imply that the client will *not* be sent the first part of the
> response until nginx has received and buffered the entire response
> from the upstream server?
No.
> Or does/can the upstream response buffering
> happen in parallel with the client-side response being sent?
Yes.
There is a caveat though: individual buffers (see proxy_buffers
directive) will be sent to client only once they are fully filled.
And that's why "proxy_buffering off" exists: it allows pass all
data without any delay even if buffer isn't yet filled, as this
may be critical in some use cases (streaming, some server push
cases).
Maxim Dounin
More information about the nginx
mailing list