[Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
Hey I am doing this experimentation where the WGSI server is not started with an host/port or a unix socket, but rather a FD value, corresponding to a socket already bound by the parent process. The server would then just accept new connection on the FD, using socket.fromfd() to get a socket

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread anatoly techtonik
On Tue, Jun 5, 2012 at 12:30 PM, Tarek Ziadé wrote: > > Thoughts ? I've skimmed over the text and couldn't find any user story. What is the end goal? What is the responsibility of web server, web app and your controlling app? Who should control keep-alives and connection drops? _

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Roberto De Ioris
Il giorno 05/giu/2012, alle ore 11:30, Tarek Ziadé ha scritto: > Hey > > I am doing this experimentation where the WGSI server is not started with an > host/port or a unix socket, but rather a FD value, > corresponding to a socket already bound by the parent process. > > The server would th

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
On 6/5/12 11:46 AM, Roberto De Ioris wrote: ... Gunicorn can already bind (or better, accept) from file descriptors specifying an environment variable. I don't think you can start gunicorn using a file descriptor, or I failed to do it. The best I was able to do was to create a small wsgi server

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Benoit Chesneau
On Tue, Jun 5, 2012 at 12:26 PM, Tarek Ziadé wrote: > On 6/5/12 11:46 AM, Roberto De Ioris wrote: >> >> ... >> >> Gunicorn can already bind (or better, accept) from file descriptors >> specifying an environment variable. > > I don't think you can start gunicorn using a file descriptor, or I failed

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
On 6/5/12 11:41 AM, anatoly techtonik wrote: On Tue, Jun 5, 2012 at 12:30 PM, Tarek Ziadé wrote: Thoughts ? I've skimmed over the text and couldn't find any user story. What is the end goal? use a web server as a standalone, isolated process, with nothing but a single main thread that gets re

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
On 6/5/12 12:31 PM, Benoit Chesneau wrote: On Tue, Jun 5, 2012 at 12:26 PM, Tarek Ziadé wrote: On 6/5/12 11:46 AM, Roberto De Ioris wrote: ... Gunicorn can already bind (or better, accept) from file descriptors specifying an environment variable. I don't think you can start gunicorn using a

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
On 6/5/12 1:56 PM, Roberto De Ioris wrote: uWSGI supports by-default the inheritance of file descriptor 0 for fcgi-like startup, and working on generic file descriptor or inet/upstart/systemd socket activation. I did not find a way to start it using a provided fd -- they are plethora of optio

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Roberto De Ioris
Il giorno 05/giu/2012, alle ore 12:26, Tarek Ziadé ha scritto: > On 6/5/12 11:46 AM, Roberto De Ioris wrote: >> ... >> Gunicorn can already bind (or better, accept) from file descriptors >> specifying an environment variable. > I don't think you can start gunicorn using a file descriptor, or I f

Re: [Web-SIG] Starting Web Servers using socket FDs

2012-06-05 Thread Tarek Ziadé
Just a follow-up on this: an --socket fd://xx option was added to uWsgi, and meinheld can now be started with a socket_fd option, I will try to propose the same option in other web servers. Thanks to Roberto & Yutaka for these changes Cheers Tarek