Is it possible to send html HEAD early (chunked)?

Martin Grotzke martin.grotzke at googlemail.com
Mon Jul 14 18:35:40 UTC 2014


Am 14.07.2014 14:54 schrieb "Maxim Dounin" <mdounin at mdounin.ru>:
>
> By default, nginx just sends what's already available.  And for
> SSI, it uses chunked encoding.

I don't understand this. In my understanding SSI (the virtual include
directive) goes downstream (e.g. gets some data from a backend) so that the
backend defines how to respond to nginx. What does it mean that nginx uses
chunked encoding?

> That is, if a html head is
> immediately available in your case, it will be just sent to a
> client.

Does it matter if the html head is pulled into the page via SSI or not?

> There is a caveat though: the above might not happen due to
> buffering in various places.  Notably, this includes
> postpone_output and gzip filter.  To ensure buffering will not
> happen you should either disable appropriate filters, or use
> flushes.  Latter is automatically done on each buffer sent when
> using "proxy_buffering off" ("fastcgi_buffering off" and so on).

Ok. Might this have a negative impact on my backend when there are slow
clients? So that when a client consumes the response very slow my backend
is kept "busy" (delivering the response as slow as the client consumes it)
and cannot just hand off the data / response to nginx?

Thanks && cheers,
Martin

> Flush can be also done explicitly via $r->flush() when when using
> the embedded perl module.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140714/a765010b/attachment.html>


More information about the nginx mailing list