Distributed SQL Databases
Distributed SQL databases store relational data across several machines while presenting one SQL database to applications. They coordinate replicas and transactions so the database can keep consistent data as it scales or survives machine and site failures.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Distributed SQL Databases
A distributed SQL database is a relational database whose data, query work, and transaction coordination span a cluster of machines. Applications still use tables, indexes, constraints, and SQL transactions. The database divides rows into partitions, maintains replicated copies, and coordinates changes across those partitions.
This combination addresses a hard operational problem. A single relational server offers familiar semantics, but its write throughput and storage eventually meet one machine's limits. Manual sharding spreads data across servers, but application code must route requests and coordinate work that crosses shards. Distributed SQL moves much of that routing, replication, and transaction logic into the database.
The result is not a faster form of every relational workload. Coordination adds network delays and failure modes that a single process does not have. Distributed SQL is most useful when horizontal scale, multi-zone survival, or geographic placement matters enough to pay that cost.
The logical database and the physical cluster
The application sees one logical database. Beneath that interface, most systems contain several layers:
- SQL layer: parses statements, checks schemas and permissions, chooses plans, and turns relational operations into reads and writes against distributed data.
- Distribution layer: maps keys or key ranges to partitions. Products call these units ranges, splits, tablets, or shards.
- Replication layer: keeps several copies of each partition and uses a consensus protocol to agree on an ordered log of changes.
- Transaction layer: provides isolation and atomicity when one transaction touches multiple keys or partitions.
- Placement and metadata services: track partition boundaries, replica locations, leaders, health, and placement constraints.
- Storage engine: persists keys and versions on each node. Multi-version concurrency control, or MVCC, retains timestamped versions so reads can use a consistent snapshot.
These responsibilities may run in one process or in separate compute and storage services. The boundary affects scaling and failure behavior, but the logical problem stays the same: route each operation to the correct replicated partition and preserve the promised transaction semantics.
How a write moves through the cluster
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://research.google/pubs/spanner-googles-globally-distributed-database-2/
Supports
- Spanner's 2012 publication, global distribution, synchronous replication, MVCC, TrueTime, automatic sharding, and externally consistent distributed transactions
- The primary architecture and historical grounding for modern distributed SQL
- https://docs.cloud.google.com/spanner/docs/true-time-external-consistency
Supports
- TrueTime uncertainty, transaction timestamps, MVCC snapshots, serializability, external consistency, strong reads, and stale reads
- https://docs.cloud.google.com/spanner/docs/schema-design
Supports
- Primary-key hotspot risks, split distribution, hash-based mitigation, and schema design for locality
- https://docs.cloud.google.com/spanner/docs/schema-and-data-model
Supports
- Ordered primary-key storage, contiguous splits, automatic split movement, and load-based splitting
- https://docs.cloud.google.com/spanner/docs/replication
Supports
- Per-split replication, voting and read-only replicas, leader placement, quorums, and geographic latency considerations
- https://docs.cloud.google.com/spanner/docs/whitepapers/life-of-reads-and-writes
Supports
- Strong read and write paths, Paxos groups, transaction managers, single-split optimization, and two-phase commit for multi-split transactions
- https://docs.cloud.google.com/spanner/docs/transactions
Supports
- Transaction retry behavior, isolation, locks, and risks from external side effects during retries
- https://research.google/pubs/f1-the-fault-tolerant-distributed-rdbms-supporting-googles-ad-business/
Supports
- Relational features over distributed storage and the write-latency tradeoff compared with MySQL
- https://research.google/pubs/bigtable-a-distributed-storage-system-for-structured-data/
Supports
- The 2006 publication and large-scale structured storage across commodity servers
- https://www.cockroachlabs.com/docs/stable/architecture/overview/
Supports
- SQL, transaction, distribution, replication, and storage layers; ranges; replicas; leaseholders; MVCC; and synchronous quorum writes
- https://www.cockroachlabs.com/docs/stable/architecture/distribution-layer
Supports
- Key-range routing, descriptors, automatic range splits and merges, and load distribution
- https://www.cockroachlabs.com/docs/stable/architecture/replication-layer
Supports
- Consensus groups, majority quorums, three-replica failure tolerance, leader and lease behavior, and partition response
- https://www.cockroachlabs.com/docs/stable/architecture/transaction-layer/
Supports
- MVCC, intents, transaction states, concurrency conflicts, serializable snapshots, retries, and distributed atomic commit
- https://www.cockroachlabs.com/docs/stable/transactions
Supports
- Application transaction syntax, isolation behavior, retry errors, and complete retry boundaries
- https://www.cockroachlabs.com/blog/cockroachdb-1-0-release/
Supports
- CockroachDB 1.0 production release on 2017-05-10 and its distributed SQL positioning
- https://docs.yugabyte.com/stable/architecture/
Supports
- PostgreSQL-oriented query layer, tablet-based DocDB storage, sharding, replication, distributed transactions, and cluster services
- https://www.yugabyte.com/blog/announcing-yugabyte-db-2-0-ga-jepsen-tested-high-performance-distributed-sql/
Supports
- YugabyteDB 2.0 general availability on 2019-09-17 and production-ready YSQL
- https://docs.pingcap.com/tidb/stable/tidb-architecture/
Supports
- Stateless TiDB SQL servers, Placement Driver metadata, TiKV regions and replicas, distributed transactions, and TiFlash analytical storage
- https://www.pingcap.com/press-release/announcing-tidb-1-0-release/
Supports
- TiDB 1.0 production release on 2017-10-16 and its distributed hybrid transactional and analytical design
- https://www.pingcap.com/about-us/
Supports
- PingCAP and TiDB project beginning in 2015 and MySQL-compatible distributed SQL scope
- https://research.ibm.com/publications/a-relational-model-of-data-for-large-shared-data-banks
Supports
- Codd's relational model paper published on 1970-06-01 and its data-independence purpose
- https://doi.org/10.1145/320128.320129
Supports
- SDD-1 overview published in 1980 and transparent distributed query, concurrency, failure, and directory management
- https://research.ibm.com/publications/computation-andamp-communication-in-rlesssupgreaterlesssupgreater-a-distributed-database-manager
Supports
- IBM R-star as an experimental distributed database manager presented at SOSP in 1983
- https://research.google/pubs/spanner-becoming-a-sql-system/
Supports
- Spanner's 2017 SQL-system publication and distributed query execution, resharding, and SQL evolution
- https://github.com/sindresorhus/awesome
Supports
- Required discovery starting point for curated awesome lists
- https://github.com/avelino/awesome-go#databases-implemented-in-go
Supports
- Discovery of CockroachDB and TiDB as Go-based distributed SQL database projects
- https://cloud.google.com/spanner
Supports
- Google Cloud Spanner as a managed globally distributed relational database product
- https://www.cockroachlabs.com/product/cockroachdb/
Supports
- CockroachDB Cloud and self-hosted distributed SQL positioning
- https://www.yugabyte.com/yugabytedb/
Supports
- YugabyteDB and YugabyteDB Aeon as PostgreSQL-compatible distributed SQL offerings
- https://www.pingcap.com/tidb/
Supports
- TiDB Cloud and self-managed TiDB as MySQL-compatible distributed SQL offerings
- https://en.oceanbase.com/
Supports
- OceanBase enterprise, cloud, and community distributed database offerings
- https://oceanbase.github.io/docs/user_manual/quick_starts/en-US/chapter_01_overview_of_the_oceanbase_database/overview
Supports
- OceanBase distributed SQL architecture, MySQL compatibility, and Mulan Public License community edition
- https://en.oceanbase.com/about
Supports
- OceanBase production deployment at Taobao in 2011 and subsequent product history
- https://www.singlestore.com/
Supports
- SingleStore as a distributed SQL product for transactional and analytical workloads
- https://docs.singlestore.com/db/v7.3/introduction/distributed-architecture/
Supports
- Aggregator and leaf architecture, distributed execution, and horizontal scaling
- https://www.singlestore.com/pricing/
Supports
- Proprietary managed and self-managed editions with a free development option and paid production tiers
- https://aws.amazon.com/rds/aurora/dsql/
Supports
- Amazon Aurora DSQL as a serverless, PostgreSQL-compatible distributed SQL service
- https://aws.amazon.com/rds/aurora/dsql/pricing/
Supports
- Usage-based proprietary service with a free tier and paid distributed processing and storage
- https://ydb.tech/
Supports
- YDB as an open-source distributed SQL database with managed service options
- https://github.com/ydb-platform/ydb
Supports
- Apache 2.0 licensing, strict consistency, distributed transactions, and separated compute and storage
