Closed FreddieBrown closed 4 years ago
This has been implemented in commit 50ff4d4. This has an associated test and 2 methods, least_connections
and decrement_connections
. These will increment the connections counter when a connection is started and then decrement it when it is finished.
Additional commit c85752b to ensure decrement_connections
only called when Algo::LeastConnections
is used
Least Connections is a load balancing algorithm used to keep track of connections to servers, and allocate new connections to servers with the fewest connections. This algorithm should be implemented in Stabilize so its performance can be improved. This enhancement should be done in the module
stabilize::backend::Algo,
stabilize::backend::ServerPool::get_next
and changes will also have to be made tostabilize::backend::Server