3 ms·
Am I right that this makes it trivial to deploy a new version of my server with zero downtime? I can just start the new server to handle new connections and tel
by jkn 13y ago
Am I right that this makes it trivial to deploy a new version of my server with zero downtime? I can just start the new server to handle new connections and tell the old one to stop accepting connections and quit when existing requests are completed, no need for another layer routing?
- pfraze 13y agoThat seems correct to me.
- DonPellegrino 13y agoThat's exactly how I do it for my Node programs. Any service that I want to have 100% is using the cluster module, resulting in multiple processes listening to the same port. When I want to update, I replace the files and kill the processes one by one.
- caf 13y agoYou could already do this by having a way for the new version to connect an AF_UNIX socket to the old version and request that the listening file descriptor be passed from old to new.