MaxScale is an intelligent database gateway for high availability, scalability, security, interoperability and manageability beyond MariaDB and MySQL. As the gateway between client applications and backend databases, MaxScale insulates the client applications from complexities of the backend database servers and clusters.
MaxScale’s architecture is highly configurable consisting of a core and database aware plugin modules. This flexible and configurable plugin architecture of MaxScale has enabled a wide variety of use cases for the community:
- Securing your database
- Minimizing maintenance downtime
- Migrating your database
- Ensuring uptime
- Scaling your database
- Interoperating with other databases
In this blog we look at how MaxScale helps minimize database access down time for client applications. Following our partner Severalnines’ recent announcement we want to inform the MariaDB community know that there is an automation and management platform available to them, ClusterControl, that will help them deploy and manage MaxScale for MariaDB (which in turn also helps minimize downtime).
ClusterControl helps DevOps & SysAdmins deploy, manage, monitor and scale MariaDB databases. Users are able to deploy single MariaDB instances or Galera-based MariaDB Clusters. It is also possible for ClusterControl to connect to your existing MariaDB servers to manage and monitor them.
ClusterControl supports a variety of SQL and NoSQL cluster topologies alongside MariaDB, as well as SQL load balancing now via MaxScale. New features include:
- Deploy MaxScale instance for round-robin or read/write splitter with a customizable configuration
- Add an existing running MaxScale instance
- Send commands to “maxadmin” and view the output in ClusterControl
To find out how to use ClusterControl for MaxScale, read the related Severalnines blog: How to deploy and manage MaxScale.
Minimize maintenance downtime with read load distribution
The key MaxScale functionality that help minimize downtime is MaxScale’s ability to insulate client applications from backend database servers. MaxScale monitoring plugin continuously monitors the state of backend database servers. MaxScale routing plugin, then uses this state information, to always route queries to backend database servers that are in service according to load balance Allowing client applications to send queries to backend database clusters even when some of the servers of a cluster are going through maintenance or failure.
MaxScale’s high configurability enables changes in cluster configuration to remain transparent to client applications. For example if a new server needs to be administratively added to or removed from a master-slave cluster, simply add it in MaxScale configuration to the server list of monitor and router plugin via maxadmin CLI console. The client application is completely unaware of this change and continues to send database queries to the MaxScale’s listening port. Here is an example configuration for a 3 server MySQL master-slave cluster:
Now if you want to put a database server in maintenance, simply do following command in maxadmin and MaxScale will stop sending any queries to this server
MaxScale> set server dbserv3 maintenance
If you want to add a completely new server to the cluster, then update the monitor, server and services section of the configuration file maxscale.cnf with the new server, and then do following command in maxadmin to apply the configuration changes
MaxScale> reload config
Minimize downtime with automatic failover in a master-slave cluster
In order to minimize application downtime due to database access, a solution needs to provide continuous database access both during administrative changes and operational changes to database servers. For providing continuity during operational changes to the database server, you can use MaxScale’s ability to launch external scripts when MaxScale detects change in database server status such as master or slave going down.This allows our admin users to not only detect database server failure in Master-Slave cluster, but also to automatically trigger failover. You can find example configuration for how to setup automatic failover in this article.
Customers interested in deploying MaxScale have options to manage MaxScale with ClusterControl. Severalnines are our partner and have provided full automation and management capabilities for MariaDB Enterprise Cluster through ClusterControl.