#goreload
The goreload
support zero-downtime restarts in go applications that provide HTTP and/or TCP service.
go get github.com/lostdragon/goreload
Send HUP
to a process using goreload
and it will restart without downtime.
kill -HUP ${pid}
Send QUIT
to a process using goreload
and it will graceful shutdown.
kill -QUIT ${pid}
Signal | Function |
---|---|
TERM, INT | Quick shutdown |
QUIT | Graceful shutdown |
KILL | Halts a stubborn process |
HUP | Graceful restart |
https://github.com/rcrowley/goagain
http://grisha.org/blog/2014/06/03/graceful-restart-in-golang/