Scale With MaxScale – Part 2

In this post, We’re going share the details about Operation and Administration part of the MaxScale. To view Installation and Configuration of MaxScale checkout our previous blog.

Before going through this week’s topic, I would highlight some recent change at MaxScale has went through.

From Version 2.0, MaxScale license changed from GPLv2 to MariaDB BSL.

MariaDB BSL enforces usage limitation for free use, require licensing for the unlimited access.

" Usage Limitation: Usage of the software is free when your application uses the
 Software with a total of less than three database server instances for production
 purposes "

All the MaxScale Operational / Administrative commands can be executed on MaxAdmin console. To login the console we can use the default password ‘mariadb’.

Screen Shot 2016-08-24 at 11.30.47 AM

Alternatively password can be given inline to login the MaxAdmin console.

Screen Shot 2016-08-24 at 11.31.08 AM.png

MaxScale Operational / Admin Commands

1. list services

This can be used to identify the services that are running and the router associated with the service.

Screen Shot 2016-08-24 at 9.56.50 AM

Here,  Service RW is associated with readwritesplit router,
Service Console is associated with cli router (which a MaxAdmin Process).

2. show service [service_name]

This can be used view detailed statistics about any of the running service.

Screen Shot 2016-08-24 at 9.57.54 AM

This provide us useful statistics like Percentage of connections split between Master and Slave, Number of current connections, Total connections etc.,

3. enable root [service_name]

By default, root login to the backend servers is disabled when connecting through the MaxScale. We can enable root login to backend server with this command.

Screen Shot 2016-08-24 at 10.08.48 AM.png

4. set / clear [server_name] maintenance

This is one of the most useful command, We can use this to take out a node out of production traffic for maintenance.

Screen Shot 2016-08-24 at 11.52.40 AM.png

You can see from the above example, Initially three nodes were taking traffic, When set node2 on maintenance mode connections are dropped off.

Once maintenance is complete, We can use clear command to put back the node on production traffic.

Screen Shot 2016-08-24 at 11.53.20 AM.png

5. reload config

We don’t need to restart MaxScale for the changes in configuration to take effect. We can able to load the changes in the configuration with reload command.

Screen Shot 2016-08-24 at 10.24.49 AM.png

6. flush logs

By default, MaxScale error log is stored at /var/log/maxscale/ 

This command can be used to flush the current log and create a error log.

Screen Shot 2016-08-24 at 10.15.51 AM.png

7. show dbusers [service_name]

This command displays the aggregated list of unique users present in all the backend servers of a service.

MaxScale caches the user details on a hash table for faster connections. Hash table entries are updated each time when it encounters a miss or failure. It can also be updated forcefully by the command MaxScale> flush dbusers [service_name]

Screen Shot 2016-08-24 at 11.42.00 AM.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s