SYSTEM Cited by 1 source
TiDB¶
TiDB is an open-source, distributed NewSQL database built by PingCAP. It combines NoSQL-style horizontal scalability with RDBMS- style SQL, ACID semantics, and secondary indexes — positioned as the successor to legacy NoSQL stores when the workload has grown past per-row atomicity.
Definition¶
TiDB's architecture layers:
- TiDB server — stateless SQL layer; MySQL-protocol-compatible.
- TiKV — distributed transactional KV store (RocksDB-backed) that provides the actual data storage with Raft-based replication.
- TiFlash — optional columnar replica for HTAP analytics.
- PD (Placement Driver) — cluster metadata and scheduler.
Core properties:
- Horizontal scalability via automatic region splits at the TiKV layer.
- Distributed transactions via a Percolator-inspired protocol over TiKV.
- MySQL wire compatibility — existing MySQL clients work without driver changes.
- Strong consistency — Raft groups per region guarantee linearisable reads.
- Rich SQL — joins, secondary indexes, aggregations, window functions.
Why Pinterest chose it (2021+)¶
As the successor for the general-NoSQL residual after the workload-specific migrations rehomed OLAP / time-series / KV to specialised stores, Pinterest needed a substrate that was:
- NoSQL-scale — to handle HBase-sized data volumes.
- RDBMS-capable — distributed transactions, rich queries, secondary indexes, stronger consistency.
- 3-replica economical — cheaper per-record than HBase's concepts/replica-cost-tradeoff|6-replica primary-standby shape.
From the HBase-deprecation post:
"To accommodate the remaining HBase use cases, we needed a new technology that offers great scalability like a NoSQL database while supporting powerful query capabilities and ACID semantics like a traditional RDBMS. We ended up choosing TiDB, a distributed NewSQL database that satisfied most of our requirements." (Source: sources/2024-05-14-pinterest-hbase-deprecation-at-pinterest)
TiDB collapses Pinterest's Sparrow + Omid stack (distributed transactions bolt-on) and Ixia + Manas stack (secondary-indexing bolt-on) back into the substrate itself — this is the load-bearing NewSQL promise.
Seen in¶
- sources/2024-05-14-pinterest-hbase-deprecation-at-pinterest — Pinterest's named replacement for the general-NoSQL residual after HBase deprecation. Part 2 of Pinterest's three-part series (not ingested here) covers the evaluation methodology that selected TiDB.
Related¶
- systems/hbase — the store TiDB succeeded at Pinterest.
- systems/mysql — TiDB's protocol-level reference point.
- concepts/distributed-transactions — the missing feature in HBase that TiDB provides natively.
- concepts/acid-properties — TiDB's consistency guarantees.
- concepts/replica-cost-tradeoff — the cost axis TiDB improves relative to 6-replica HBase.
- patterns/nosql-to-newsql-deprecation — the general pattern Pinterest instantiated with TiDB as successor.
- companies/pinterest — enterprise user.