Pages

Monday, March 4, 2024

MySQL Router 8.3

 

MySQL Router 8.3 

MySQL Router 8.3 is the latest version of the middleware component that provides transparent routing capabilities between MySQL clients and MySQL servers. It is designed to simplify the deployment and management of highly available and scalable MySQL deployments, such as InnoDB Clusters and replication setups.
One of the key features of MySQL Router 8.3 is its enhanced routing capabilities for InnoDB Clusters. It can automatically detect the primary and secondary instances within a cluster and route read and write operations accordingly. Write operations are directed to the primary instance, while read operations are distributed across the secondary instances, providing improved read scalability and high availability.
MySQL Router 8.3 also offers improved support for asynchronous replication setups. It can route write operations to the replication source and read operations to the replicas, ensuring data consistency and efficient load distribution. Additionally, it supports automatic failover and switchover scenarios, seamlessly redirecting traffic to the new primary instance or replication source in case of failures or maintenance operations.
Another notable enhancement in MySQL Router 8.3 is its support for MySQL Group Replication. It can automatically detect the members of a Group Replication setup and route traffic to the appropriate nodes based on their roles (primary or secondary). This feature simplifies the deployment and management of highly available MySQL setups using Group Replication.
MySQL Router 8.3 also includes improvements in performance, security, and configuration options. It supports TLS encryption for secure communication between clients and servers, as well as improved connection pooling and caching mechanisms for better performance.
Overall, MySQL Router 8.3 aims to simplify the deployment and management of highly available and scalable MySQL deployments, providing transparent routing capabilities, automatic failover handling, and improved performance and security features.

Performance Recommendations

For best performance, MySQL Router is typically installed on the same host as the application that uses it. 

This helps to reduce the latancy and improve performence.





Read/Write Splitting


At a large scale, read operations are distributed across multiple replicas to enhance performance and availability. However, this necessitates a mechanism within the application to direct write operations to a specific location while routing read operations to other destinations. With the introduction of MySQL 8.2, MySQL Router offers a solution by automatically identifying read and write queries. For InnoDB Clusters, it routes write operations to the Primary Instances and read operations to secondary instances or replicas. In the case of asynchronous replication setups, write queries are directed to the replication source, while read queries are forwarded to the replicas or secondary instances.