当前位置:网站首页>Is the real database data of TiDB stored in kv and pd?
Is the real database data of TiDB stored in kv and pd?
2022-08-01 08:25:00 【Liu Guibin】
Is the real database data of TiDB stored in kv and pd?
Other Answer 1:
Data are stored in TiKV
Other Answer 2:
- TiDB Server: The SQL layer, which exposes the connection endpoint of the MySQL protocol, is responsible for accepting connections from clients, performing SQL parsing and optimization, and finally generating a distributed execution plan.The TiDB layer itself is stateless. In practice, multiple TiDB instances can be started, and a unified access address is provided externally through load balancing components (such as LVS, HAProxy or F5), and client connections can be evenly distributed among multiple TiDB instances.In order to achieve the effect of load balancing.TiDB Server itself does not store data, but only parses SQL and forwards the actual data read request to the underlying storage node TiKV (or TiFlash).
- PD (Placement Driver) Server: The meta information management module of the entire TiDB cluster, responsible for storing the real-time data distribution of each TiKV node and the overall topology of the cluster, and providing the TiDB Dashboard management and control interface.And assign a transaction ID to the distributed transaction.PD not only stores meta information, but also issues data scheduling commands to specific TiKV nodes according to the real-time data distribution status reported by TiKV nodes, which can be said to be the "brain" of the entire cluster.In addition, the PD itself is also composed of at least 3 nodes and has high availability capabilities.It is recommended to deploy an odd number of PD nodes.
- Storage Nodes
- TiKV Server: Responsible for storing data. From the outside, TiKV is a distributed Key-Value storage engine that provides transactions.The basic unit for storing data is Region. Each Region is responsible for storing the data of a Key Range (the left-closed and right-open interval from StartKey to EndKey). Each TiKV node is responsible for multiple Regions.TiKV's API provides native support for distributed transactions at the KV key-value pair level, and provides the SI (Snapshot Isolation) isolation level by default, which is also the core of TiDB's support for distributed transactions at the SQL level.After the SQL layer of TiDB completes the SQL parsing, it will convert the SQL execution plan into the actual call to the TiKV API.Therefore, the data is stored in TiKV.In addition, data in TiKV will automatically maintain multiple copies (the default is three copies), which naturally supports high availability and automatic failover.
- TiFlash: TiFlash is a special type of storage node.Unlike ordinary TiKV nodes, in TiFlash, data is stored in columnar form, and the main function is to accelerate analysis-based scenarios.
Other Answer 3:
Tidb data is stored on tikv.
tidb has three main components:
pd: It is the management module of the entire cluster. It has three main tasks: one is to store the meta information of the cluster (which TiKV node a key is stored in); the other is to schedule and load balance the TiKV cluster (such as dataMigration, migration of Raft group leaders, etc.); the third is to assign a globally unique and incremental transaction ID.
tidb: Responsible for receiving SQL requests, processing SQL-related logic, and finding the TiKV address for storing the data required for calculation through PD, interacting with TiKV to obtain data, and finally returning the result.TiDB Server is stateless, it does not store data itself, it is only responsible for computing, and can be scaled infinitely horizontally.
tikv: Responsible for storing data. From the outside, TiKV is a distributed Key-Value storage engine that provides transactions.The basic unit of data storage is Region. Each Region is responsible for storing data of a Key Range (the left-closed and right-open interval from StartKey to EndKey). Each TiKV node is responsible for multiple Regions.TiKV uses the Raft protocol for replication to maintain data consistency and disaster tolerance.
Other Answer 4:
TIKV
PD is a coordinated association
边栏推荐
- Golang: go get url and form attribute value
- 22 Niu Ke Duo School 1 I. Chiitoitsu (Probability dp)
- 毕业论文写作技巧
- 【杭电多校第四场 B题】最短路图+缩点dp
- various network protocols
- leetcode-6132: Make all elements in array equal to zero
- [Interview: Concurrency 39: Multithreading: Thread Pool] ThreadPoolExecutor Class - Submit, Stop
- flink sql-client,怎么处理源端与目标增加端,sql-client包括映射表与JOB如
- VoLTE基础学习系列 | 企业语音网简述
- Mysql database deployment and initialization steps
猜你喜欢

USB Protocol (2) Terminology

leetcode-6132:使数组中所有元素都等于零

基于MySql,Redis,Mq,ES的高可用方案解析

Microsoft Azure & NVIDIA IoT 开发者季 I|Azure IoT & NVIDIA Jetson 开发基础

Case practice --- Resnet classic convolutional neural network (Mindspore)

数据分析6

研发过程中的文档管理与工具

网络基础学习

Golang: go get url and form attribute value

VSCode插件推荐(Rust环境)
随机推荐
Do I need to introduce any dependencies to write data to clickhouse using flinksql?
LabVIEW中局部变量和全局变量的分配
Mysql数据库的部署以及初始化步骤
372. 超级次方
VSCode 快捷键及通用插件推荐
小程序更多的手势事件(左右滑动、放大缩小、双击、长按)
pytest接口自动化测试框架 | 集成Allure测试报告
HoloView--live data
leetcode-6133: maximum number of groupings
179. 最大数
【Unity3D】相机
Custom IP used in PCIE
Golang: go get url and form attribute value
Idea 常用插件
ACmix 论文精读,并解析其模型结构
zip打包目录所有文件(含隐藏文件/夹)
【编程之外】当遮羞布被掀开,当人们开始接受一切
搜索框字符自动补全
【STM32】入门(一):环境搭建、编译、下载、运行
Redis中间件(从搭建到弃坑)