tencent cloud

Data Transfer Service

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Data Migration
Data Sync
Data Subscription (Kafka Edition)
Strengths
Supported Regions
Specification Description
Purchase Guide
Billing Overview
Configuration Change Description
Payment Overdue
Refund
Getting Started
Data Migration Guide
Data Sync Guide
Data Subscription Guide (Kafka Edition)
Preparations
Business Evaluation
Network Preparation
Adding DTS IP Addresses to the Allowlist of the Corresponding Databases
DTS Service Permission Preparation
Database and Permission Preparation
Configuring Binlog in Self-Built MySQL
Data Migration
Databases Supported by Data Migration
Cross-Account TencentDB Instance Migration
Migration to MySQL Series
Migrating to PostgreSQL
Migrating to MongoDB
Migrating to SQL Server
Migrating to Tencent Cloud Distributed Cache
Task Management
Data Sync
Databases Supported by Data Sync
Cross-Account TencentDB Instance Sync
Sync to MySQL series
Synchronize to PostgreSQL
Synchronization to MongoDB
Synchronize to Kafka
Task Management
Data Subscription (Kafka Edition)
Databases Supported by Data Subscription
MySQL series Data Subscription
Data Subscription for TDSQL PostgreSQL
MongoDB Data Subscription
Task Management
Consumption Management
Fix for Verification Failure
Check Item Overview
Cutover Description
Monitoring and Alarms
Supported Monitoring Indicators
Supported Events
Configuring Metric Alarms and Event Alarms via the Console
Configuring Indicator Monitoring and Event Alarm by APIs
Ops Management
Configuring Maintenance Time
Task Status Change Description
Practical Tutorial
Synchronizing Local Database to the Cloud
Creating Two-Way Sync Data Structure
Creating Many-to-One Sync Data Structure
Creating Multi-Site Active-Active IDC Architecture
Selecting Data Sync Conflict Resolution Policy
Using CLB as Proxy for Cross-Account Database Migration
Migrating Self-Built Databases to Tencent Cloud Databases via CCN
Best Practices for DTS Performance Tuning
FAQs
Data Migration
Data Sync
FAQs for Data Subscription Kafka Edition
Regular Expressions for Subscription
Error Handling
Common Errors
Failed Connectivity Test
Failed or Alarmed Check Item
Inability to Select Subnet During CCN Access
Slow or Stuck Migration
Data Sync Delay
High Data Subscription Delay
Data Consumption Exception
API Documentation
History
Introduction
API Category
Making API Requests
(NewDTS) Data Migration APIs
Data Sync APIs
Data Consistency Check APIs
(NewDTS) Data Subscription APIs
Data Types
Error Codes
DTS API 2018-03-30
Service Agreement
Service Level Agreements
ドキュメントData Transfer ServicePractical TutorialCreating Multi-Site Active-Active IDC Architecture

Creating Multi-Site Active-Active IDC Architecture

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-07-08 15:54:46

Overview

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.

Notes

During full data sync, DTS consumes certain source database resources, which may increase the load and pressure of the source database. If your database configuration is low, we recommend you sync the data during off-peak hours.
To avoid duplicate data, make sure that the tables to be synced have a primary key or non-null unique key.
You should plan the data in advance. Each IDC is responsible for updating (adding, deleting, and modifying) data with different primary keys so as to avoid problems such as primary key conflict and mutual overwriting of data with the same primary key. If there are duplicate primary keys in multiple source databases for business reasons, select an appropriate conflict resolution method to make the sync behavior and data meet the expectations.

Application Restrictions

DDL statements in the configurations of multiple sync tasks should not form a ring.
Currently, a two-way sync task can be created between two MySQL databases, two TDSQL-C for MySQL databases, or one MySQL database and one TDSQL-C for MySQL database.

DDL Configuration Principles

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:

Sync Option Settings Difference


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

Directions

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.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック