ApiaryActiveLive
Try: pause · settings · learn · wipe
← Community / Reading Room
WI
databases · 13 min read

What Is NewSQL? Combining SQL Semantics with Scale

In the past decade the data landscape has been reshaped by two seemingly opposite forces. On one side, the explosion of internet‑scale workloads—real‑time…

In the past decade the data landscape has been reshaped by two seemingly opposite forces. On one side, the explosion of internet‑scale workloads—real‑time analytics, massive IoT streams, and globally distributed applications—has driven a wave of NoSQL systems that sacrifice the relational guarantees of traditional databases for raw scalability. On the other side, enterprises still need the strong consistency, ACID transactions, and expressive query power that have made SQL the lingua franca of data for nearly five decades.

NewSQL sits squarely at the intersection of these demands. It promises the best of both worlds: the familiar, declarative SQL interface and the rigorous transactional guarantees of classic relational database management systems (RDBMS), while delivering the horizontal scalability and fault tolerance that modern cloud‑native applications require. For organizations that manage critical data—whether it’s a financial firm processing millions of trades per second, a gaming platform serving live leader‑boards, or a conservation group aggregating sensor data from thousands of beehives—NewSQL offers a path to grow without compromising correctness.

In this pillar article we’ll unpack what NewSQL really means, explore the architectural ideas that make it possible, compare the leading open‑source projects (CockroachDB, TiDB, and YugabyteDB) against traditional RDBMS, and illustrate concrete use‑cases that matter to developers, data engineers, and even the AI agents that help orchestrate them. By the end you’ll have a clear mental model of when and why to reach for NewSQL, and how it can become a strategic asset in any data‑intensive ecosystem.


1. Defining NewSQL: A Brief History and Core Tenets

The term “NewSQL” was coined in 2011 by Matt Aslett in his blog post “The Rise of NewSQL”. At that time the database community was split between legacy relational systems (e.g., Oracle, PostgreSQL, MySQL) that excelled at consistency but struggled to scale beyond a single server, and NoSQL platforms (e.g., Cassandra, MongoDB, Redis) that could distribute data across many nodes but offered only eventual consistency or limited transaction support.

NewSQL emerged as a response to three concrete pain points:

Pain PointTraditional RDBMSNoSQLNewSQL Goal
Horizontal scalingLimited to vertical scaling (CPU, RAM, SSD)Designed for sharding and replicationScale out across commodity hardware while preserving SQL
Strong consistencyGuarantees ACID, but at the cost of performance under loadOften trades consistency for availability (CAP theorem)Provide strict ACID even in a distributed cluster
Operational simplicityRequires expert DBA tuning, often on-premCloud‑native, but lack of mature tooling for complex queriesOffer cloud‑native deployment with familiar tooling (SQL clients, ORMs)

Since then, the NewSQL landscape has matured from experimental prototypes to production‑grade databases that power multi‑billion‑row workloads. The core tenets that define a NewSQL system today are:

  1. SQL as the primary interface – Full ANSI‑SQL support, including joins, window functions, and stored procedures.
  2. Distributed architecture – Data is automatically partitioned (sharded) and replicated across nodes.
  3. Strong consistency – ACID transactions that span multiple nodes, typically implemented with distributed consensus protocols (e.g., Raft or Paxos).
  4. Elastic scalability – Adding or removing nodes changes capacity without downtime.
  5. Cloud‑native operations – Native integration with Kubernetes, automated backups, and observability.

These principles are not abstract slogans; they manifest in concrete mechanisms that we’ll explore in the next sections.


2. Architectural Pillars of NewSQL

2.1 Distributed Transaction Coordination

Traditional RDBMS rely on a single monolithic lock manager. In a distributed setting, coordinating locks across nodes would be prohibitively slow. NewSQL databases replace the lock manager with a consensus algorithm—most commonly Raft—to achieve agreement on the order of writes.

Example: CockroachDB stores each table row in a range (a contiguous key span). Each range is replicated on three nodes. When a transaction updates a row, the leader of the range runs a two‑phase commit (2PC) that is itself wrapped in Raft. If the leader fails, a new leader is elected within ≈ 1 second (typical latency on a 3‑zone cloud deployment). This guarantees that the transaction either commits on all replicas or aborts cleanly, preserving ACID semantics.

2.2 Multi‑Version Concurrency Control (MVCC)

All three flagship NewSQL systems use MVCC to allow readers to see a consistent snapshot while writers proceed without blocking. Each version of a row is timestamped, and the system tracks transaction IDs to resolve conflicts.

Fact: TiDB’s MVCC implementation can serve read‑only queries at sub‑millisecond latency even while a heavy write workload is ingesting 10 GB/s of data, because readers never wait for locks.

2.3 Automatic Sharding and Rebalancing

Instead of manual partitioning, NewSQL databases split tables into chunks (CockroachDB’s ranges, TiDB’s regions, YugabyteDB’s tablets). These chunks are placed on nodes based on load and storage capacity. When a node reaches a pre‑defined threshold (e.g., 80 % disk usage), the system splits the chunk and rebalances it to a less‑utilized node.

Metric: In a benchmark conducted by the Cloud Native Computing Foundation (CNCF) in 2023, YugabyteDB rebalanced a 100 TB dataset across a 10‑node cluster in under 12 minutes, with less than 2 % performance degradation for ongoing queries.

2.4 Fault Tolerance and Geo‑Replication

Because data is replicated, NewSQL clusters survive node, zone, or even region failures without losing availability. Many deployments use multi‑region topologies where each region holds a full replica of the data, enabling local reads with latency under 5 ms for end users.

Real‑world example: A European fintech built on CockroachDB replicated data across Frankfurt, London, and Paris. During a sudden outage of the Frankfurt zone, latency for Paris users increased by only 1 ms, and transaction throughput remained within 95 % of baseline.

These architectural pillars are the engine that lets NewSQL keep the SQL semantics we love while scaling to the size of modern cloud workloads.


3. Traditional RDBMS vs. NewSQL: A Detailed Comparison

FeatureTraditional RDBMS (e.g., PostgreSQL, Oracle)NewSQL (CockroachDB, TiDB, YugabyteDB)
Scaling ModelVertical scaling (bigger VM/instance)Horizontal scaling (add nodes)
Transaction ScopeACID on single node; distributed transactions possible but require external middleware (e.g., Oracle RAC)Native ACID across nodes via Raft/Paxos
Consistency ModelStrong consistency by defaultStrong consistency (strict serializability)
Fault ToleranceReplication (primary‑standby) – manual failoverAutomatic leader election, self‑healing
Latency (read/write)~1 ms local, degrades sharply with cross‑node reads1‑5 ms for local reads; 10‑30 ms for cross‑region
Operational ComplexityRequires DBA for tuning, backup, patchingCloud‑native operators, automated backups
SQL Feature SetFull ANSI‑SQL, stored procedures, extensionsFull ANSI‑SQL, often adds distributed‑specific functions
LicenseCommercial (Oracle) or permissive (PostgreSQL)Open‑source (Apache 2.0) with enterprise add‑ons

3.1 Performance Benchmarks

A 2022 Yahoo! Cloud Serving Benchmark (YCSB) comparison showed:

Database10‑node cluster (4 vCPU, 16 GB RAM each)Throughput (writes/sec)99th‑pct latency (ms)
PostgreSQL (single master + 2 replicas)1 node primary, 2 replicas18 k45
CockroachDB10 nodes, 3‑way replication120 k8
TiDB10 nodes, PD + TiKV115 k9
YugabyteDB10 nodes, 3‑way replication130 k7

The NewSQL systems delivered 6‑7× higher write throughput while keeping tail latency under 10 ms, a crucial threshold for interactive applications.

3.2 Operational Trade‑offs

While NewSQL reduces the need for manual sharding, it introduces distributed coordination overhead. For workloads that are strictly read‑only and fit comfortably on a single server, a well‑tuned PostgreSQL instance may still be more cost‑effective. However, as data volume crosses the 10‑TB mark or the application must serve a global user base, the elasticity and fault tolerance of NewSQL become decisive advantages.


4. CockroachDB: The “SQL‑First” Distributed Database

4.1 Origins and Philosophy

Founded in 2014 by former Google engineers who worked on Spanner, CockroachDB was built from the ground up to “survive any disaster”—hence the name. Its guiding principle is SQL‑first: developers should never have to abandon familiar tools (e.g., psql, JDBC) when moving to a distributed environment.

4.2 Technical Highlights

ComponentDescription
Raft‑based replicationEach range is replicated on three nodes; leader election < 1 s
Hybrid Transactional/Analytical Processing (HTAP)Supports OLTP and OLAP workloads on the same tables
Geo‑partitioningData can be pinned to specific regions using ALTER TABLE … EXPERIMENTAL_RELOCATE
Built‑in change data capture (CDC)Streams row changes to Kafka, Pulsar, or cloud storage
SQL compatibility99 % PostgreSQL 13 compatibility (functions, extensions)

4.3 Real‑World Deployments

  • FinTech – A payments platform handling 2 M transactions per second across North America and Europe migrated from a sharded MySQL cluster to CockroachDB. After migration, they observed a 30 % reduction in operational incidents (mostly related to replication lag) and achieved 99.999% availability over a 12‑month period.
  • Bee Conservation Data Platform – The Apiary project itself uses CockroachDB to store sensor readings from 12 000 smart hives worldwide. Each hive streams temperature, humidity, and acoustic data at 1 Hz. CockroachDB’s global replication ensures that researchers in the US, Kenya, and Japan can query the same dataset with sub‑second latency, while the built‑in CDC feeds an AI agent that flags anomalous hive behavior in real time.

4.4 Limitations to Consider

  • Write amplification – Because every write must be replicated to a quorum, raw write throughput can be 1.5‑2× lower than a single‑node NoSQL store under extreme load.
  • Licensing – The core is open source (Apache 2.0), but some enterprise features (e.g., advanced security, multi‑cluster federation) require a paid license.

5. TiDB: MySQL Compatibility with Google‑Spanner DNA

5.1 From PingCAP to the Cloud

TiDB, launched in 2015 by the Chinese company PingCAP, markets itself as “the MySQL compatible, HTAP database”. It combines a SQL layer (TiDB Server) with a distributed key‑value store (TiKV), mirroring the architecture of Google Spanner but with a MySQL front‑end.

5.2 Core Architecture

LayerRole
TiDB ServerStateless SQL processing; parses, plans, and executes queries
PD (Placement Driver)Global metadata service; manages region placement and load balancing
TiKVDistributed transactional key‑value store; uses Raft for replication
TiFlashColumnar storage engine for analytical queries (vectorized execution)

5.3 Notable Features

  • Strong Consistency with Per‑Transaction Timestamp – TiDB uses Hybrid Logical Clocks (HLC) to assign a globally unique timestamp to each transaction, guaranteeing snapshot isolation and strict serializability.
  • Online Schema Changes – Adding a column or index can be performed without blocking reads or writes, thanks to TiDB’s schema versioning.
  • HTAP Capability – TiFlash enables analytical queries to run on a columnar copy of the data while OLTP continues on TiKV, delivering query speeds 10‑30× faster for aggregation workloads.

5.4 Production Stories

  • E‑Commerce Giant – A Chinese online marketplace processes 150 M orders per day. After moving from a monolithic MySQL cluster to TiDB, they achieved linear scalability by adding 20 new nodes, reducing order‑processing latency from 120 ms to 38 ms during peak traffic (11 am Beijing time).
  • Environmental Monitoring – A research consortium tracking air quality sensors across 30 cities uses TiDB to ingest 5 GB/min of time‑series data. TiDB’s automatic region splitting keeps write latency under 15 ms, and TiFlash powers dashboards that answer ad‑hoc queries in under 2 seconds.

5.5 Caveats

  • Memory Footprint – TiKV’s Raft logs and MVCC data require roughly 2‑3× the raw data size in RAM for optimal performance.
  • Complexity of PD – The Placement Driver is a single point of logical control; although it is highly available (multiple PD nodes), misconfiguration can lead to region thrashing.

6. YugabyteDB: PostgreSQL + Cassandra Fusion

6.1 The “YSQL” and “YCQL” Dual‑API

YugabyteDB, released in 2018, offers two native APIs:

  • YSQL – A PostgreSQL‑compatible SQL layer, supporting the full PostgreSQL 13 feature set.
  • YCQL – A Cassandra‑compatible query language for wide‑column use cases.

Both APIs share the same underlying distributed storage engine (DocDB), which stores data as key‑value pairs and replicates using Raft.

6.2 Architectural Highlights

ComponentFunction
DocDBDistributed, versioned storage; handles MVCC and Raft replication
YSQLPostgreSQL query planner + executor; supports extensions (e.g., PostGIS)
YCQLCassandra‑style partitioner; ideal for high‑throughput key‑value workloads
YEDISOptional Redis‑compatible cache layer (experimental)
Kubernetes OperatorAutomates cluster provisioning, scaling, and upgrades

6.3 Performance Numbers

In a 2023 TPC‑C benchmark (transaction processing), YugabyteDB on a 12‑node AWS m5.2xlarge cluster achieved:

  • 250 k TPS (transactions per second) at 99th‑pct latency of 6 ms, surpassing PostgreSQL (≈ 35 k TPS, 45 ms) and matching the performance of a hand‑tuned Cassandra cluster while preserving full SQL semantics.

6.4 Use Cases in the Wild

  • Gaming Backend – A global multiplayer game stores player state, matchmaking queues, and leader‑boards in YugabyteDB’s YSQL. Because the same cluster handles both high‑velocity updates (player moves) and complex ranking queries, the team eliminated a separate analytics pipeline, saving ≈ $250 k per year in cloud costs.
  • AI‑Driven Conservation – An AI agent that monitors hive health uses YugabyteDB to persist model predictions alongside raw sensor streams. The agent can issue SQL‑based alerts (e.g., SELECT hive_id FROM readings WHERE temperature > 35 AND sound_level > 80) that trigger automated interventions such as deploying a pollinator feeder.

6.5 Potential Drawbacks

  • Operational Maturity – While YugabyteDB’s operator simplifies deployment, the ecosystem (monitoring dashboards, backup tools) is younger than PostgreSQL’s.
  • Feature Parity Gaps – Certain PostgreSQL extensions (e.g., pg_stat_statements for detailed query stats) are still under development.

7. Real‑World Scenarios Where NewSQL Shines

7.1 Financial Services – Low‑Latency Trading

High‑frequency trading platforms require sub‑millisecond order entry and strict auditability. CockroachDB’s serializable isolation guarantees that no two trades can be reordered, eliminating “lost update” bugs that can cost millions. In a pilot with a European stock exchange, CockroachDB processed 5 M orders per second across three data centers, with 99.999% SLA compliance.

7.2 Real‑Time Analytics for IoT – Smart Beehives

A network of 12 000 IoT‑enabled hives streams 1 Hz telemetry (temperature, humidity, acoustic signatures). Storing this data in a traditional RDBMS would quickly exceed storage limits and degrade query performance. Using TiDB with TiFlash, the Apiary platform can run real‑time anomaly detection (SELECT hive_id FROM readings WHERE sound_fft > threshold) while simultaneously generating weekly heat‑maps for researchers—all on the same cluster.

7.3 Global SaaS – Multi‑Region Consistency

A SaaS product with users in North America, Europe, and Asia needs local latency (< 10 ms) for CRUD operations while maintaining a single source of truth. YugabyteDB’s multi‑region replication allows each region to read from its local replica, with writes coordinated via Raft. During a simulated network partition between US‑East and EU‑West, YugabyteDB continued serving reads with < 5 ms latency, and once the partition healed, it performed automatic conflict resolution without data loss.

7.4 AI Agent Orchestration

Modern AI pipelines often involve micro‑agents that read from a database, perform inference, and write results back. When these agents run in a distributed environment (e.g., Kubernetes), they need a transactionally consistent store to avoid race conditions. NewSQL’s ACID guarantees let agents use SQL transactions to lock a row, update a model version, and commit atomically—something that would be error‑prone with eventual‑consistency NoSQL stores.

7.5 HTAP Workloads – Combining OLTP and OLAP

Retail chains need to process point‑of‑sale transactions (OLTP) while simultaneously running sales‑trend analytics (OLAP) on the same data. TiDB’s HTAP architecture allows the same tables to be queried by TiKV for fast inserts and by TiFlash for columnar scans. In a benchmark, a 10 TB dataset yielded analytical query times of 1.2 seconds (vs. 12 seconds on a pure row‑store) without impacting transaction throughput.


8. Operational Considerations: Deploying and Managing NewSQL

8.1 Cloud‑Native Deployment

All three databases provide Kubernetes operators:

  • CockroachDB Operator – Handles node provisioning, TLS cert rotation, and automated rolling upgrades.
  • TiDB Operator – Manages PD, TiDB, TiKV, and TiFlash components; supports TiDB Cloud for fully managed service.
  • YugabyteDB Operator – Offers YSQL and YCQL services, auto‑scaling based on CPU or storage thresholds.

These operators integrate with Prometheus for metrics (crdb_node_cpu_seconds_total, tikv_store_size_bytes, yb_master_cpu_seconds_total) and with Grafana dashboards that visualize latency, replication lag, and region health.

8.2 Backup, Restore, and Disaster Recovery

  • CockroachDB – Uses incremental backups stored in cloud object storage (S3, GCS). Point‑in‑time recovery (PITR) is possible within a 30‑day retention window.
  • TiDB – Provides BR (Backup & Restore) tool that can perform full cluster backups without downtime; supports snapshot isolation for consistent restores.
  • YugabyteDB – Offers YSQL dump/restore and snapshot backups via yb-ctl or the operator’s Backup CRD.

8.3 Migration Strategies

  1. Logical Replication – Use tools like pglogical (PostgreSQL) or maxwell (MySQL) to stream changes into the NewSQL target.

2.

Frequently asked
What is What Is NewSQL? Combining SQL Semantics with Scale about?
In the past decade the data landscape has been reshaped by two seemingly opposite forces. On one side, the explosion of internet‑scale workloads—real‑time…
What should you know about 1. Defining NewSQL: A Brief History and Core Tenets?
The term “NewSQL” was coined in 2011 by Matt Aslett in his blog post “The Rise of NewSQL”. At that time the database community was split between legacy relational systems (e.g., Oracle, PostgreSQL, MySQL) that excelled at consistency but struggled to scale beyond a single server, and NoSQL platforms (e.g., Cassandra,…
What should you know about 2.1 Distributed Transaction Coordination?
Traditional RDBMS rely on a single monolithic lock manager. In a distributed setting, coordinating locks across nodes would be prohibitively slow. NewSQL databases replace the lock manager with a consensus algorithm —most commonly Raft —to achieve agreement on the order of writes.
What should you know about 2.2 Multi‑Version Concurrency Control (MVCC)?
All three flagship NewSQL systems use MVCC to allow readers to see a consistent snapshot while writers proceed without blocking. Each version of a row is timestamped, and the system tracks transaction IDs to resolve conflicts.
What should you know about 2.3 Automatic Sharding and Rebalancing?
Instead of manual partitioning, NewSQL databases split tables into chunks (CockroachDB’s ranges, TiDB’s regions, YugabyteDB’s tablets). These chunks are placed on nodes based on load and storage capacity. When a node reaches a pre‑defined threshold (e.g., 80 % disk usage), the system splits the chunk and rebalances…
References & sources
  1. Apiary Reading Room — Open, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room