Series · 3 parts

Go Services on Linux

  1. 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. Mar 30, 20216 min read
  2. 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. Aug 12, 20265 min read
  3. 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. Aug 27, 20268 min read