From 4d1db69bcc91cabb5f217154688cdb136c2665de Mon Sep 17 00:00:00 2001 From: jdrahos Date: Tue, 24 Sep 2019 18:15:31 -0400 Subject: [PATCH 1/3] weighted scheduling methods constants for ipvs Signed-off-by: Jakub Drahos --- libnetwork/ipvs/constants.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libnetwork/ipvs/constants.go b/libnetwork/ipvs/constants.go index b6b7f2bb5e..efac4e367c 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 ( From 0a99a5f15295bc0e98ab7984618eb98aa53ba183 Mon Sep 17 00:00:00 2001 From: Jakub Drahos Date: Tue, 24 Sep 2019 21:42:32 -0400 Subject: [PATCH 2/3] adding the constants to the test file Signed-off-by: Jakub Drahos --- libnetwork/ipvs/ipvs_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnetwork/ipvs/ipvs_test.go b/libnetwork/ipvs/ipvs_test.go index 96d47fad38..1797ac04cd 100644 --- a/libnetwork/ipvs/ipvs_test.go +++ b/libnetwork/ipvs/ipvs_test.go @@ -21,6 +21,8 @@ var ( LeastConnection, DestinationHashing, SourceHashing, + WeightedRoundRobin, + WeightedLeastConnection, } protocols = []string{ From edd44eede9a1d91cd18fb0ef793a93a9cb4c57e1 Mon Sep 17 00:00:00 2001 From: Jakub Drahos Date: Wed, 25 Sep 2019 10:39:33 -0400 Subject: [PATCH 3/3] trigger new CI run Signed-off-by: Jakub Drahos --- libnetwork/ipvs/ipvs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetwork/ipvs/ipvs_test.go b/libnetwork/ipvs/ipvs_test.go index 1797ac04cd..a18b312977 100644 --- a/libnetwork/ipvs/ipvs_test.go +++ b/libnetwork/ipvs/ipvs_test.go @@ -21,8 +21,8 @@ var ( LeastConnection, DestinationHashing, SourceHashing, - WeightedRoundRobin, WeightedLeastConnection, + WeightedRoundRobin, } protocols = []string{