tencent cloud

TencentDB for MySQL

Tutorial do usuário
Introdução do produto
Visão geral
Vantagens
Casos de uso
Política de isolamento de recursos
Instância de banco de dados
Guia de aquisição
Visão geral do faturamento
Métodos de aquisição
Pagamento em atraso
Reembolso
Taxa de ajuste de instância
Faturamento do espaço de backup
Guia de operação
Limites de uso
Visão geral da operação
Gerenciamento e manutenção de instâncias
Upgrade da versão
Expansão de instância
Proxy de banco de dados
Gerenciamento de conta
Configuração dos parâmetros
Backup e reversão
Migrasi data
Rede e segurança
Monitoramento e alarmes
Centro de logs
Tag
White paper
White paper sobre a segurança
Service Agreement
Service Level Agreement
Terms of Service
DocumentaçãoTencentDB for MySQL

Parallel replication

Modo Foco
Tamanho da Fonte
Última atualização: 2026-02-24 11:36:56

Feature Introduction

Official MySQL versions below 5.6 perform replay on the standby node and synchronize binlog on the primary node in single-thread mode. Versions 5.6 and later are changed to parallel mode. However, the official parallel mode is based on database and logical clock, and the granularity of parallelism is too coarse, resulting in suboptimal parallel performance in many cases.
The Tencent Cloud TXSQL kernel team optimized the parallel replication feature to support parallel processing by table, effectively splitting the granularity to the table level, which improves parallelism and thereby reduces primary/standby delay.

Supported Versions

Kernel version MySQL 8.0 20201230 and above
Kernel version MySQL 5.7 20180530 and above
Kernel version MySQL 5.6 20170830 and above

Applicable Scenarios

This feature mainly targets certain workloads to improve the speed of binlog replay on the standby node, reducing primary/standby delay.

Usage Instructions

Note:
Parallel replication capability is enabled by setting the parameter slave_parallel_workers to a non-zero value. In the high-stability parameter templates for MySQL versions 5.6, 5.7, and 8.0, this parameter defaults to 0, while in the high-performance parameter templates, it defaults to 8.
MySQL 5.6 and 5.7 versions can enable this feature by setting the parameter slave_parallel_type to the newly added value TABLE. MySQL 8.0 version does not support the TABLE mode. Additionally, a new status table cdb_slave_thread_status has been added under information_schema to display status information.
MySQL 5.6 Version Parameters Description
MySQL 5.7 Version Related Parameters Reference
MySQL 8.0 Version Parameter Descriptions
Parameter Name
Dynamic
Type
Default Value
Value Range
Description
slave_parallel_type
YES
char*
SCHEMA
SCHEMA/TABLE
Slave parallel replication level:
SCHEMA is object-level replication, where replication events for different objects can be executed in parallel.
TABLE is table-level replication, where replication events for different tables can be executed in parallel.
Parameter Name
Dynamic
Type
Default Value
Value Range
Description
slave_parallel_type
YES
char*
LOGICAL_CLOCK
DATABASE/TABLE/LOGICAL_CLOCK
Slave parallel replication level:
DATABASE is database-level replication, where replication events for different databases can be executed in parallel.
TABLE is table-level replication, where replication events for different tables can be executed in parallel.
LOGICAL_CLOCK is logical clock-level replication, where events belonging to the same logical clock on the primary can be executed concurrently.
Parameter Name
Dynamic
Type
Default Value
Value Range
Description
slave_parallel_type
YES
char*
LOGICAL_CLOCK
DATABASE/LOGICAL_CLOCK
Slave parallel replication level:
DATABASE is database-level replication, where replication events for different databases can be executed in parallel.
LOGICAL_CLOCK is logical clock-level replication, where events belonging to the same logical clock on the primary can be executed concurrently.

Ajuda e Suporte

Esta página foi útil?

comentários