---
title: "Corrosion"
url: https://daily.dev/posts/corrosion-unmvt9xwq
source_url: https://fly.io/blog/corrosion/
type: article
source: "Fly.io"
published: 2025-10-22T22:22:19.709Z
updated: 2025-10-22T22:22:44.517Z
tags: ["architecture", "rust", "distributed-systems", "sqlite"]
reading_time: 11
upvotes: 26
comments: 2
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Corrosion

**[Fly.io](https://daily.dev/sources/flydotio)** · 11 min read · 26 upvotes · 2 comments

## Summary

Corrosion is an open-source distributed service discovery system built with Rust, SQLite, and CRDTs that uses gossip protocols instead of distributed consensus. Developed by Fly.io to solve global state synchronization across their platform, it propagates SQLite databases using SWIM-based gossip and cr-sqlite for conflict resolution. The article details major outages caused by the system, including a deadlock bug that locked up their entire proxy fleet, and describes their iterative improvements: watchdogs for event-loop stalls, extensive testing with Antithesis, eliminating partial updates, and regionalizing clusters to reduce blast radius.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://fly.io/blog/corrosion/>

## Community discussion

Top comments from developers on daily.dev.

**@kbbdy** · 0 upvotes

> I don't know all the details, and not even try to understand the way how fly.io decided to implement it by spreading sqlite database around the network, but it looks to me like reinventing the wheel and solving problems already solved.
> Why not to use some already working solution, with all these consensus solving problems, are already solved? For me it looks like brave solving of problems made by them.

## Similar posts on daily.dev

- [Why I Chose Rust for 0xInsider](https://daily.dev/posts/why-i-chose-rust-for-0xinsider-bzitxczjz) · Trevor Lasn · 21 upvotes · 6 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#rust](https://daily.dev/tags/rust), [#distributed-systems](https://daily.dev/tags/distributed-systems), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/corrosion-unmvt9xwq)
