Description:
I've noticed that MySQL Proxy supports retrieving its internal configuration via SQL. It
would be really nice if this configuration, or at least parts of it, could be updated via
the same mechanism.
The idea is to be able to change the backend servers dynamically from an external
replication monitoring program. I realize it can probably be done in LUA but the monitor
wouldn't be in LUA itself so it would still need to communicate with the Proxy in some
way, might as well be in a known fashion (SQL). This may well become a possible common
usage scenario for the Proxy so it's worth implementing at some point. The reasons for
being able to update the backend list on-the-fly include:
- pick the most up-to-date servers, avoiding slaves that are lagging. Even for reads,
where you want to read the freshest data;
- with read/write splitting, select the Write backend based on predefined algorithms that
take into account replication state (monitored externally);
- synchronize a set of Proxy servers so they use the same Write backend after a backend
failure;
- implement any number of server selection algorithms tightly integrated with the
application using the database. Being able to query backend usage stats from the Proxy
(queries, times, active etc) would also be useful in this context.
forum link: http://forums.mysql.com/read.php?146,164065
How to repeat:
N/A