MySQL Router 8.0  /  MySQL Router Frequently Asked Questions

Appendix A MySQL Router Frequently Asked Questions

A.1. Where do I install MySQL Router?
A.2. Can I run more than one instance of the router application?
A.3. How do I make the router application highly available?
A.4. Does the router inspect packets?
A.5. Does the router impact performance?
A.6. Please explain the different MySQL Router versions, especially why Router went from 2.1.4 to 8.0.3.
A.7. Can I bind the router to multiple IP addresses?
A.8. What is the difference between the different scheduling modes and strategies?
A.9. How many concurrent connections does each MySQL Router instance support?
A.10. How can I configure MySQL Router to use a non-default directory on a system using AppArmor?

A.1.

Where do I install MySQL Router?

For best performance, MySQL Router is typically installed on the same host as the application that uses it. Doing so can decrease network latency, allow a local unix domain socket connection to the application instead of TCP/IP, and typically application servers are easiest to scale. But, this is not a requirement as Router can be installed on any host, even its own.

Note

Unix domain sockets can function with applications connecting to MySQL Router, but not for MySQL Router connecting to a MySQL Server.

A.2.

Can I run more than one instance of the router application?

Yes, see also the --directory bootstrap option.

A.3.

How do I make the router application highly available?

Use MySQL Router as part of InnoDB Cluster. For additional details, see MySQL AdminAPI.

A.4.

Does the router inspect packets?

No.

A.5.

Does the router impact performance?

Introducing a component in a communication stream incurs a certain amount of overhead; this is affected heavily by workload. Fortunately, performance testing on the current release has shown approximately 1% within the same speed as a direct connection for simple redirect connection routing.

A.6.

Please explain the different MySQL Router versions, especially why Router went from 2.1.4 to 8.0.3.

MySQL Router 2.0 was the initial version and is meant for MySQL Fabric users. It has since been deprecated and is no longer supported.

MySQL Router 2.1 was introduced to support MySQL InnoDB cluster, and it also added new features such as bootstrapping.

MySQL Router 8.0 expands on MySQL Router 2.1 but with a version number that aligns with MySQL Server. In other words, Router 2.1.5 was released as Router 8.0.3 (along with MySQL Server 8.0.3), and the 2.1.x branch was replaced by 8.0.x. The two branches are fully compatible.

A.7.

Can I bind the router to multiple IP addresses?

No, the bind_address option in the configuration file accepts only one address. However, it is possible to use bind_addres = 0.0.0.0 to bind to all ports on the localhost.

A.8.

What is the difference between the different scheduling modes and strategies?

Router 8.0 introduced the routing_strategy option. It offers the first-available, next-available, round-robin and round-robin-with-fallback strategies. See the routing_strategy documentation for additional details.

A.9.

How many concurrent connections does each MySQL Router instance support?

Over 50,000 as of MySQL Router 8.0.22, depending on the system's poll (poll or linux_epoll) limits and also depending on the number of available CPU cores/threads.

Earlier MySQL Router versions had had a limit closer to 5000, depending on the operating system's poll() limits.

A.10.

How can I configure MySQL Router to use a non-default directory on a system using AppArmor?

If you use the --directory option on a system using AppArmor, for example Ubuntu, you could encounter a permissions error related to MySQL Router accessing the non-default directory. In this case, add the path you pass to --directory to the AppArmor file as suggested, and restart AppArmor.


PREV   HOME   UP