Graceful upgrades in Go
Oct 11, 2018Lorenz Bauer

Summary
This post details the challenges and trade-offs of implementing graceful process upgrades in Go, contrasting simple `Exec()` and `SO_REUSEPORT` approaches with the more robust NGINX model. It introduces Cloudflare's open-sourced Go library, `tableflip`, designed to replicate NGINX-style graceful upgrades by managing inherited file descriptors and ensuring a clear lifecycle for upgrade processes, preventing multiple simultaneous upgrades and ensuring old code is not retained after a successful upgrade.