Skip to content

Commit

Permalink
Merge pull request moby#2453 from jdrahos/ipvs_weighted_scheduling_co…
Browse files Browse the repository at this point in the history
…nstants-2452

weighted scheduling methods constants for ipvs
  • Loading branch information
selansen committed Sep 28, 2019
2 parents 953ec5e + c8a5fca commit 27a47ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ipvs/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions ipvs/ipvs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ var (
LeastConnection,
DestinationHashing,
SourceHashing,
WeightedLeastConnection,
WeightedRoundRobin,
}

protocols = []string{
Expand Down

0 comments on commit 27a47ab

Please sign in to comment.