Step 5: Start and Configure MaxScale

This page details step 5 of a 6-step procedure for deploying the Xpand Performance topology.

This step starts and configures MaxScale.

Interactive commands are detailed. Alternatively, the described operations can be performed using automation.

Several of the actions on this page use MaxCtrl. For additional information about MaxCtrl, see "MaxCtrl (MaxScale 2.5)". Alternative configuration options are available.

Support for this procedure is available in the MariaDB Xpand forum. Production customers can obtain support in the MariaDB Xpand forum or by submitting a support case.

Replace Default Configuration File

This action is performed on the MaxScale node.

Replace the default /etc/maxscale.cnf with the following configuration:

[maxscale]
threads=auto
admin_host=0.0.0.0
admin_secure_gui=false

For additional information, see "Global Parameters (MaxScale 2.5)" and "Module Parameters (MaxScale 2.5)".

Start the MaxScale Process

The MaxScale service must be started.

This action is performed on the MaxScale node.

Use the restart command to ensure that MaxScale picks up the new configuration.

To start the MaxScale process:

$ sudo systemctl restart maxscale

Configure Server Objects

This action is performed on the MaxScale node.

To configure MaxScale to recognize each server:

$ maxctrl create server xpand1 192.0.2.1
$ maxctrl create server xpand2 192.0.2.2
$ maxctrl create server xpand3 192.0.2.3

In this example:

  • xpand1, xpand2, and xpand3 are server names.

  • 192.0.2.1, 192.0.2.2, and 192.0.2.3 are the IP addresses for those servers.

For additional information, see "create server (MaxCtrl Command)" and "Module Parameters (MaxScale 2.5)".

Configure Xpand Monitor

This action is performed on the MaxScale node.

To configure MaxScale to start the monitor:

$ maxctrl create monitor xpand_monitor xpandmon \
   --servers xpand1 xpand2 xpand3 \
   --monitor-user=mxs \
   --monitor-password=mxs_user_passwd

In this example:

  • xpand_monitor is the name of the monitor.

  • xpandmon is the module.

  • xpand1, xpand2, and xpand3 are names of the configured server objects.

  • mxs is our database user account for MaxScale, specified with the --monitor-user option.

  • mxs_user_passwd is the password for our database user account, specified with the --monitor-password option.

For additional information, see "create monitor (MaxCtrl Command)" and "Module Parameters (MaxScale 2.5)".

Configure Read/Write Split Router

This action is performed on the MaxScale node.

MaxScale's Read/Write Split Router is used to load balance traffic.

To configure MaxScale to start the router:

$ maxctrl create service xpand_service readwritesplit \
   user=mxs \
   password=mxs_user_passwd \
   --servers xpand1 xpand2 xpand3

In this example:

  • xpand_service is the name of the new service.

  • readwritesplit is the router.

  • mxs is our database user account for MaxScale, specified as a key=value pair.

  • mxs_user_passwd is the password for our database user account, specified as a key=value pair.

  • xpand1, xpand2, and xpand3 are names of the configured server objects, specified with the --servers option.

For additional information, see "create service (MaxCtrl Command)" and "Module Parameters (MaxScale 2.5)".

Configure the Router's Listener

This action is performed on the MaxScale node.

These instructions reference TCP port 3306. You may alternatively use a different TCP port. The TCP port used must not be bound by any other listener.

To configure MaxScale to start the router's listener:

$ maxctrl create listener xpand_service xpand_listener 3306 \
   --protocol=MariaDBClient

In this example:

  • xpand_service is the service.

  • xpand_listener is the name of the new listener.

  • 3306 is the TCP port.

  • MariaDBClient is the protocol, specified with the --protocol option.

For additional information, see "create listener (MaxCtrl Command)".

Next Step

Navigation in the Xpand Performance topology deployment procedure:

  • This page was step 5 of 6.

Support

Support for this procedure is available in the MariaDB Xpand forum. Production customers can obtain support in the MariaDB Xpand forum or by submitting a support case.