diff --git a/libnetwork/ipvs/constants.go b/libnetwork/ipvs/constants.go index b6b7f2bb5e34dfa1f828c399e979bbfe9aded8de..efac4e367cf87eb60e40c577b9a45590b9bb4107 100644 --- a/libnetwork/ipvs/constants.go +++ b/libnetwork/ipvs/constants.go @@ -144,6 +144,17 @@ const ( // a statically assigned hash table by their source IP // addresses. SourceHashing = "sh" + + // WeightedRoundRobin assigns jobs to real servers proportionally + // to there real servers' weight. Servers with higher weights + // receive new jobs first and get more jobs than servers + // with lower weights. Servers with equal weights get + // an equal distribution of new jobs + WeightedRoundRobin = "wrr" + + // WeightedLeastConnection assigns more jobs to servers + // with fewer jobs and relative to the real servers' weight + WeightedLeastConnection = "wlc" ) const ( diff --git a/libnetwork/ipvs/ipvs_test.go b/libnetwork/ipvs/ipvs_test.go index 96d47fad38cafe3486b4f1206ae09b0719e080d3..a18b3129775c5dc25e4f95f5ada9df701829c5f9 100644 --- a/libnetwork/ipvs/ipvs_test.go +++ b/libnetwork/ipvs/ipvs_test.go @@ -21,6 +21,8 @@ var ( LeastConnection, DestinationHashing, SourceHashing, + WeightedLeastConnection, + WeightedRoundRobin, } protocols = []string{