sysown/proxysql

Implement setting in `mysql_hostgroup_attributes` to define custom load balancing algorithm

renecannao opened this issue · 0 comments

This is a new feature.

Currently ProxySQL supports only 1 load balancing algorithm: "weighted random load balancing" .
(Actually, it is a slightly modified version of it, as the presence of free connections may direct more traffic to the server with more connections: the presence of free connections is used as a hint that the server can take more traffic).

"Complex logic" like the one described in #730 can add time in finding a candidate server, thus shouldn't a behavior that is always enabled.
Although we could implement different load balancing algorithms based on hostgroup. In this way the default algorithm is not changed, but each hostgroup can use a different load balancing algorithm at (potentially) a different performance cost.
This may be beneficial in scenarios like the one described in #730 .

Note on performance:
The performance cost cannot be determined before the actual implementation design, but it is likely to be a small cost especially when compared with network latency.