MySQL Router 8.0  /  Deploying MySQL Router

Chapter 3 Deploying MySQL Router

Performance Recommendations

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

  • To allow local UNIX domain socket connections to the application, instead of TCP/IP.


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

  • To decrease network latency.

  • To allow MySQL Router to connect to MySQL without requiring extra accounts for the Router's host, for MySQL accounts that are created specifically for application hosts such as myapp@ instead of a value like myapp@%.

  • Typically application servers are easiest to scale.

You can run multiple MySQL Router instances on your network, and you do not need to isolate MySQL Router to a single machine. This is because MySQL Router has no affinity for any particular server or host.

Figure 3.1 Example MySQL Router Deployment

Example deployment shows a central Group Replication and Highly Available setup with three entities pointing towards or connected to it: MySQL Shell, and two stacks that each include MySQL Router, MySQL Connector, and the Application.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.