Fly.io transforms Docker containers into micro-VMs called Fly Machines, utilizing a unique orchestration model where individual servers act as the source of truth, rather than a centralized database, allowing for global scaling without bottlenecks. The platform encountered its worst outage when a new Fly Machine configuration led to a deadlock across its network due to a concurrency bug in Rust, emphasizing the challenges of distributed systems. To improve global routing and state synchronization, Fly.io developed Corrosion, a service discovery system that uses a gossip protocol inspired by routing protocols like OSPF, eschewing traditional distributed consensus methods. Corrosion propagates a SQLite database across a global WireGuard mesh without central servers, enabling rapid synchronization while reducing state conflicts. Despite setbacks, such as costly schema changes and dual system dependencies, Fly.io iterated on Corrosion by implementing watchdogs, simplifying updates, and regionalizing the system to limit the impact of state bugs, ultimately achieving a robust and efficient distributed system.