Is the data in each TiKV the entire database, or is the entire database distributed across multiple TiKVs?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 每个TiKV中的数据是整个数据库的数据,还是整个数据库分散到各个TIKV中

| username: TiDBer_VNM1n8je

[TiDB Usage Environment] Testing/PoC
[TiDB Version] v7.1.1
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: Daniel-W | Original post link

TiKV Overview | PingCAP Documentation Center

| username: TiDBer_VNM1n8je | Original post link

I read it, but I’m not quite sure. I think the entire database is distributed across various TiKV nodes. Is that correct, teacher? Please confirm.

| username: 啦啦啦啦啦 | Original post link

By default, there are three replicas and they are distributed; otherwise, there would be no advantage of being distributed.

| username: Daniel-W | Original post link

The entire database is distributed across various TiKV nodes, ensuring high availability through replicas.

| username: Kongdom | Original post link

Be sure to remember that the data is evenly distributed across each TiKV, not that each TiKV has the complete data. However, in a three-node, three-replica setup, each node does indeed have the complete data, but the primary replica data is only one-third.

| username: cy6301567 | Original post link

Looking at the distribution of regions, replicas are generally spread across different machines. PD will try to keep the data of the table distributed across various KVs. If the ID is auto-incremented, it may cause hotspot issues. If the business does not heavily rely on auto-increment, you might consider using random IDs.

| username: redgame | Original post link

A Region can be understood as a data shard that contains a continuous range of data. When data changes, TiKV will automatically migrate the Region to maintain balanced data distribution and high availability.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.