CockroachDB is a distributed SQL database designed to survive entire data-center outages without losing data, maintained by Cockroach Labs. It sits around #28 in real-world usage (roughly 1%, tied with PocketBase) โ it speaks a Postgres-compatible wire protocol while automatically replicating data across regions.
CockroachDB uses standard SQL and the Postgres wire protocol, so most Postgres clients and drivers work unchanged:
CREATE TABLE accounts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
balance DECIMAL NOT NULL
);
SELECT id, balance FROM accounts WHERE balance > 1000;
CockroachDB runs as a standalone binary or cluster, easiest to try locally as a single node:
# start a single-node local cluster
cockroach start-single-node --insecure --listen-addr=localhost:26257