The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech LeadsNov 27-28

Join

Corrosion

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

Why we built Corrosion

We built Corrosion specifically for service discovery across a large global network, replacing Consul’s central state database with eventually consistent state distributed across our hosts.

Our new tool needed to deliver the following:

Fast reads and writes

Getting state (data) from a central remote source can be incredibly expensive (at least 300ms for a round-trip to something on the other side of the world), but usually takes less than 1ms from a local source.

Fast, eventual, consistency

Many use cases can cope with eventual consistency, especially if a consistent state is attained sooner than later. Raft fell short for some use cases at Fly.io where round-trips to a centralized location are too expensive.

Flexibility

Global state for a distributed system isn't one-size-fits-all. Flexible schemas and queries are essential.

How Corrosion works

In a nutshell, Corrosion:

Features

Usage overview

Run the Corrosion agent on every node/host in the cluster. Other programs running on the node use Corrosion's HTTP API to query the local Corrosion SQLite database, add and update data, and subscribe to change notifications.

The Corrosion CLI provides commands for administration and access to database and features.

Quick start

See the WIP Corrosion documentation for more details.

Building Corrosion

Clone https://github.com/superfly/corrosion.git.

From within the repo directory:

cargo build --release && mv target/release/corrosion ./

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.