On Mon, Mar 18, 2013 at 9:48 AM, Roberto De Ioris <[email protected]> wrote:
>
> Hi, i have just committed (in 1.9) support for "on demand" vassals.
>
> Basically when you add a vassal, the Emperor will start tracking it, but
> it will spawn the processes only at the first connection to the specified
> socket.
>
> The system already works for configurations stored in postgresql, mongodb
> and for zeromq messages:
>
> import zmq
> c = zmq.Context()
> s = zmq.Socket(c, zmq.PUSH)
> s.connect('tcp://127.0.0.1:5252')
> s.send_multipart(['touch','foo.ini',"[uwsgi]\nhttp-socket=fd://0\nmodule=werkzeug.testapp:test_app",
> '0', '0', ":9090"])
>
> as you can see the socket is mapped as the fd 0, so in addition to
>
> socket/http-socket/fastcgi-socket/scgi-socket fd://0
>
> you can simply use:
>
> protocol = uwsgi|http|fastcgi|scgi
>
>
> I would like to add the same system to configurations based on simple
> files and globs. Some idea on how to specify the socket ? (please do not
> suggest xattr as they are a mess to maintain on different servers, at
> least for me...)

why define the socket out-of-band/out-of-file?  how will the app know
what port it is really on?

wouldn't it be better the read the socket from the vassal config, and
add a new option or prefix denote the fact it's deferred? say:

shared-socket = :9090
...
http = +0
http = ==0
...

...or:

shared-socket = tcp://127.0.0.1:9090?name=sock0&inherit=1
http = name://sock0

...or:

inherit-socket = :9090
http = =0

...or (systemd-like-ish):

export-socket = :9090
http = $(LISTEN_FD_0)

....IMO it would be nice to retain the original information, or setup
in a way that allows the same config to run with or without an emperor
(this way, if under emperor, they are automatically managed)

-- 

C Anthony
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to