当前位置:网站首页>Study notes of canal
Study notes of canal
2022-07-26 09:05:00 【It is not easy to live in vain】
Canal Learning notes of
List of articles
1. brief introduction
Official website :https://github.com/alibaba/canal
Canal, Waterways / The Conduit / Ditch , The main use is based on MySQL Database incremental log parsing , Provide Incremental data subscription and consumption .
canal Yes, it is java Developed incremental log parsing based on database , Provide incremental data subscription & Consumer Middleware . at present ,canal It mainly supports MySQL Of binlog analysis , Only after the parsing is completed can canal client Used to process the relevant data obtained .( Database synchronization requires Alibaba's otter middleware , be based on canal)
Here we can simply put canal To understand as a means to A tool for synchronizing incremental data .
In the early days, Alibaba was deployed due to the dual computer rooms in Hangzhou and the United States , There is a business demand for synchronization across computer rooms , The implementation is mainly based on the business trigger Get incremental changes . from 2010 Year begins , The business gradually tries to get incremental changes from database log parsing for synchronization , Thus, a large number of incremental database subscription and consumption businesses are derived .
Incremental subscription and consumption based on logs include
- database mirroring
- Database real-time backup
- Index building and real-time maintenance ( Split heterogeneous indexes 、 Inverted index, etc )
- Business cache Refresh
- Incremental data processing with business logic
Current canal Support source side MySQL The version includes 5.1.x,5.5.x,5.6.x,5.7.x,8.0.x
2. working principle
MySQL Principle of active / standby replication
- MySQL master Write data changes to binary log (binary log, The records are called binary log events binary log events, Can pass show binlog events To view the )
- MySQL slave take master Of binary log events Copy to its trunk log (relay log)
- MySQL slave replay relay log Middle event , Change the data to reflect its own data
canal working principle
- cannl simulation MySQL slave Interaction protocol , Pretend to be MySQL slave, towards MySQL master send out dump agreement
- MySQL master received dump request , Start pushing binary log to slave ( namely canal)
- canal analysis binary log object ( Originally byte flow ), And then send it to the storage destination , such as MySQL,Kafka,Elastic Search wait .
3. canal Download address
Download address :https://github.com/alibaba/canal/releases
边栏推荐
- 【ARKit、RealityKit】把图片转为3D模型
- Rocky基础练习题-shell脚本2
- Clean the label folder
- Simple message mechanism of unity
- unity简易消息机制
- Unity topdown character movement control
- What is the difference between NFT and digital collections?
- Database operation topic 1
- Media at home and abroad publicize that we should strictly grasp the content
- Set of pl/sql
猜你喜欢
The Child and Binary Tree-多项式开根求逆
Vision Group Training Day5 - machine learning, image recognition project
Pop up window in Win 11 opens with a new tab ---firefox
2022化工自动化控制仪表操作证考试题模拟考试平台操作
Datawhale panda book has been published!
围棋智能机器人阿法狗,阿尔法狗机器人围棋
Form form
布隆过滤器
对标注文件夹进行清洗
Day06 homework - skill question 6
随机推荐
PAT 甲级 A1076 Forwards on Weibo
Laravel框架日志文件存放在哪里?怎么用?
redis原理和使用-基本特性
力扣——二叉树剪枝
220. Presence of repeating element III
Espressif plays with the compilation environment
Error: Cannot find module ‘umi‘ 问题处理
对标注文件夹进行清洗
Introduction to excellent verilog/fpga open source project (30) - brute force MD5
Innovus卡住,提示X Error:
【LeetCode数据库1050】合作过至少三次的演员和导演(简单题)
论文笔记: 知识图谱 KGAT (未完暂存)
Canal 的学习笔记
TCP solves the problem of short write
Study notes of automatic control principle -- dynamic model of feedback control system
数据库操作 题目一
多项式开根
机器学习中的概率模型
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
Pytoch learning - from tensor to LR