Graceful process restarts for network applications.
Inspired by tableflip
and shellflip
, continuity
aims to provide a simple way to restart network services without dropping existing connections. This is useful for applications that do not reside behind a load balancer or reverse proxy and cannot afford to drop connections during the restart process.
- No connections are dropped during an upgrade. After a restart, new connections are only accepted by the new process.
- No modifications to application code are required.
- Language-agnostic and works with static and dynamically linked binaries.
- Simply run the binary again to restart the process. No need to send signals or use a separate command (could be supported in the future).
The following resources were used to guide the design and implementation of this library. They provide a good overview of the challenges and solutions to implementing zero-downtime restarts for network services.
- https://blog.cloudflare.com/oxy-the-journey-of-graceful-restarts/
- https://blog.cloudflare.com/graceful-upgrades-in-go
- https://blog.cloudflare.com/pingora-open-source/
- https://github.blog/news-insights/the-library/glb-part-2-haproxy-zero-downtime-zero-delay-reloads-with-multibinder/
- https://github.com/cloudflare/tableflip
- https://github.com/cloudflare/shellflip
- https://github.com/contribsys/einhorn
- https://github.com/envoyproxy/envoy