浏览代码

weighted scheduling methods constants for ipvs
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>

jdrahos 5 年之前
父节点
当前提交
4d1db69bcc
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      libnetwork/ipvs/constants.go

+ 11 - 0
libnetwork/ipvs/constants.go

@@ -144,6 +144,17 @@ const (
 	// a statically assigned hash table by their source IP
 	// a statically assigned hash table by their source IP
 	// addresses.
 	// addresses.
 	SourceHashing = "sh"
 	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 (
 const (