YugabyteDB
Distributed SQL database reusing the PostgreSQL query layer over a Raft-replicated DocDB storage engine.
What it is
A distributed SQL database whose YSQL interface reuses the actual PostgreSQL query layer — parser, planner and executor — on top of DocDB, a distributed document store built on a RocksDB-derived engine. The core is Apache-2.0.
Architecture
YB-TServer nodes store data as tablets, each a Raft group with three replicas by default. YB-Master nodes hold cluster metadata and are themselves Raft-replicated, off the data path. A YCQL interface provides a Cassandra-compatible API over the same storage.
Best use cases
- Transactional workloads outgrowing a single PostgreSQL node, where PostgreSQL feature fidelity matters.
- Multi-region deployments requiring geo-partitioning for residency or latency.
- Teams with deep PostgreSQL expertise who want to keep the query layer they know.
When not to use it
- When a single PostgreSQL node with a replica suffices — which remains the common case.
- When write latency budgets cannot absorb consensus round trips.
- When you need a specific PostgreSQL extension or behaviour that depends on PostgreSQL's storage internals.
Data model
PostgreSQL SQL, with sharding expressed in the primary key: HASH for even distribution, ASC/DESC
for range sharding with efficient range scans. Tables can be pre-split into tablets at creation.
Consistency and transactions
Distributed ACID transactions across tablets and regions. SERIALIZABLE, REPEATABLE READ
(implemented as snapshot isolation) and READ COMMITTED are available. Conflicting transactions
abort with SQLSTATE 40001 and must be retried. Follower reads with a configurable staleness bound
are available per session.
Scaling model
Add tablet servers; tablets split and rebalance. Throughput scales with node count when the key distributes evenly across tablets.
Replication
Raft per tablet. Placement policy controls how replicas spread across cloud, region and zone. Read replica clusters add distant read capacity without joining the quorum, and xCluster provides asynchronous replication between separate clusters.
Backup and recovery
Distributed snapshots exported to object storage, plus snapshot schedules for point-in-time
recovery. ysql_dump works for logical exports through the PostgreSQL interface.
Monitoring
Prometheus metrics from masters and tablet servers, plus master and tablet server web UIs. Watch under-replicated tablets, leader distribution, write latency, queued RPCs and clock skew.
Common mistakes
Production checklist
See YugabyteDB Production Checklist.