MySQL Router 2.0  /  Plugins  /  Connection Routing Plugin

5.1 Connection Routing Plugin

The Connection Routing plugin performs connection-based routing, meaning that it forwards the packets to the server without looking at them. This is a simplistic approach that provides a high throughput.

Note

MySQL Fabric usage is optional, and the example below does not use Fabric.

A simple connection-based routing setup is shown below. These options were documented in the Configuration File Setup chapter.

[DEFAULT]
logging_folder = /var/log/mysql/router
config_folder  = /usr/local/etc/mysqlrouter
plugin_folder  = /usr/local/lib/mysqlrouter
runtime_folder = /usr/local/

[logger]
level = INFO

[routing]
bind_address = 127.0.0.1:7002
destinations = slave1.example.com,slave2.example.com,slave3.example.com
mode = read-only

Here we use connection routing to round-robin MySQL connections to three MySQL servers. The read-only mode causes round-robin behavior, and logs are sent to /var/log/mysql/router/mysqlrouter.log.


User Comments
Sign Up Login You must be logged in to post a comment.