Cloudflare

Shedding old code with ecdysis: graceful restarts for Rust services at Cloudflare

Feb 13, 2026Manuel Olguín Muñoz
Shedding old code with ecdysis: graceful restarts for Rust services at Cloudflare
SummaryAI, from the source post

Cloudflare has open-sourced ecdysis, a Rust library for graceful process restarts. It enables zero-downtime upgrades by using a fork-then-exec model with inherited socket file descriptors, ensuring no live connections are dropped and no new connections are refused. The library integrates with Tokio for async support and systemd for lifecycle management. It addresses the challenges of connection refusal and termination during naive restarts by keeping sockets open throughout the transition, providing a safe initialization window for new processes and crash safety if the new process fails.

More from the Process Management & Graceful Upgrades trail