Re:How We Designed for Performance and Scale
by noselasd on Wednesday June 10, 2015 @05:02PM
(#9695357)
While there are certain socket options to share a port - two processes can share a port easily in another elegant way; just call fork().
One way of doing such upgrades is then for the existing code to fork() then exec() the new version. The existing old code closes the original server socket, which leaves accepting new requests to the new code. When all in-flight requests served by the old code is finished, that process can exit.
One way of doing such upgrades is then for the existing code to fork() then exec() the new version. The existing old code closes the original server socket, which leaves accepting new requests to the new code. When all in-flight requests served by the old code is finished, that process can exit.