FreddieBrown / stabilize

QUIC/UDP L4 Proxy Load Balancer
GNU General Public License v3.0
1 stars 0 forks source link

Implement Least Connections Algorithm #13

Closed FreddieBrown closed 4 years ago

FreddieBrown commented 4 years ago

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 to stabilize::backend::Server

FreddieBrown commented 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.

FreddieBrown commented 4 years ago

Additional commit c85752b to ensure decrement_connections only called when Algo::LeastConnections is used