MCPcopy Index your code
hub / github.com/apecloud/ape-dts

github.com/apecloud/ape-dts @v2.0.25

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.25 ↗ · + Follow
2,138 symbols 5,010 edges 426 files 19 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

English | 中文

Introduction

  • ape-dts is a data migration tool enabling any-to-any data transfers.
  • It also provides data subscription and data processing.
  • It is lightweight, efficient and standalone, requiring no third-party components or extra storage.
  • Designed for cloud-native stateless component scenarios.
  • In Rust.

Key features

  • Supports data migration between various databases, both homogeneous and heterogeneous.
  • Supports snapshot and cdc tasks with resume from breakpoint.
  • Supports checking and revising data.
  • Supports filtering and routing at the database, table, and column levels.
  • Implements different parallel algorithms for different sources, targets, and task types to improve performance.
  • Allows loading user-defined Lua scripts to modify the data.

Supported task types

mysql -> mysql pg -> pg mongo -> mongo redis -> redis mysql -> kafka pg -> kafka mysql -> starrocks mysql -> clickhouse mysql -> tidb pg -> starrocks pg -> clickhouse mysql -> doris pg -> doris
Snapshot
CDC
Data check/revise/review
Structure migration

Advanced

Crate features

The dt-main crate provides several optional components which can be enabled via Cargo [features]:

  • metrics: Enable Prometheus format task metrics HTTP service interface. After enabling this feature, you can customize the metrics service with the following configuration:

[metrics] # http service host http_host=127.0.0.1 # http service port http_port=9090 # http service worker count workers=2 # prometheus metrics const labels labels=your_label1:your_value1,your_label2:your_value2

  • TBD

Quick starts

Tutorial

Run tests

Refer to test docs for details.

More docs

Benchmark

  • MySQL -> MySQL, Snapshot
Method Node Specs RPS(rows per second) Source MySQL Load (CPU/Memory) Target MySQL Load (CPU/Memory)
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%
  • MySQL -> MySQL, CDC
Method Node Specs RPS(rows per second) Source MySQL Load (CPU/Memory) Target MySQL Load (CPU/Memory)
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%
  • Image size
ape_dts:2.0.25-alpha.1 debezium/connect:2.7
71.4 MB 1.38 GB

Contributing

Structure

Structure

Modules

  • dt-main: program entry
  • dt-precheck: pre-check, to minimize interruptions during subsequent data operations by identifying issues early for fast failure
  • dt-connector: extractors + sinkers for databases
  • dt-pipeline: pipeline to connect extractors and sinkers
  • dt-parallelizer: parallel algorithms
  • dt-task: create extractors + sinkers + pipelines + parallelizers according to configurations
  • dt-common: common utils, basic data structures, metadata management
  • dt-tests: integration tests

  • related sub module: mysql binlog connector in rust

Build

  • Minimum supported Rust version (MSRV) The current minimum supported Rust version (MSRV) is 1.85.0.
  • cargo build
  • build images

Checklist

  • run cargo clippy --all-targets --all-features --workspace fix all clippy issues.

Community

If you have any questions, you can reach out to us through:

  • ApeDTS GitHub Discussions
  • ApeDTS Wechat Account with note ape-dts:

wechat

Extension points exported contracts — how you extend this code

Parallelizer (Interface)
(no doc) [8 implementers]
dt-parallelizer/src/lib.rs
Sinker (Interface)
(no doc) [22 implementers]
dt-connector/src/lib.rs
Fetcher (Interface)
(no doc) [4 implementers]
dt-precheck/src/fetcher/traits.rs
FlushableMonitor (Interface)
(no doc) [3 implementers]
dt-common/src/monitor/mod.rs
Pipeline (Interface)
(no doc) [2 implementers]
dt-pipeline/src/lib.rs
Merger (Interface)
(no doc) [2 implementers]
dt-parallelizer/src/lib.rs
Extractor (Interface)
(no doc) [17 implementers]
dt-connector/src/lib.rs
Prechecker (Interface)
(no doc) [4 implementers]
dt-precheck/src/prechecker/traits.rs

Core symbols most depended-on inside this repo

len
called by 341
dt-common/src/meta/dt_queue.rs
is_empty
called by 333
dt-common/src/meta/dt_queue.rs
iter
called by 259
dt-common/src/utils/limit_queue.rs
push
called by 238
dt-common/src/meta/dt_queue.rs
push
called by 166
dt-connector/src/sinker/foxlake/foxlake_pusher.rs
contains
called by 88
dt-common/src/config/ini_loader.rs
get_optional
called by 85
dt-common/src/config/ini_loader.rs
parse
called by 64
dt-common/src/meta/ddl_meta/ddl_parser.rs

Shape

Method 1,363
Function 418
Class 285
Enum 57
Interface 15

Languages

Rust100%

Modules by API surface

dt-common/src/meta/ddl_meta/ddl_parser.rs77 symbols
dt-common/src/rdb_filter.rs43 symbols
dt-tests/tests/test_runner/test_base.rs40 symbols
dt-tests/tests/test_runner/rdb_test_runner.rs39 symbols
dt-common/src/meta/ddl_meta/ddl_statement.rs37 symbols
dt-connector/src/meta_fetcher/pg/pg_struct_fetcher.rs34 symbols
dt-tests/tests/test_runner/redis_test_runner.rs27 symbols
dt-task/src/task_util.rs27 symbols
dt-connector/src/rdb_query_builder.rs26 symbols
dt-common/src/meta/redis/redis_object.rs26 symbols
dt-common/src/meta/dcl_meta/dcl_parser.rs25 symbols
dt-tests/tests/test_runner/mongo_test_runner.rs23 symbols

Datastores touched

(mysql)Database · 1 repos
postgresDatabase · 1 repos
(mongodb)Database · 1 repos
test_db_1Database · 1 repos
postgres_euc_cnDatabase · 1 repos

For agents

$ claude mcp add ape-dts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact