ProxySQL 2.0.3 and proxysql-admin (2019-05-07)¶
ProxySQL is a high-performance proxy, currently for MySQL, and database servers in the MySQL ecosystem (like Percona Server for MySQL and MariaDB). It acts as an intermediary for client requests seeking resources from the database. René Cannaò created ProxySQL for DBAs as a means of solving complex replication topology issues.
The ProxySQL release source and binary packages available from the Percona download page for ProxySQL 2 include ProxySQL Admin – a tool developed by Percona to configure Percona XtraDB Cluster nodes into ProxySQL. Docker images are available as well.
You can download the original ProxySQL from GitHub. ProxySQL offers the ProxySQL documentation. For more information on the issues fixed, features, or enhancements, see the ProxySQL 2.0.3 release notes
With ProxySQL 2.0.3, ProxySQL Admin now uses the native ProxySQL support for Percona XtraDB Cluster and does not require custom bash scripts to keep track of Percona XtraDB Cluster (PXC) status. As a result,
proxysql_node_monitor have been removed.
- The proxysql-admin tool is MySQL 8.0 compatible
New option –
use-sslto use SSL (Secure Sockets Layer) for connections between ProxySQL and the backend database servers
New option -
–max-transactions-behindto determine the maximum number of writesets that can be queued before the node is SHUNNED to avoid stale reads. The default value is 100.
New operation –update-cluster to update the cluster membership by adding server nodes as found. (Note that nodes are added but not removed). The
–writer-hgoption may be used to specify which galera hostgroup to update. The
–remove-all-serversoption instructs to remove all servers fromthe mysql_servers table before updating the cluster. Hostgroups can now be specified on the command-line:
–offline-hg. Previously, these host groups were only read from the configuration file.
The –enable and –update-cluster options used simultaneously have special meaning. If the cluster has not been enabled, then
–enableis run. If the cluster has already been enabled, then
New command –is-enabled to see if a cluster has been enabled. This command checks for the existence of a row in the
–writer-hgmay be used to specify the writer hostgroup used to search the
New command –status to display galera hostgroup information. This commandlists all rows in the current
mysql_galera_hostgroupstable as well as all servers that belong to these hostgroups. With the
–writer-hgoption, only the information for the galera hostgroup with that writer hostgroup is displayed.
–node-check-intervalnow changes the ProxySQL global variable
mysql-monitor_galera_healthcheck_interval. Note that this is a global variable, not a per-cluster variable.
The option –write-node now takes only a single address as a parameter. In the singlewrite mode we only set the weight if
–write-nodespecifies address:port. A priority list of addresses is no longer accepted.
–writers-as-readersoption now accepts a different set of values. Due to changes in the behavior of ProxySQL between version 1.4 and version 2.0 related to Galera support, the values of
–writers-as-readershave been changed. This option now accepts the following values: yes, no, and backup.
writers, backup-writers, and read-only nodes can act as readers.
only read-only nodes can act as readers.
only backup-writers can act as readers.
–disablecan now use the
–disableremoves all users associated with the galera cluster hostgroups. Previously, this command only removed the users with the
–disablenow accepts the
–writer-hgoption to disable the Galera cluster associated with that hostgroup overriding the value specified in the configuration file.
Asynchronous slave reader support has been removed: the
–include-slavesoption is not supported.
A list of nodes in the priority order is no longer supported. Only a single node is supported at this time.
Since the proxysql_galera_checker and proxysql_node_monitor scripts are no longer run in ProxySQL scheduler, automatic cluster membership updates are not supported.
pxc_maint_modevariable is no longer supported
Using desynced nodes if no other nodes are available is no longer supported.
The server status is no longer maintained in the mysql_servers table.
- With –writers-as-readers set to backup, read-only nodes are not allowed. This a limitation of ProxySQL 2.0. Note that backup is the default value of
–modeequals to singlewrite
ProxySQL is available under Open Source license GPLv3.