ProxySQL 2.x.x and pxc_scheduler_handler tool¶
ProxySQL 2.3.2-1.2 adds the pxc_scheduler_handler tool. This tool has a segment-aware failover mechanism and can automatically perform a failover due to node failures, service degradation, or maintenance requirements. The external scheduler has the following qualities:
Capable of parallel query execution on nodes which results in faster failover or fallback
Supports promoting a reader to primary with the following conditions are met:
wsrep_sst_donor_rejects_queries is set when, for example, connections are rejected due to an ongoing state transfer
Supports a retry of operations in case of network glitches
pxc_scheduler_handler was built for a different purpose and has different features than proxy-admin. You cannot use the options from one admin tool in the other admin tool. Combining the options causes unintended results.
The pxc_scheduler_handler tool has been tested with ProxySQL 2.3.0, 2.3.2-1.2, and later versions.
ProxySQL 2.4.2 add the following checks:
pxc_scheduler_handler launches, the application creates a lock file to prevent the running of multiple instances. Prior to ProxySQL 2.4.2, the lock file remained in the file system and prevented the handler script from running.
Starting with ProxySQL 2.4.2, on startup,
pxc_scheduler_handler does the following:
* Reads the Process identifier (PID)
* Reads the timestamp from the lock file
* Checks if the PID is running on startup
If the PID is running, the newly launched
If the PID is not running, the
pxc_scheduler_handler checks the
lockFileTimeout timeout value. If the timeout value has been exceeded, the
pxc_scheduler_handler removes the lock file and launches
The following are the prerequisites for using the pxc_scheduler_handler:
ProxySQL and Percona XtraDB Cluster are running.
Add an issue¶
If you find a pxc_scheduler_handler bug, add a bug report in the PSQLADM project.