A distributed SQL database that survives node, zone, or region failures without losing consistency.
Technical Overview & Architecture
CockroachDB is a distributed SQL database built on a transactional, strongly-consistent key-value store that uses the Raft consensus protocol to replicate data across nodes, availability zones, or geographic regions. It automatically shards data into ranges, rebalances them across the cluster, and routes reads/writes to the nearest healthy replica, giving engineering teams horizontal scalability and multi-region survivability without manual sharding logic or failover scripts. Because it speaks the PostgreSQL wire protocol and supports a large subset of Postgres SQL syntax, existing ORMs, drivers, and tools (psql, JDBC, npm pg, GORM, Prisma, Hibernate) work with minimal changes, making it a common target for teams migrating off single-node Postgres or MySQL when they hit scaling or availability limits. The architecture separates SQL, transaction, and distribution layers from the underlying replicated storage engine, enabling online schema changes, distributed ACID transactions across ranges, and configurable data locality via geo-partitioning and zone configs to meet residency requirements like GDPR. It's used heavily for financial services, e-commerce, SaaS control planes, and other OLTP workloads that need "always-on" behavior — RPO=0, low RTO — across data centers or cloud regions, as well as for multi-tenant SaaS backends needing row-level partitioning per customer. Target users are backend and platform engineers running production transactional systems that can't tolerate regional outages, plus DBAs and SREs who want Kubernetes-native, self-healing infrastructure. It ships as CockroachDB Cloud (fully managed serverless or dedicated clusters) and CockroachDB Core (self-hosted, open-source under BSL), with official support for Go, Java, Python, Node.js, Ruby, and any Postgres-compatible driver, plus native change data capture (CDC) integrations into Kafka, Pub/Sub, and cloud storage sinks.
Pricing Breakdown
Transparent tiers and feature allotments for engineering teams.
Core (Self-Hosted)
- Open-source under Business Source License
- Full distributed SQL engine and Raft replication
- Manual cluster management on your own infrastructure
- Community support via forums/Slack
- Converts to Apache 2.0 license after 3 years per version
Basic (Serverless)
- 50M Request Units and 10 GiB storage free per month
- Fully managed, autoscaling serverless clusters
- Pay only for Request Units and storage beyond free tier
- Automatic pause/resume for idle databases
- Built-in backups and point-in-time restore
Standard
- Provisioned capacity with autoscaling limits
- Multi-region cluster topology
- Higher throughput SLAs than Basic
- Metrics export and advanced monitoring
- Standard support with defined response times
Advanced (Enterprise)
- Dedicated single-tenant clusters (CockroachDB Dedicated)
- Enterprise CDC, encryption-at-rest, and RBAC
- Private VPC peering / private cloud connectivity
- SOC 2, HIPAA, PCI-compliant deployments
- 24/7 premium support with dedicated TAM and uptime SLA
Compare CockroachDB Against Alternatives
See how CockroachDB stacks up against competitor tools across speed, APIs, and pricing.