corrosion
Corrosion is a distributed service discovery system built by Fly.io that replaces centralized databases with gossip-based state sharing across cluster nodes. Each node runs a local SQLite database that syncs changes with peers using CRDT conflict resolution, enabling fast local reads without expensive round-trips to remote databases.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | superfly/corrosion |
| Owner | superfly |
| Primary language | Rust |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.8k |
| Forks | 81 |
| Open issues | 58 |
| Latest release | v1.0.0 (2026-05-14) |
| Last updated | 2026-07-07 |
| Source | https://github.com/superfly/corrosion |
What corrosion is
Corrosion uses SWIM protocol via Foca for cluster membership, CR-SQLite with CRDTs for conflict-free replication, and QUIC transport for secure peer communication. Applications query the local HTTP API, while the system gossips changes and periodically resynchronizes state across a subset of cluster nodes to maintain eventual consistency.
Get the corrosion source
Clone the repository and explore it locally.
git clone https://github.com/superfly/corrosion.gitcd corrosion# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Deploy one Corrosion agent per node/host and configure initial cluster membership; state will synchronize through gossip and periodic resync.
- Define database schemas via files with on-the-fly updates; use SQL for queries, ensuring applications adapt to eventual consistency semantics.
- Monitor gossip propagation latency and resync frequency to balance consistency guarantees against network overhead in your topology.
- Plan QUIC transport security (certificates, peer verification) and ensure firewall rules allow peer-to-peer communication across nodes.
- Test Consul service registration integration carefully if migrating existing deployments; validate that local subscriptions and templates reflect expected state transitions.
When to avoid it — and what to weigh
- Strong consistency is non-negotiable — Corrosion guarantees eventual consistency, not strict ordering. Systems requiring immediate, global consensus (e.g., financial transactions, distributed locks) should use Raft-based systems like Consul or etcd.
- Small or single-region deployments — Gossip overhead and multi-node complexity add operational burden. Centralized databases or simpler solutions are cheaper and easier for small clusters or single-region setups.
- Limited Rust ecosystem expertise in your team — Corrosion is written in Rust and deployed as a native binary. Debugging, extending, and maintaining require Rust knowledge or willingness to invest in it.
- Requirement for horizontal auto-scaling without operational management — Corrosion requires explicit cluster membership configuration and gossip protocol tuning. Kubernetes-native, operator-friendly service discovery tools may be simpler at scale.
License & commercial use
Licensed under Apache License 2.0, a permissive OSI-approved license.
Apache 2.0 permits commercial use, redistribution, and modification with attribution and liability/warranty disclaimers. No restrictions on business deployment known. Verify compliance with your legal team if bundling or modifying source.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
QUIC transport is specified for peer-to-peer communication. Certificate-based peer authentication required. No CVE history, exploit details, or penetration test results provided in data. Review QUIC/Quinn and CR-SQLite dependency security practices. Gossip protocol flooding attacks not discussed; validate network isolation and rate-limiting for production.
Alternatives to consider
Consul
Mature, centralized service discovery with strong consistency (Raft). Trade: single point of contention and higher latency for global queries. Better for small-to-medium clusters.
etcd
Distributed key-value store with strong consistency guarantees. Trade: higher write latency and operational complexity. Suitable when consensus is mandatory.
Envoy + xDS protocol
Modern service mesh approach with push-based config delivery. Trade: separate control plane, higher architectural complexity. Better integration with Kubernetes and observability stacks.
Build on corrosion with DEV.co software developers
Start with a test deployment in a non-critical cluster. Validate gossip propagation latency, consistency guarantees, and operational overhead against your SLAs before rolling out globally.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
corrosion FAQ
Does Corrosion guarantee data consistency across all nodes?
Can I use Corrosion with Kubernetes?
What are the per-node resource requirements?
How does Corrosion differ from distributed Postgres/CockroachDB?
Software development & web development with DEV.co
Adopting corrosion is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.
Ready to evaluate Corrosion for your infrastructure?
Start with a test deployment in a non-critical cluster. Validate gossip propagation latency, consistency guarantees, and operational overhead against your SLAs before rolling out globally.