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
Don't Panic
Don't Panic — Distributed SQL Databases
A distributed SQL database is what happens when a relational database refuses to choose between tables and more machines. It still accepts SQL, indexes, constraints, and transactions. Behind the polite counter, it divides the keyspace into partitions, makes replicas, and asks those replicas to agree before a change counts. The application sees one database. The database sees a surprisingly large amount of geography.
Before this arrangement, teams usually chose a conventional relational server or manually split data across several of them. The first choice keeps coordination nearby but eventually meets one machine's limits. The second spreads storage, then quietly gives the application a second job: know which shard owns a row and coordinate anything that crosses shards. Distributed SQL moves much of that plumbing into the database. It does not put the network in a cupboard under the stairs.
The useful mental picture is partitioning plus replication. A partition is a unit of distinct data placement; a replica is a copy of that unit. Splitting a partition makes more ownership units. Adding replicas helps a unit survive failures or serve suitable reads. They are different levers, which is fortunate because a system confusing its levers is usually busy inventing new forms of inconvenience.
Then comes the quorum, the set of voting replicas needed to approve a change. With three voting replicas, two can continue when one fails. One alone cannot safely keep accepting conflicting writes. This means a cluster can look alive while a particular partition is unavailable. That is not a contradiction. It is the database declining to turn an uncertain story into a confident lie.
The surprise is that SQL does not erase placement. A primary key that keeps new writes at one ordered edge can create a hot partition. A transaction that touches several partitions needs more coordination than one that stays local. A quorum across regions survives a wider failure but adds wide-area delay to writes. Familiar statements therefore acquire unfamiliar costs, like a small dog discovering it has inherited a railway.
The Course tab explains the layers and write path. Slides compress the tradeoffs into a map. Cheatsheet is where to keep the vocabulary, quorum arithmetic, key rules, and incident signals nearby. Field Notes names the production mistakes that arrive after the sales diagram has gone home. Reference links lead to the product-specific contract, because isolation defaults, retry behavior, and read choices are details that deserve more respect than a broad label.
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
- https://www.cockroachlabs.com/docs/stable/start-a-local-cluster.html
Supports
- Local insecure three-node cluster setup, SQL gateways, and sample workload use for the exercise
- https://www.cockroachlabs.com/docs/stable/developer-basics.html
Supports
- Serializable transaction behavior, contention, retry errors, and driver retry wrappers
- https://www.cockroachlabs.com/blog/what-to-do-when-a-transaction-fails-in-cockroachdb/
Supports
- Application-level transaction retry boundaries and driver or ORM guidance
- https://www.cockroachlabs.com/blog/how-to-choose-db-index-keys/
Supports
- Sequential-key hot ranges and the distribution tradeoff of hash-sharded indexes
- https://www.cockroachlabs.com/docs/v24.2/ui-hot-ranges-page
Supports
- Per-range hotspot diagnostics, QPS, CPU, writes, leaseholder, and key-range evidence
