Series · 3 parts
Go Services on Linux
- Part 1 Hot Reload: Respecting SIGHUP With Go Reload a Go web server's configuration when it receives SIGHUP, without restarting the process or dropping traffic.
- Part 2 Graceful Shutdown: Respecting SIGTERM With Go Catch SIGTERM with signal.NotifyContext and let http.Server.Shutdown finish in-flight requests before your Go service exits.
- Part 3 Running A Go Service With systemd Write a systemd unit for a Go service, tell systemd when it's ready, keep the watchdog fed, reload on SIGHUP and lock it down with sandboxing options.