Discussion:
[Supervisor-users] Shared socket among multiple programs
Aryeh Leib Taurog
2014-02-11 09:32:18 UTC
Permalink
I'd like to have supervisor manage a single socket to be shared by a
heterogenous group of programs

I tried specifying the same unix domain socket address in multiple
fcgi-program sections of the config, but supervisor does unlink then
bind for each one. The upshot is that only the last program to be
started accepts connections on the socket. It would be nicer if
supervisor could keep track of the sockets it creates and pass the
same open file descriptor to each program. Along these lines:
<https://circus.readthedocs.org/en/0.9.2/sockets/>

The reason for doing this is to simplify graceful version releases.
When I deploy a new version of a service, I could bring it up
alongside the current version, *on the same fd*. Once it's up, I
would stop the old service.

How easy would it be to make this change? If I create a patch for it,
would it likely be accepted?

Thanks!
Aryeh Leib Taurog
Roger Hoover
2014-02-11 19:30:55 UTC
Permalink
Aryeh,

I think this would be great! I love how Circus made sockets first-class
citizens, sharable across process groups and with a separate lifecycle.

How easy to make the change? Hard to say without some experimenting. The
hardest part is probably adding the socket lifecycle to supervisor in
addition to the process lifecycle. Then that information needs to be
hooked into the template expansion step of the config. I guess we should
deprecate the fcgi-program config as well.

How likely to be accepted? If the core maintainers are on board with the
direction, I think they're very willing to accept patches.

Like I said, this would be an awesome feature. I don't have much time to
contribute but will support as much as possible (maybe some design input or
testing).

Cheers,

Roger
Post by Aryeh Leib Taurog
I'd like to have supervisor manage a single socket to be shared by a
heterogenous group of programs
I tried specifying the same unix domain socket address in multiple
fcgi-program sections of the config, but supervisor does unlink then
bind for each one. The upshot is that only the last program to be
started accepts connections on the socket. It would be nicer if
supervisor could keep track of the sockets it creates and pass the
<https://circus.readthedocs.org/en/0.9.2/sockets/>
The reason for doing this is to simplify graceful version releases.
When I deploy a new version of a service, I could bring it up
alongside the current version, *on the same fd*. Once it's up, I
would stop the old service.
How easy would it be to make this change? If I create a patch for it,
would it likely be accepted?
Thanks!
Aryeh Leib Taurog
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Aryeh Leib Taurog
2014-02-11 19:52:31 UTC
Permalink
Roger,

Thanks for the feedback. This would be really good for our technology
stack, but it's a pretty low priority at this point. Let's say it's
more of a personal interest than anything else.

I'm going to try to find some time for this in the near future. If I
do, I'll contact you off-list for more specific pointers to get me
started.

Regards,
Aryeh Leib
Post by Roger Hoover
Aryeh,
I think this would be great! I love how Circus made sockets first-class
citizens, sharable across process groups and with a separate lifecycle.
How easy to make the change? Hard to say without some experimenting. The
hardest part is probably adding the socket lifecycle to supervisor in
addition to the process lifecycle. Then that information needs to be
hooked into the template expansion step of the config. I guess we should
deprecate the fcgi-program config as well.
How likely to be accepted? If the core maintainers are on board with the
direction, I think they're very willing to accept patches.
Like I said, this would be an awesome feature. I don't have much time to
contribute but will support as much as possible (maybe some design input or
testing).
Cheers,
Roger
Post by Aryeh Leib Taurog
I'd like to have supervisor manage a single socket to be shared by a
heterogenous group of programs
I tried specifying the same unix domain socket address in multiple
fcgi-program sections of the config, but supervisor does unlink then
bind for each one. The upshot is that only the last program to be
started accepts connections on the socket. It would be nicer if
supervisor could keep track of the sockets it creates and pass the
<https://circus.readthedocs.org/en/0.9.2/sockets/>
The reason for doing this is to simplify graceful version releases.
When I deploy a new version of a service, I could bring it up
alongside the current version, *on the same fd*. Once it's up, I
would stop the old service.
How easy would it be to make this change? If I create a patch for it,
would it likely be accepted?
Thanks!
Aryeh Leib Taurog
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
_______________________________________________
Supervisor-users mailing list
https://lists.supervisord.org/mailman/listinfo/supervisor-users
Loading...