Discover Packages
github.com/github/freno
pkg
proxysql
package
Version:
v1.3.1
Opens a new window with list of versions in this module.
Published: Jan 25, 2023
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
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 pass
SHUNNED_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 backend
OFFLINE_SOFT
- a server that is draining, usually for maintenance, etc
OFFLINE_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
in MySQLConfigurationSettings
(global) or User
in ProxySQLConfigurationSettings
(per-cluster) must be equal to admin-stats_credentials
ProxySQLPassword
in MySQLConfigurationSettings
(global) or Password
in ProxySQLConfigurationSettings
(per-cluster) must be equal to admin-stats_credentials
The ProxySQL monitor module is enabled, eg: mysql-monitor_enabled
is true
The ProxySQL --no-monitor
daemon flag cannot be set
The max_replication_lag
column is defined for backend servers in the mysql_servers
admin table
This ensures reads do not receive stale data but lagging nodes are still probed
Expand ▾
Collapse ▴
Documentation
¶
Client is the ProxySQL admin client
NewClient returns a new ProxySQL admin client
CloseDB closes a ProxySQL admin connection based on an address string
GetDB returns a configured ProxySQL admin connection
GetServers returns a list of MySQLConnectionPoolServers with 'ONLINE' or 'SHUNNED_REPLICATION_LAG' status, based on hostgroup ID
MySQLConnectionPoolServer represents a row in the stats_mysql_connection_pool table
Address returns a string of the hostname/port of a server
Source Files
¶
Click to show internal directories.
Click to hide internal directories.