On 9 April 2010 07:53, P.J. Eby <p...@telecommunity.com> wrote:
>> Also, note that with Nginx (as with Apache, if I'm not wrong), even if
>> application yields small strings, the server can still do some buffering
>> in order to increase performance.
>
> In which case, it's in violation of the WSGI spec.  The spec requires
> eparately-yielded strings to be flushed to OS-level buffering.

True, and Apache/mod_wsgi does best effort on that.

Output filters at Apache level can be a problem with that though as a
flush bucket in Apache bucket chains is a request only and an output
filter can decide not to flush through all data. For example,
mod_deflate may buffer partial data in order to get enough for next
block of compressed data.

This is the exception rather than the norm, and if no such output
filters exists, then separately yield strings should be flushed right
through to the socket.

So, one can try and satisfy that requirement in WSGI, but in practice
it cannot always be achieved because you may have absolutely no
control over the underlying web server.

Graham
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to