tencent cloud

TencentDB for MariaDB

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Strengths
Use Cases
System Architecture
Instance Types
Instance Architecture
TDSQL Edition
Database Version
Purchase Guide
Billing Overview
Pricing
Refund
Payment Overdue
Upgrade Pricing
Backup Space Billing
Getting Started
Creating Instance
Managing Account
Accessing Instance
Operation Guide
Precautions
Instance Management
Disaster Recovery Read-Only Instance
Account Management
Read/Write Separation
Changing Networks
Backup and Rollback
Migrating Data
Database Sync(Legacy)
Security Management
Monitoring and Alarms
Killing Threads
Parameter Templates and Settings
Database Audit
Practical Tutorial
Programming and Usage Specification
Programming and Usage Specification of Distributed Version
Using Hotspot Update for Flash Sales
Security White Paper
Platform Security Features
Tenant Security Features
Development Guide
Functional Limitations
Performance Test
Intra-city Active-Active Solution
Binlog Consumption Format
Slow Query Analysis
Database Audit
Syntax Supported
API Documentation
History
Introduction
API Category
Making API Requests
Security Group APIs
Other APIs
Account APIs
Parameter Management APIs
Monitoring Management APIs
Instance Management APIs
Backup and Restoration APIs
Data Types
Error Codes
FAQs
Product
Account Login
Features
Performance
Backup
Ops
Disk Overuse
IO Metric Exception
General References
Standards and Certification
Main Specification Performance Description
Performance Comparison Data for Strong Sync
Glossary

Modifying Data Replication Mode

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-01-11 15:28:38

Data Replication Mode

Data replication mode, aka data sync mode, is a mechanism for data replication of primary and replica nodes in the high availability scheme of database. Currently, TencentDB for MariaDB supports the following modes:
Async replication: an application initiates an update request such as adding, deletion, or modification. After completing the corresponding operation, the primary node (primary) responds to the application immediately and replicates data to the replica node (replica) asynchronously. Therefore, in async replication mode, an unavailable replica does not affect operations on the primary, while an unavailable primary may cause data inconsistency.
Strong sync (non-downgradable) replication: an application initiates an update request. After completing the operation, the primary replicates data to the replica immediately. After receiving the data, the replica returns a success message to the primary. Only after receiving the message from the replica will the primary respond to the application. The data is replicated synchronously from the primary to the replica. Therefore, an unavailable replica will affect operations on the primary, while an unavailable primary will not cause data inconsistency.
Note:
When you perform strong sync replication, the primary database will be hanged if it is disconnected from the replica database or the replica database fails. If there is only one primary or replica database, the high-availability scheme is unavailable, because if only one single server is used, part of data will be lost completely when a failure occurs, which does not meet the requirements for finance-level data security.
Strong sync (downgradable) replication: batch processing and writing large amounts of transaction data in the business system may cause severe delay in the replica; moreover, in strong sync (non-downgradable) mode, the remaining node will be hanged. These mechanisms designed to ensure data consistency may cause exceptions in the business system. To address this problem, TencentDB provides a scheme where the strong sync mechanism can be downgraded to async mode. When the replica delay is longer than or equal to 15 seconds, the system will automatically downgrade the strong sync mode to async mode; if it then becomes shorter than 15 seconds, the system will automatically upgrade the async mode to strong sync mode. In this way, strong sync (downgradable) replication is an efficient scheme to ensure eventual data consistency.
Note:
Different from the open-source semi-sync mechanism of Google, strong sync replication uses thread pools instead of the worker thread mode. Besides, the downgradable scheme is better than the semi-sync mode.

Modifying Data Replication Mode

Note:
The one-primary-one-replica architecture of TencentDB for MariaDB provides only two schemes: strong sync (downgradable) replication and async replication. If data consistency is required, please purchase the three-node edition with one primary and two replicas.
1. Log in to the TencentDB for MariaDB console, click an instance ID in the instance list, and enter the instance details page.
2. Click the edit icon next to Data Replication Mode in the Availability Info section.
Note:
The modification will not affect normal operations of the instance and will take effect in up to five seconds.



도움말 및 지원

문제 해결에 도움이 되었나요?

피드백