NewSQL & Distributed SQL Databases
Modern distributed SQL databases combining ACID with horizontal scaling: CockroachDB, TiDB, YugabyteDB, Google Spanner, Amazon Aurora, Vitess.
Modern distributed SQL databases combining ACID with horizontal scaling: CockroachDB, TiDB, YugabyteDB, Google Spanner, Amazon Aurora, Vitess.
| Name | Architecture brief | Consistency model | Scaling approach | Sql compatibility | Notable features | Use cases |
|---|---|---|---|---|---|---|
| CockroachDB | Distributed SQL database built on Cockroach Labs' Raft-based consensus and a custom distributed key-value store (RocksDB). Uses Google Spanner's TrueTime-inspired hybrid logical clocks for transaction ordering. | Serializable isolation (strict serializability) via MVCC and distributed transactions. Uses atomic clocks + NTP for timestamp ordering. No dirty reads. | Horizontal scaling via automatic sharding and rebalancing. Add nodes; data automatically redistributed. Geo-partitioning for data locality. | PostgreSQL wire-compatible (uses PostgreSQL syntax and protocol). Supports most PostgreSQL features, but some extensions not available. |
|
|
| TiDB | Distributed HTAP database. Separates compute (TiDB server) from storage (TiKV). TiKV is distributed transactional key-value store (Raft consensus). TiFlash columnar store for analytics. | Snapshot isolation (SI) by default; Serializable via pessimistic transaction (TiDB 4.0+). Strong consistency within region; async cross-region replication. | Horizontal: add TiKV nodes for storage, add TiDB nodes for compute. Automatic sharding and load balancing via Placement Driver (PD) cluster. | MySQL 8.0 compatible (wire protocol and syntax). Supports transactions, secondary indexes, joins, but not all MySQL features (e.g., stored procedures). |
|
|
| YugabyteDB | Distributed SQL database using document store (DocDB) as storage layer. DocDB is Raft-based distributed key-value store with per-shard replication. | Strong consistency via Raft consensus per shard. Serializable isolation for distributed transactions via 2PC. Reads from replicas possible with read replicas. | Horizontal via adding nodes; automatic tablet (shard) splitting and rebalancing. Tables distributed by hash or range partitioning. | PostgreSQL compatible (YSQL) and Cassandra-compatible (YCQL). YSQL supports most PostgreSQL features including extensions. |
|
|
| Google Spanner | Globally distributed relational database. Uses TrueTime API (GPS + atomic clocks) for globally synchronized timestamps. Storage: Paxos groups per directory; directories = contiguous key ranges. | External consistency (linearizability) via TrueTime. Strongly consistent globally. Serializability for transactions (2PC with TrueTime timestamps). | Horizontal via splitting directories (shards) and replication across regions. Automatic rebalancing. Add nodes for capacity; Spanner automatically distributes. | SQL dialect with extensions for interleaved tables, ARRAY, JSON. PostgreSQL and MySQL dialects via Cloud Spanner adapters. No foreign keys. |
|
|
| Amazon Aurora | MySQL/PostgreSQL-compatible cloud database. Storage layer separate from compute. Uses quorum-based replication (6 copies across 3 AZs). Log-structured storage with compute caching. | Strong consistency for committed transactions. Read replicas have replication lag (typically < 100ms). ACID compliant. Isolation level configurable (REPEATABLE READ default). | Storage auto-scales from 10GB to 128TB. Compute nodes can scale vertically (instance types) or horizontally (read replicas up to 15). Separation of storage/compute. | MySQL 5.7/8.0 compatible and PostgreSQL 10+ compatible. Drop-in replacement for most apps. Some storage-specific functions differ. |
|
|
| Vitess | Database clustering system for MySQL. Provides sharding, connection pooling, query rewriting, and topology management. Runs as separate proxy layer between app and MySQL. | Depends on MySQL transaction isolation. Vitess itself doesn't alter consistency; distributed transactions across shards via 2PC (experimental). | Horizontal via sharding. Vitess manages shard mapping, resharding, and rebalancing. Can move shards between nodes without downtime. | MySQL compatible (subset). Some queries require rewriting (joins across shards). Works with MySQL tools and clients. |
|
|
| SingleStore | Distributed SQL database combining rowstore (OLTP) and columnstore (OLAP) in single engine. Uses distributed architecture with partitioned tables and distributed joins. | Snapshot isolation by default; Serializable for single-row operations; strict serializability with distributed transactions. | Horizontal via leaf nodes (storage) and aggregator nodes (compute). Add leaf nodes to increase capacity; aggregators route queries. | MySQL wire-compatible (80-90% compatible). Supports ANSI SQL, JSON, geospatial. Some MySQL features not supported (e.g., foreign keys). |
|
|
The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.
curl "https://yjtoon.com/api/dataset/newsql-distributed-sql?format=toon"
const res = await fetch( "https://yjtoon.com/static-data/dataset/newsql-distributed-sql.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →