-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support for Discrepant MySQL Configurations Between Primary and Replica vttablets #17223
Comments
Mh. Are you running with semi sync or without? With semi sync, you could just use the config options you have on replicas on the primary as well, because each transaction is guaranteed to have been replicated to at least one replica. |
Which tablet is a replica and which is a primary is not static. You can already dynamically configure a MySQL instance whenever/however you like (e.g. disabling syncing for binlogs and Innodb Redo logs). Vitess does not constantly check all MySQL config options in running instances and enforce they be the same across the fleet. I must be missing something as I'm not sure exactly what is being requested here? Maybe you're saying that you want to be able to define a static MySQL config for different tablet types and have Vitess enforce that when a tablet's type changes? |
I agree with Matt, I don't think we should be adding this to Vitess. |
Yes, exactly. Our MySQL database implementation requires something like this:
We have a mechanism that detects the role of MySQL and applies the appropriate configuration. This helps reduce slave lag and other issues. Another example, consider binlog_group_commit_sync_delay=100000. We only want this setting on the primary for parallel replication. The replica doesn't need to delay for 100 ms for each group. This approach can save time when rebuilding replicas from backups, especially for busy MySQL instances with a high volume of transactions. |
I know this is off-topic, but have you looked into |
binlog_group_commit_sync_delay is just a case what about innodb_flush_log_at_trx_commit ? |
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:
Replica vttablet Configuration:
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.
The text was updated successfully, but these errors were encountered: