# README
ProxySQL
This package implements freno store support for ProxySQL
Logic
Freno will probe servers found in the stats.stats_mysql_connection_pool
ProxySQL admin table that have either status:
ONLINE
- connect, ping and replication checks passSHUNNED_REPLICATION_LAG
- connect and ping checks pass, but replication is lagging
All other statuses are considered unhealthy and therefore are ignored by freno, eg:
SHUNNED
- proxysql connot connect and/or ping a backendOFFLINE_SOFT
- a server that is draining, usually for maintenance, etcOFFLINE_HARD
- a server that is completely offline
Requirements
- The ProxySQL admin port is reachable to Freno
- The ProxySQL global variable admin-stats_credentials is defined
ProxySQLUser
inMySQLConfigurationSettings
(global) orUser
inProxySQLConfigurationSettings
(per-cluster) must be equal toadmin-stats_credentials
ProxySQLPassword
inMySQLConfigurationSettings
(global) orPassword
inProxySQLConfigurationSettings
(per-cluster) must be equal toadmin-stats_credentials
- The ProxySQL monitor module is enabled, eg:
mysql-monitor_enabled
istrue
- The ProxySQL
--no-monitor
daemon flag cannot be set
- The ProxySQL
- The
max_replication_lag
column is defined for backend servers in themysql_servers
admin table- This ensures reads do not receive stale data but lagging nodes are still probed
# Functions
NewClient returns a new ProxySQL admin client.
# Structs
Client is the ProxySQL admin client.
MySQLConnectionPoolServer represents a row in the stats_mysql_connection_pool table.