当前位置:网站首页>Ticdc introduction
Ticdc introduction
2022-06-13 07:02:00 【Lao Wang's notes】
TiCDC Through the pull TiKV Change log , Realization TiDB Incremental data synchronization tool , It has the ability to restore data to a consistent state at any time upstream of the rain ; At the same time, the ability to provide open data protocols , It can support other systems to subscribe to data changes ;
TiCDC characteristic
- High availability : Can be multi node , Mutual interference , If a node fails , Automatic failover ;
- performance : commonly 3s Inside ;
- Support rich downstream formats : compatible MySQL Any of the formats DB;
TiCDC Architecture and principles

- TiDB receive SQL, TiKV After the nodes of are changed , Only the modification logs of this node are output to TiCDC Cluster colony
- TiCDC The node is responsible for receiving TiKV Log , And logically spliced together inside ;
- Multiple Capture Form a cluster , Some Capture Be responsible for pulling a part TiKV journal , And with others Capture synergy , Gather the received logs to a Capture Owner, And then send it to the downstream ;
- If one Capure fault , Will be owner Automatically transfer to other Capture, Then continue to assemble all the change logs , Output to downstream
TiCDC Applicable scenario
Suitable for data source ( Upstream database ) by TiCDC, Target database ( Downstream database ) For the class MySQL Database and Kafka; meanwhile TiCDC Open Protocol It is an aeronautical level data change notification protocol , Can be used for monitoring 、 cache 、 Full-text index 、 Analysis engine 、 The master-slave replication of heterogeneous databases provides data sources ;
TiCDC Configuration requirements
Production environment : 16c/64G/SSD/ Wan Zhao nic />2 node / >Centos 7.3
Deploy
install tidb If the cluster is not installed , You can use the scale-out Installation by ;
vim scale-out.yaml
cdc_servers:
- host: XX.XX.XX.XX
port: 8300
deploy_dir: "/export/servers/TiDB/ticdc-8300/"
log_dir: "/export/servers/TiDB/ticdc-8300/log"
- host: XX.XX.XX.XX
port: 8300
deploy_dir: "/export/servers/TiDB/ticdc-8300/"
log_dir: "/export/servers/TiDB/ticdc-8300/log"
Capacity expansion command : tiup cluster scale-out cluster-default scale-out.yaml
cdc Management tool installation : tiup install cdc
Version view
TiCDC]# tiup cdc version
Starting component `cdc`: /root/.tiup/components/cdc/v5.3.0/cdc version
Release Version: v5.3.0
Git Commit Hash: 20626babf21fc381d4364646c40dd84598533d66
Git Branch: heads/refs/tags/v5.3.0
UTC Build Time: 2021-11-22 10:37:02
Go Version: go version go1.16.4 linux/amd64
Failpoint Build: falseCreate tasks
tiup cdc cli changefeed create --pd=${pd_address}:2379 --sink-url="mysql://[email protected]@127.0.0.1:3306" -changefeed-id="cdc-task1"
- --pd : adopt PD Can be obtained TiKV Metadata information ;
- --sink-url : Downstream database address connection string
- --changefeed-id: Synchronization task id, If you don't specify ,ticdc It will automatically generate a UUID;
- --start-ts: Appoint changefeed At the beginning TSO; If omitted, start from the execution time ;
- --target-ts: Designated target TSO; After designation , As of the target time, the synchronization stops ; If omitted, it will be synchronized all the time ;
Other relevant parameters
Downstream is MySQL/TiDB
worker-count: Concurrency of downstream execution
max-txn-row: perform sql Of batch size
Downstream is Kafka
protocol: Output to kafka Message protocol , Optional default、canal、 avro、 maxwell;
max-message-bytes: Each direction Kafka broker The maximum amount of data to send a message , Default 64MB
Task query
cdc cli changefeed list --pd=http://${pd_ip}:2379
You can specify multiple PD node
cdc cli changefeed query -s --pd=http://${pd}:2379 --changefeed-id=${task-name}
Pause / recovery / Delete synchronization task
cdc cli changefeed pause/resume/remove --pd=http://${pd}:2379 --changefeed-id=${task-name}
to update TiCDC Synchronize task configuration
Pause --> Modify the configuration --> Recovery task
cdc cli changefeed pause -C test-cf --pd=http://${pd}:2379
cdc cli changefeed update ...
cdc cli changefeed resume ..
.TiCDC Limit
- Valid index : There must be a primary key , Or not empty / Unique index of non virtual generated column ;
- It is not supported to use alone RawKV Of TiKV colony ;
- Temporary does not support TiDB Created in SEQUENCE Of DDL Operation and SEQUENCE function
- I won't support it TiKV Hibernate Region
边栏推荐
- 快速排序
- RT-Thread 模拟器 simulator LVGL控件:switch 开关按钮控件
- RT-Thread 模拟器 simulator LVGL控件:slider 控件
- Upper computer development (software test of firmware download software)
- Smart finance is upgraded again, and jinglianwen technology provides data collection and labeling services
- RT-Thread 模拟器 simulator LVGL控件:button 按钮样式
- What is the essence of social e-commerce disruption? How can businesses get more traffic?
- YOLOv5解析 | 参数与性能指标
- That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
- Brief introduction to basic usage of echart
猜你喜欢

Chain 2+1 reward, what kind of mode is beautiful everyday seconds?

How to use Wangyou DFM software for cold plate analysis

线程池中的 工作线程如何被回收

Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides

对绘制丘岭密度图ridge plot的详细说明、重叠核密度估计曲线overlapping densities、FacetGrid对象、函数sns.kdeplot、函数FacetGrid.map

基于ESP32CAM实现WebSocket服务器实时点灯

Recently, the popular social e-commerce marketing model, blind box e-commerce, how beautiful every second is accurately drained

数字时代进化论

景联文科技:数据采集标注行业现状及解决方案

YOLOv5解析 | 参数与性能指标
随机推荐
智能金融再升级,景联文科技提供数据采集标注服务
Tidb execution plan -- II
The innovative public platoon mode team invites users to split, beautiful every second, and links the 2+1 new business model
【微弱瞬态信号检测】混沌背景下微弱瞬态信号的SVM检测方法的matlab仿真
Introduction and use of dumping
Cocos released the oppo game prompt "subcontracting failed"
RT-Thread 模拟器 simulator LVGL控件:button 按钮样式
105. 从前序与中序遍历序列构造二叉树
YOLOv5解析 | 参数与性能指标
在 localStorage 中上传和检索存储图像
New Taishan crowdfunding business diversion fission growth model in 2022
SDN basic overview
Xuanwu cloud technology passed the listing hearing: the performance fluctuated significantly, and chenyonghui and other three were the controlling shareholders
The new retail market has set off blind box e-commerce. Can the new blind box marketing model bring dividends to businesses?
牙周炎问题调研(持续进行中)
IIS batch bind domain name
Learning notes of MySQL series by database and table
Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
2022-06-12:在N*N的正方形棋盤中,有N*N個棋子,那麼每個格子正好可以擁有一個棋子。 但是現在有些棋子聚集到一個格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二維數組代錶,一
The new business outlet of beautiful Tiantian second mode will be popular in the Internet e-commerce market