# superfly/corrosion

Gossip-based service discovery (and more) for large distributed systems.

Repository: https://github.com/superfly/corrosion
Canonical: https://ross.abutalabs.com/products/corrosion
Homepage: https://superfly.github.io/corrosion/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: database, distributed, distributed-systems, gossip, rust, sqlite, swim
Last push: 2026-08-26T13:27:13+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 87
- inputs: {"age_days": 1228, "days_push": 7, "days_rel": 111, "gap_med": 0, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1831, forks 89 (observed 2026-08-28T04:05:41.899544+00:00)

## What it is
Corrosion is a Rust-based distributed system that propagates SQLite state across a cluster using gossip (SWIM membership via Foca) and CRDT conflict resolution (CR-SQLite). Each node runs an agent exposing a local HTTP API for SQL reads/writes, query subscriptions, and QUIC-secured peer-to-peer sync.

## Use cases
- service discovery across a large global network without a central state store
- replace Consul's central database with eventually consistent distributed state
- read cluster state locally with sub-millisecond latency instead of remote round-trips
- subscribe to SQL query results over HTTP streaming for live config updates
- populate configuration files from distributed state with Rhai templates
- run a multi-writer SQLite database that syncs across many nodes

## When to choose
- you need fast, eventually consistent shared state across a large fleet of hosts
- round-trips to a centralized Raft-based store like Consul are too slow for your use case
- you want flexible schemas and SQL queries with local reads on every node
- you need live subscriptions to state changes for config generation

## When to avoid
- you need strong/serializable consistency guarantees rather than eventual consistency
- your cluster is small enough that a conventional database or Consul works fine
- you need a general-purpose relational database with full SQLite feature coverage
- you require mature, battle-tested documentation and a large community

## Facets
- artifact type: service
- maturity: active
- function: database, service-discovery, http-server, cli, streaming, caching
- domain: microservices, databases, networking, infrastructure-as-code, self-hosted
- platform: rust, self-hosted, cross-platform
- tags: gossip-protocol, swim, crdt, sqlite, quic, eventual-consistency, cluster-membership, consul-replacement, linux, macos

## Member repositories
- superfly/corrosion (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:41.899544+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:19:13.397797+00:00, confidence not recorded.
  - readme: https://github.com/superfly/corrosion (fetched 2026-08-28T04:05:41.899544+00:00, sha a2e31b9fb298)
  - homepage: https://superfly.github.io/corrosion/ (fetched 2026-08-29T10:58:00.758444+00:00, sha 4f5d8297d2da)
- Data as of 2026-08-30T08:39:29.467469+00:00.
