gitmyhub

tidb

Go ★ 40k updated 22h ago

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

Open-source distributed SQL database that handles both fast transactions and analytics on the same data, scaling horizontally as your application grows.

GoRustRaftKubernetessetup: hardcomplexity 4/5

TiDB is an open-source distributed SQL database designed to handle workloads that grow in unpredictable ways while maintaining strong consistency and the ability to run both transactional queries and analytical queries on the same data. The problem it solves is the traditional trade-off where a database is either optimized for many small fast transactions (like an e-commerce order system) or for large analytical queries (like a data warehouse), but not both at the same time without copying data between separate systems.

The way TiDB works is by separating computing from storage and using multiple specialized components. The TiDB Server handles SQL query parsing and planning. TiKV is the row-based storage engine that handles transactional workloads. TiFlash is a columnar storage engine that replicates data from TiKV in real time and handles analytical queries much faster because columnar formats are better suited to scanning large amounts of data. The system uses the Raft consensus protocol to ensure data is consistent across multiple replicas, and it automatically fails over if a node goes down. TiDB presents a MySQL-compatible interface, meaning applications written for MySQL can typically connect to TiDB without code changes.

You would use TiDB if you have a growing application whose database is starting to outgrow a single server, need to run reporting or analytics on fresh data without a separate data warehouse, or want a database that scales horizontally by adding more machines without downtime. It can be deployed on Kubernetes or as a managed cloud service called TiDB Cloud. The tech stack is primarily Go, with Rust for parts of the TiKV storage engine.

Where it fits