Databases 15 min read

TiDB Architecture, Deployment Choices, and Zhihu’s Database Platform Practices

This article explains TiDB’s distributed relational database architecture, compares Kubernetes‑based and physical‑machine deployments, and describes Zhihu’s platform‑driven approach—including TiDB Operator, TiUP, self‑service tooling, monitoring, backup, security, and FinOps—to enable efficient database management for both developers and DBAs.

Zhihu Tech Column
Zhihu Tech Column
Zhihu Tech Column
TiDB Architecture, Deployment Choices, and Zhihu’s Database Platform Practices

TiDB is an open‑source distributed relational database compatible with MySQL, offering horizontal scalability, strong consistency, and high availability. It combines traditional RDBMS features with NoSQL advantages, supporting large‑scale data processing, high‑concurrency workloads, and complex queries across industries such as finance and internet.

The TiDB ecosystem architecture includes core components (TiDB SQL layer, TiKV storage engine, and PD placement driver), data migration tools (DM, TiCDC), operational platforms (DBDAS, TiDB Dashboard, TiEM), monitoring (Prometheus, Grafana, TiDB Monitor), backup and restore utilities (BR, Lightning, Dumpling), and ecosystem integrations (Spark, ELK).

When choosing a deployment method, Kubernetes provides flexibility, automated scaling, and self‑healing via TiDB Operator, while physical machines deliver higher raw performance for latency‑sensitive workloads. Zhihu adopts TiDB Operator for its cloud‑native environment due to its strong automation and scalability.

Zhihu’s internal “Tianqiong” platform offers self‑service capabilities for developers (resource request, scaling, SQL change workflow) and centralized management for DBAs (cluster overview, automated tasks, backup, recovery, monitoring, alerting, log analysis, SQL audit, and cost control through FinOps). Tools such as TiUP simplify cluster installation, upgrade, and scaling, while TiDB Operator automates lifecycle operations on Kubernetes.

Key operational practices include resource planning, automated scaling via TiDB‑cluster.yaml, data migration strategies using DM, TiCDC, TiBigData, and Lightning, stability measures like multi‑cloud active‑active setups, regular health checks, and observability through Prometheus, Grafana, and ELK. Security is reinforced with SQL audit and fine‑grained access control.

Overall, the article demonstrates how Zhihu leverages TiDB’s rich feature set and a platform‑centric approach to provide reliable, efficient, and cost‑effective distributed database services for both business development teams and DBA groups.

data migrationKubernetesFinOpsDistributed DatabaseTiDBDatabase Operations
Zhihu Tech Column
Written by

Zhihu Tech Column

Sharing Zhihu tech posts and exploring community technology innovations.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.