Feature Request: Support for Discrepant MySQL Configurations Between Primary and Replica vttablets #17223
Description
Feature Description
Description
Currently, Vitess requires the MySQL configurations on both primary and replica vttablets to be identical. However, given the different roles and performance characteristics of primary and replica databases, it would be beneficial to allow for different MySQL configurations on each. This feature request proposes the ability to configure MySQL settings independently for primary and replica vttablets.
Benefits
Performance Optimization: Tailoring configurations to the specific roles of primary and replica can lead to significant performance improvements.
Resource Utilization: Different configurations can help in better resource utilization based on the workload characteristics of primary and replica databases.
Flexibility: Provides more flexibility in managing database configurations and optimizing for different use cases.
Request: Evaluate the possibility of allowing different MySQL configurations for primary and replica vttablets in Vitess.
Use Case(s)
Use Case
In many scenarios, the primary database is optimized for write performance and durability, while replicas are optimized for read performance and may have different durability requirements. For example:
Primary vttablet Configuration:
innodb_flush_log_at_trx_commit=1
sync_binlog=0
binlog_group_commit_sync_delay=100000
Replica vttablet Configuration:
innodb_flush_log_at_trx_commit=0
sync_binlog=0
binlog_group_commit_sync_delay=0
These configurations reflect the different roles of the primary and replica databases. The primary is configured for maximum durability with innodb_flush_log_at_trx_commit=1, while the replica is configured for performance with innodb_flush_log_at_trx_commit=0.