DEV.co
Open-Source Databases · superfly

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.

Source: GitHub — github.com/superfly/corrosion
1.8k
GitHub stars
81
Forks
Rust
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorysuperfly/corrosion
Ownersuperfly
Primary languageRust
LicenseApache-2.0 — OSI-approved
Stars1.8k
Forks81
Open issues58
Latest releasev1.0.0 (2026-05-14)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the corrosion source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/superfly/corrosion.gitcd corrosion# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Global distributed systems with high latency

Ideal for geographically distributed clusters where avoiding central database round-trips (300ms+) is critical. Local reads complete in ~1ms, making it suitable for latency-sensitive applications across continents.

Eventual consistency service discovery

Replace Consul or similar tools when systems can tolerate eventual consistency. Gossip-based propagation with periodic sync ensures consistency without requiring Raft-style consensus overhead.

Flexible, schema-on-write configuration management

Leverage SQL-based queries and dynamic schema updates to manage state across large clusters. HTTP subscriptions and Rhai template rendering enable live configuration file population from distributed state.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related 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?
No. Corrosion provides eventual consistency via gossip and periodic resynchronization. Changes propagate asynchronously; read-your-write consistency is not guaranteed. Applications must tolerate stale reads or use HTTP subscriptions for change notifications.
Can I use Corrosion with Kubernetes?
Unknown. Provided data does not describe Kubernetes integration, operators, or Helm charts. You can run agents as DaemonSets or StatefulSets manually, but native Kubernetes support and auto-discovery are not documented in the excerpts.
What are the per-node resource requirements?
Not specified in provided data. Benchmark memory/CPU overhead, SQLite database size, and gossip network bandwidth for your cluster size before production deployment.
How does Corrosion differ from distributed Postgres/CockroachDB?
Corrosion prioritizes local read latency and eventual consistency over strong consistency. Unlike ACID databases, it trades write coordination overhead for gossip-based propagation. Suited for service discovery; less suitable for transactional workloads.

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.