Closed
Description
Why
ProxySQL is, by design, not aware replication.
Although, sometime replication topology is so simple (1 master, N slaves) that ProxySQL should be able to correctly switch traffic without being reconfigured externally, but detecting the change of variable read_only
What
- define a new table (mysql_replication_hostgroups) that defines writer_hostgroup (servers with read_only=0) and reader_hostgroup (servers with read_only=1)
- Monitor module should verify variable read_only for all servers in writer_hostgroup and reader_hostgroup
- if read_only is changed for any host, that host is migrated to the right hostgroup
- LOAD MYSQL SERVERS and SAVE MYSQL SERVERS will also operate on new table mysql_replication_hostgroups