Option to disable buffering in uwsgi module

Igor Sysoev igor at sysoev.ru
Thu Aug 4 10:44:54 UTC 2011


On Thu, Aug 04, 2011 at 01:32:14PM +0300, Peter Smit wrote:
> (This is my first message to this list, please let me know if I'm
> doing something wrong!)
> 
> In developing a comet style application in a uwsgi/nginx setup I
> noticed that nginx always buffers the response when uwsgi_pass is
> used.
> 
> I'm not sure or there is any particular reason why this is done,
> except for the fact that the uwsgi code is originally based on the
> fastcgi module where indeed buffering is unavoidable. I think however
> that it makes sense to give the option of disabling buffering with
> uwsgi.
> 
> I actually already went ahead and wrote a patch that does exactly
> this. It introduces a uwsgi_buffering flag and now adheres to the
> "X-Accel-Buffering" header. I have only limited capabilities to test
> this patch, but for me it does exactly that, disabling the buffer.
> 
> Could some of you review this patch and if it is ok, could it be
> introduced in nginx?
> 
> I made the patch on the 1.1.0 source. I attached it and included it
> inline below this message. Let me know if I should give it in a
> different format.

Thank you for idea, it seems unbuffered proxying should work for uwsgi
as well as for scgi, since they both use simple protocol, that is, no
protocol at all :) for body.


-- 
Igor Sysoev



More information about the nginx-devel mailing list