Hi Roberto, No I think not, but I did not investigate the nginx <-> scgi side of the connection much. I am referring to the "Connection: keep-alive" in browser<->nginx dialog, the answer before was always "Connection: close" from nginx, so the client browser had to reopen the connection to nginx for each request going to an upstream server, while request going to static files where kept alive.
I think it would be dangerous for a simple server such scgi to keep connections alive, because it is a simple dispatcher without queue. The number of requests coming from different clients can be N >> M (where N is the number of client requests while M is the number web2py processes). Actually it could be done by using an async version of the SCGI dispatcher, but I would not expect much benefit, since nginx is doing already exactly that much faster unless opening TCP connection to SCGI becomes expensive for some reason (ex. due to net topology). So IMHO what happens now is that nginx enqueues the requests and keeps connections over the Internet alive, while connections on localhost or the network behind nginx are opened each time and dispatched to the first available web2py process. I should try to use unix socket in the case of the local machine and see if there is a faster response time due to bypassing the 3way handshake of TCP. About uWSGI. I think the benefit of building another level of connection buffering is on a geographical/Internet topology. For a standard topology (i.e. on same server or lan segment/bus) uWSGI should benefit already from the same slice (just change scgi_pass to uwsgi_pass and put the correct directive in the upstream definition) and since uWSGI can support unix socket it should perform even better without any effort! mic 2012/5/17 Roberto De Ioris <[email protected]>: > >> Changes: >> - keep-alive support from nginx. > > Hi Michele, does wsgitools SCGI server really supports keepalive > connections ? > > That would be a kick-ass feature i need to copy for sure :) > > -- > Roberto De Ioris > http://unbit.it

