The multi-site active-active IDC architecture refers to multiple IDCs that are deployed in different regions and provide service concurrently. Data can be synced among them in real time. If a disaster occurs in an IDC, its traffic can be routed to other IDCs to implement quick cross-region failover and guarantee business continuity.
The multi-site active-active IDC architecture is implemented by creating multiple two-way sync tasks, each of which consists of two one-way sync tasks. Therefore, restrictions on one-way sync and relevant operations must be followed. For more information, see the appropriate sync scenario in Data Sync.
This document uses a specific scenario to describe how to configure DDL statements for easier understanding. For example, in a multi-site active-active-active IDC architecture, three two-way sync tasks are created among databases A (Beijing region), B (Shanghai region), and C (Guangzhou region): A <-> B, B <-> C, and C <-> A.
DDL statements in the configurations of multiple sync tasks should not form a ring; otherwise, they will loop in the system, causing errors.
For example, among the three sync tasks (1, 3, and 5) marked by blue lines in the following figure, you can select DDL in up to two of them, and if you select three, a ring will be formed.
The same table object cannot receive DDL sync from multiple IDCs; otherwise, such DDL statements may conflict with each other in the target database, causing errors.
For example, databases A and C have tables with the same name to be synced to database B. Then, you can select DDL in only one task between tasks 1 and 4.
During verification, the sync system will judge whether the sync task being created will cause a DDL loop or conflict based on all your other sync tasks and provide prompts for your reference.
The multi-site active-active IDC architecture is implemented by creating multiple two-way sync tasks, each of which consists of two one-way sync tasks. Therefore, the operation steps for each sync task in such architecture are basically the same as those for a general one-way sync task. They differ only in the following configurations:
This document recommends the following configuration for a typical multi-site active-active IDC architecture for your reference.
For example, in a multi-site active-active-active IDC architecture, three two-way sync tasks are created among databases A (Beijing region), B (Shanghai region), and C (Guangzhou region): A <-> B (tasks 1 and 2), B <-> C (tasks 3 and 4), and C <-> A (tasks 5 and 6).
Scenario | Time Requirements | Sync Task | Initialization Type | If Target Already Exists | Conflict Resolution Method | SQL Type |
---|---|---|---|---|---|---|
Scenario 1: database A has database/table structures and data, and databases B and C are empty | Task 2 can be created only after task 1 enters the "incremental sync" phase | Task 1 | Structure initialization/full data initialization | Precheck and report error | Select an option as needed. The conflict resolution method takes effect only for the data with primary key conflict. | Select DDL statements according to the configuration principles. For other operation types, we recommend you keep them consistent among all sync tasks. |
Task 2 | Do not select | Ignore and execute | ||||
Task 4 can be created only after task 3 enters the "incremental sync" phase | Task 3 | Structure initialization/full data initialization | Precheck and report error | |||
Task 4 | Do not select | Ignore and execute | ||||
Task 6 can be created only after task 5 enters the "incremental sync" phase | Task 5 | Structure initialization/full data initialization | Precheck and report error | |||
Task 6 | Do not select | Ignore and execute | ||||
Scenario 2: databases A, B, and C all have database/table structures and data | None | Tasks 1–6 | Full data initialization | Ignore and execute |
Creating a multi-site active-active IDC architecture is to create multiple two-way sync tasks. For detailed directions, see Creating Two-Way Sync Data Structure.
Was this page helpful?