
ProxySQL 2.0.3, released by ProxySQL, is now available for download in the Percona Repository along with an updated version of Percona’s proxysql-admin tool.
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 2.0.3 source and binary packages available from the Percona download page for ProxySQL include ProxySQL Admin – a tool developed by Percona to configure Percona XtraDB Cluster nodes into ProxySQL. Docker images for release 2.0.3 are available as well. You can download the original ProxySQL from GitHub. GitHub hosts the documentation in the wiki format.
With ProxySQL 2.0.3, the proxysql-admin tool now uses the native ProxySQL support for Percona XtraDB Cluster and does not require custom bash scripts to keep track of PXC status. As a result, proxysql_galera_checker and proxysql_node_monitor have been removed.
Improvements
- The proxysql-admin tool is MySQL 8.0 compatible
Added Features
- New option
--use-sslto use SSL 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-clusterto 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 from themysql_serverstable before updating the cluster. - Hostgroups can now be specified on the command-line:
--writer-hg,--reader-hg,--backup-writer-hg, and--offline-hg.
Previously, these host groups were only read from the configuration file. - The
--enableand--update-clusteroptions used simultaneously have special meaning. If the cluster has not been enabled, then--enableis run. If the cluster has already been enabled, then--update-clusteris run. - New command
--is-enabledto see if a cluster has been enabled. This command checks for the existence of a row in themysql_galera_hostgroupstable. The--writer-hgoption may be used to specify the writer hostgroup used to search themysql_galera_hostgroupstable. - New command
--statusto display galera hostgroup information. This command lists all rows in the currentmysql_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.
Changed Features
- Setting
--node-check-intervalnow changes the ProxySQL global variablemysql-monitor_galera_healthcheck_interval
Note that this is a global variable, not a per-cluster variable. - The option
--write-nodenow 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. - The option
--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.
yes: writers, backup-writers, and read-only nodes can act as readers.
no: only read-only nodes can act as readers.
backup: only backup-writers can act as readers. - The commands
--syncusers,--sync-multi-cluster-users,--adduser, and--disablecan now use the--writer-hgoption. - The command
--disableremoves all users associated with the galera cluster hostgroups. Previously, this command only removed the users with the CLUSTER_APP_USERNAME. - The command
--disablenow accepts the--writer-hgoption to disable the Galera cluster associated with that hostgroup overriding the value specified in the configuration file.
Removed Features
- 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
galera_proxysql_checkerandgalera_node_monitorscripts are no longer run in the scheduler, automatic cluster membership updates are not supported. - Checking the pxc_maint_mode variable 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.
Limitations
- With
--writers-as-readers=backupread-only nodes are not allowed.
This a limitation of ProxySQL 2.0. Note that backup is the default value of--writers-as-readerswhen--mode=singlewrite
ProxySQL is available under Open Source license GPLv3.