# `PARAMETER::` `TiDB Data Migration` Architecture
+ `TiDB Data Migration` cluster consists of three components: 
  + **`DM-master:`** 
    + Manages and schedules the operations of data migration tasks
    + Embedded `etcd` to form a cluster
    + Leader node provides service
  + **`DM-worker:`**
    + Executes specific data migration tasks
    + Idle `DM-worker` can be standby to pick up the task from offline or isolated `DM-worker`
  + **`dmctl:`** 
    + Command line tool

![`smart`](DMPI_aa_003_20220623.png)

-------------------------------------------------------------

`DM-master` manages and schedules the operations of data migration tasks.
- Storing the topology information of the `DM` cluster.
- Monitoring the running state of `DM-worker` processes.
- Monitoring the running state of data migration tasks.
- Providing a unified portal for the management of data migration tasks.
- Coordinating the `DDL` migration of sharded tables in each instance under the sharding scenario.

`DM-worker` executes specific data migration tasks.
- Persisting the `binlog` data to the local storage.
- Storing the configuration information of the data migration subtasks.
- Orchestrating the operation of the data migration subtasks.
- Monitoring the running state of the data migration subtasks.

`dmctl` is a command line tool used to control the `DM` cluster.
- Creating, updating, or dropping data migration tasks
- Checking the state of data migration tasks
- Handling errors of data migration tasks
- Verifying the configuration correctness of data migration tasks

When the data migration task is in the process of full export or import, the migration task does not support high availability. Here are the main reasons:
- For the full export, `MySQL` does not support exporting from a specific snapshot point yet. This means that after the data migration task is rescheduled or restarted, the export cannot resume from the previous interruption point.
- For the full import, `DM-worker` does not support reading exported full data across the nodes yet. This means that after the data migration task is scheduled to a new `DM-worker` node, you cannot read the exported full data on the original `DM-worker` node before the scheduling happens.