tidb README

The project's README from github.com/pingcap/tidb. As one markdown file: README.md.

TiDB, a distributed SQL database

License Language

Build Status Go Report Card GitHub release

TiDB

TiDB (/’taɪdiːbi:/, "Ti" stands for Titanium) is an open-source, cloud-native, distributed SQL database designed for high availability, horizontal and vertical scalability, strong consistency, and high performance.

Key Features

Quick Start

  1. Start a TiDB cluster.

    • On local playground. To start a local test cluster, refer to the TiDB quick start guide.

    • On Kubernetes. TiDB can be easily deployed in a self-managed Kubernetes environment or Kubernetes services on public clouds using TiDB Operator. For more details, refer to the TiDB on Kubernetes quick start guide.

    • Using TiDB Cloud (recommended). TiDB Cloud offers a fully managed version of TiDB with a free plan, no credit card required, so you can get a free cluster in seconds and start easily: Sign up for TiDB Cloud.

  2. Learn about TiDB SQL: To explore the SQL capabilities of TiDB, refer to the TiDB SQL documentation.

  3. Use a MySQL driver or an ORM to Build an App with TiDB.

  4. Explore key features, such as data migration, changefeed, vector search, HTAP, disaster recovery, etc.

Need Help?

Architecture

TiDB architecture

Learn more details about TiDB architecture in our Docs.

Contributing

TiDB is built on a commitment to open source, and we welcome contributions from everyone. Whether you are interested in improving documentation, fixing bugs, or developing new features, we invite you to shape the future of TiDB.

Active Contributors of pingcap/tidb - Last 28 days

License

TiDB is under the Apache 2.0 license. See the LICENSE file for details.

See Also

Acknowledgments

tidb (pingcap/tidb)

Searching Database…

40.6K ·GitHub
这是什么东西?TiDB 是一个用 Go 编写的开源云原生分布式 SQL 数据库,兼容 MySQL,专为高可用、水平扩展、强一致性以及事务与分析混合负载而设计。
它是单个数据库进程,还是一组组件构成的集群?是一个分布式集群:TiDB 服务器负责处理 SQL,TiKV 存储行数据,TiFlash 则保存一份用于分析的列式副本。计算和存储是分离的,所以可以各自独立扩容,而且不用停机。
最快把集群跑起来的方法是什么?注册 TiDB Cloud——几秒钟就能得到一个免费的托管集群,不需要信用卡。如果想自己部署,测试时可以运行本地 playground,生产环境可以用 TiDB Operator 部署到 Kubernetes。
我的应用已经在用 MySQL 了,迁移过去要花多大功夫?通常很省事:TiDB 兼容 MySQL 8.0,现有的驱动、框架和工具可以直接连上,还有一整套迁移工具负责搬数据。大多数应用不需要改代码,或只需少量改动。
TiDB 实际能跑在哪里——用它必须上 Kubernetes 吗?不用——它可以部署在公有云、本地机房,也可以原生跑在 Kubernetes 上,由 TiDB Operator 自动化集群运维。另外还有用于测试的本地 playground,以及托管的 TiDB Cloud。
它是完全开源的,还是有一部分要收费?数据库本身在 Apache 2.0 协议下完全开源,所有代码都在 GitHub 上,包括企业级功能。收费的是 TiDB Cloud 这个可选的托管服务,而且它也有免费套餐。
我能在同一份实时数据上同时跑分析和事务吗?可以——这正是 HTAP 的意义所在:TiFlash 是一份列式副本,通过 Multi-Raft Learner 协议从 TiKV 实时同步,所以分析查询跑的是一致的实时数据,而不是单独做 ETL 出来的副本。
如果某个节点在写入过程中挂掉了会怎样?TiDB 在 Raft 共识协议下为数据保存多个副本,只有大多数副本都收到事务后才会提交,所以数据不会因故障丢失。故障转移是自动的,副本的存放位置还可以按地域调整,以实现容灾。
它有没有为 AI 智能体内置什么功能?有——向量搜索本身就是一项核心功能,而且这个项目的定位就是面向规模难以预测的智能体负载。由于它讲的是 MySQL 协议,智能体用标准的驱动和 ORM 就能连上。
既然它本来就兼容 MySQL,为什么不直接用普通的 MySQL?普通 MySQL 无法在不停机的情况下水平扩展,也不能在实时业务数据上跑列式分析。TiDB 在兼容 MySQL 的 SQL 之上,额外提供了跨节点的两阶段提交 ACID 事务、Raft 复制存储,以及 TiFlash 列式引擎。
What are similar projects?oceanbase, vitess, tikv, dgraph, neon, ClickHouse, starrocks, minio
Creator
pingcap
Size
797.2 MB
Stars
40.6K
Age
11y
Commits · 90 Days