-
Notifications
You must be signed in to change notification settings - Fork 129
wanted: ability to listen on existing socket/fd #1166
Comments
Can you please lay out details on one or more use cases? I think I understand how you intend to use this, but I want to be sure. |
The main use case is passing a listening fd from one server to another with a low amount of downtime. You want to be able to start a new instance of a worker and only close the old listening socket once the new instance has listened. This is useful if your process takes seconds to start. |
I get that @Raynos, but I still would like more clarity on an example of how this gets used in practice. |
This is how I intend to actually use it. (crank might be replaced with a supervisord plugin module, but that has other risks.)
On upgrade:
Make sense? Crank could be socketmaster (which is time based), or for nodejs, I already have a cluster-based approach to doing the same. |
.listen. conceptually identical to same patch for master (v2.x). addresses uber#1166
.listen. conceptually identical to same patch for master (v2.x). has proper listen-on-fd test via child_process. addresses uber#1166
(v1.x) add support to listen on socket/fd, via options argument to .listen. conceptually identical to same patch for master (v2.x). has proper listen-on-fd test via child_process. addresses #1166
In order to implement zero-downtime process rollover, I would like to have to the ability to listen on an existing fd, a la
server.listen({ fd: 0 })
API [1]. I have a WIP diff for node/js, which will shortly be added.[1] https://nodejs.org/api/net.html#net_server_listen_handle_callback
The text was updated successfully, but these errors were encountered: