大家好,很高兴开源一款数据同步/校验/订阅/加工的工具: ape-dts
https://github.com/apecloud/ape-dts
欢迎大家使用并提出宝贵意见,我们会尽快响应。
| mysql -> mysql | pg -> pg | mongo -> mongo | redis -> redis | mysql -> kafka | pg -> kafka | mysql -> starrocks | mysql -> clickhouse | |
|---|---|---|---|---|---|---|---|---|
| 全量迁移 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| 增量同步 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| 数据校验/订正/复查 | ✔ | ✔ | ✔ | |||||
| 库表结构迁移 | ✔ | ✔ | ✔ | ✔ |
| 同步方式 | 节点规格 | rps(rows per second) | 源 MySQL 负荷(cpu/内存) | 目标 MySQL 负荷(cpu/内存) |
|---|---|---|---|---|
| ape_dts | 1c2g | 71428 | 8.2% / 5.2% | 211% / 5.1% |
| ape_dts | 2c4g | 99403 | 14.0% / 5.2% | 359% / 5.1% |
| ape_dts | 4c8g | 126582 | 13.8% / 5.2% | 552% / 5.1% |
| debezium | 4c8g | 4051 | 21.5% / 5.2% | 51.2% / 5.1% |
| 同步方式 | 节点规格 | rps(rows per second) | 源 MySQL 负荷(cpu/内存) | 目标 MySQL 负荷(cpu/内存) |
|---|---|---|---|---|
| ape_dts | 1c2g | 15002 | 18.8% / 5.2% | 467% / 6.5% |
| ape_dts | 2c4g | 24692 | 18.1% / 5.2% | 687% / 6.5% |
| ape_dts | 4c8g | 26287 | 18.2% / 5.2% | 685% / 6.5% |
| debezium | 4c8g | 2951 | 20.4% / 5.2% | 98% / 6.5% |
| ape_dts:2.0.3 | debezium/connect:2.7 |
|---|---|
| 86.4 MB | 1.38 GB |
mysql -h127.0.0.1 -uroot -p123456 -P3307
CREATE DATABASE test_db;
CREATE TABLE test_db.tb_1(id int, value int, primary key(id));
CREATE TABLE test_db.tb_2(id int, value int, primary key(id));
INSERT INTO test_db.tb_1 VALUES(1,1),(2,2);
INSERT INTO test_db.tb_2 VALUES(5,5),(6,6);
mysql -h127.0.0.1 -uroot -p123456 -P3308
CREATE DATABASE test_db;
CREATE TABLE test_db.tb_1(id int, value int, primary key(id));
CREATE TABLE test_db.tb_2(id int, value int, primary key(id));
rm -rf /tmp/ape_dts
mkdir -p /tmp/ape_dts
cat <<EOL > /tmp/ape_dts/task_config.ini
[extractor]
db_type=mysql
extract_type=snapshot
url=mysql://root:123456@127.0.0.1:3307?ssl-mode=disabled
[sinker]
db_type=mysql
sink_type=write
url=mysql://root:123456@127.0.0.1:3308?ssl-mode=disabled
[filter]
do_dbs=test_db
do_events=insert
[parallelizer]
parallel_type=snapshot
parallel_size=8
[pipeline]
buffer_size=16000
checkpoint_interval_secs=1
EOL
export APE_DTS_IMAGE="apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/ape-dts:2.0.8"
docker run --rm --network host \
-v "/tmp/ape_dts/task_config.ini:/task_config.ini" \
"$APE_DTS_IMAGE" /task_config.ini
mysql -h127.0.0.1 -uroot -p123456 -P3308
mysql> SELECT * FROM test_db.tb_1;
+----+-------+
| id | value |
+----+-------+
| 1 | 1 |
| 2 | 2 |
+----+-------+
mysql> SELECT * FROM test_db.tb_2;
+----+-------+
| id | value |
+----+-------+
| 5 | 5 |
| 6 | 6 |
+----+-------+
任务类型、教程、任务配置:请参考主页:https://github.com/apecloud/ape-dts原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。