In this blog post, we’ll look at how Percona XtraDB Cluster maintenance mode uses ProxySQL to take cluster nodes offline without impacting workloads.
Percona XtraDB Cluster Maintenance Mode
Since Percona XtraDB Cluster offers a high availability solution, it must consider a data flow where a cluster node gets taken down for maintenance (through isolation from a cluster or complete shutdown).
Percona XtraDB Cluster facilitated this by introducing a maintenance mode. Percona XtraDB Cluster maintenance mode reduces the number of abrupt workload failures if a node is taken down using ProxySQL (as a load balancer).
The central idea is delaying the core node action and allowing ProxySQL to divert the workload.
How ProxySQL Manages Percona XtraDB Cluster Maintenance Mode
With Percona XtraDB Cluster maintenance mode, ProxySQL marks the node as OFFLINE when a user triggers a shutdown signal (or wants to put a specific node into maintenance mode):
Technical Details:
Sample proxysql_galera_checker log:
|
1 |
<span style="font-weight: 400;">Thu Dec 8 11:21:11 GMT 2016 Enabling config</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:17 GMT 2016 Check server 10:127.0.0.1:25000 , status ONLINE , wsrep_local_state 4</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:17 GMT 2016 Check server 10:127.0.0.1:25100 , status ONLINE , wsrep_local_state 4</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:17 GMT 2016 Check server 10:127.0.0.1:25200 , status ONLINE , wsrep_local_state 4</span><br><b>Thu Dec 8 11:21:17 GMT 2016 Changing server 10:127.0.0.1:25200 to status OFFLINE_SOFT due to SHUTDOWN</b><br><span style="font-weight: 400;">Thu Dec 8 11:21:17 GMT 2016 Number of writers online: 2 : hostgroup: 10</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:17 GMT 2016 Enabling config</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:22 GMT 2016 Check server 10:127.0.0.1:25000 , status ONLINE , wsrep_local_state 4</span><br><span style="font-weight: 400;">Thu Dec 8 11:21:22 GMT 2016 Check server 10:127.0.0.1:25100 , status ONLINE , wsrep_local_state 4</span><br><b>Thu Dec 8 11:21:22 GMT 2016 Check server 10:127.0.0.1:25200 , status OFFLINE_SOFT , wsrep_local_state 4</b> |
Ping us below with any questions or comments.
Resources
RELATED POSTS