I am sure I saw some open source server written in Go that was able to restart and keep connections open.
I can't find it to learn that technique.
I know apache.httpd has apachectl graceful
that restarts and keeps connections open.
How does it done in general and in Go?
I thought it must fork and 1 exit, 2 exec(new go app) and link connections by Fd.
But in Go I can find only ForkExec
function. I think Fork
is required.
Also syscall
package is not very well documented.
CloseOnExec may help,
FileListener, CloseOnExec and gracefully restarting servers
Zero Downtime upgrades of TCP servers in Go
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With