atom feed5 messages in ru.sysoev.nginxRe: questions about proxy buffers
FromSent OnAttachments
Xavier NoriaJun 10, 2011 4:50 pm 
Alexandr GomoliakoJun 10, 2011 5:34 pm 
Maxim DouninJun 10, 2011 7:08 pm 
Xavier NoriaJun 12, 2011 11:28 am 
Maxim DouninJun 13, 2011 2:56 pm 
Subject:Re: questions about proxy buffers
From:Maxim Dounin (mdou@mdounin.ru)
Date:Jun 13, 2011 2:56:09 pm
List:ru.sysoev.nginx

Hello!

On Sun, Jun 12, 2011 at 08:28:24PM +0200, Xavier Noria wrote:

On Sat, Jun 11, 2011 at 4:08 AM, Maxim Dounin <mdou@mdounin.ru> wrote:

Hi Maxim, that was an awesome reply, thank you very much.

Let's say now the proxied server sends a response consisting of 16k. Does the module fill 4 buffers, as quickly as possible, and when everything is done it sends the 16k to the client? Or does it start sending the first buffer while filling the second one?

It will start sending as long as it has nothing to read for a while (i.e. read() from upstream will return EAGAIN).

That's a rule of thumb even if we are filling the first data buffer? (to distinguish from the first buffer whose primary content are headers).

Buffers which aren't fully filled aren't sent with proxy_buffering on.

I have in mind chunked responses from the proxied server in that question. Imagine we are producing a HTML response whose head is kinda static content, but whose dynamic body is costly. If the app sends a chunk with the head of the document, and after that some amount of time passes after the bytes from the second chunk come (because they are costly to produce), would in general nginx send that head to the client?

No.