2011/9/1 Roberto De Ioris <[email protected]>:
>
> Il giorno 01/set/2011, alle ore 14:41, Evgeny Turnaev ha scritto:
>
>>
>> it compiles perfectly and working..
>> except nginx mail list said to me that "uwsgi protocol" (maybe he
>> meant nginx uwsgi_module) does not support keepalive connections.
>
>
> by default the uwsgi protocol can be streamed everywhere and in every way you 
> want.
> The main purpose for it containing the size in each packet is to allows 
> persistent connection (even if not used).
>
> the uwsgi_module in nginx (by default) does not support keepalive
>
>>
>> i am testing this setup with simple wsgi app that yields some strings
>> in a certain time interval and then
>> returns.
>> for every yield nginx in unbuffered mode produces http 1.1 chunk which
>> is exactly what i want.
>
> good, i hope igor will push the buffering/unbuffering patch soon
>
>> i am just curious: does uWSGI server able to maintain persistent connection?
>
> yes it is able but currently only with the zeromq handler, writing a 
> persistent uwsgi handler (in proto/uwsgi.c) it is only a matter
> of not closing the connection at the end. As no one is using it, i never 
> implemented it.
>
> I can give it a try adding a 'puwsgi' protocol handler.

no thanks. i was just playing around with keep-alive. i am thinking
how bad is idea of keep connection alive with backend.
in fact chunked response with no buffering to upstream must be all i need.

> Take in account that async mode with persistent connections is broken, so you 
> have to relay
> on threads and processes.
>

I use prefork.

>>
>> what i did to test:
>> i recorded wsgi request into file.. then started uwsgi with test 
>> application..
>> then replayed wsgi req..
>> for the first request uWSGI called application and returned response..
>> then requesting process tried to send
>> again recorded wsgi req into same socket from which it just read first
>> response. and nothing happens.
>
> that's because the uwsgi protocol handler close the connection after the WSGI 
> callable returns.

ah. i thought so. strange but a simple python client with blocking
socket did get exception of closed socket when i tried to write
second req to the same  socket. (maybe because it was really 3 line
overlysimple client)

Thank you for quick reply.

>>
>> so the main question: does uWSGI able to receive multiple request and
>> process responses on the same socket without closing it ?
>>
>> if yes.. then does nginx uwsgi module support it? and what i was doing wrong?
>
> no the nginx  module does not support it :(
>
>>
>> (also while i was compliling lighttpd with uwsgi.. i did not worked
>> with latest lighttpd.. i think lighttpd changed api and renamed one
>> function..)
>
> i will check it, thanks
>
>
> --
> Roberto De Ioris
> http://unbit.it
> JID: [email protected]
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



-- 
--------------------------------------------
Турнаев Евгений Викторович
+7 906 875 09 43
--------------------------------------------
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to