Add least time load balancing strategy
This commit is contained in:
parent
067c7e7152
commit
a754236ce5
25 changed files with 1830 additions and 134 deletions
|
|
@ -351,12 +351,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
@ -1313,12 +1314,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
@ -3031,12 +3033,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
@ -3359,12 +3362,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
@ -3506,12 +3510,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
@ -3740,12 +3745,13 @@ spec:
|
|||
strategy:
|
||||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
|
||||
Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
|
||||
RoundRobin value is deprecated and supported for backward compatibility.
|
||||
enum:
|
||||
- wrr
|
||||
- p2c
|
||||
- hrw
|
||||
- leasttime
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
|
|
|
|||
36
integration/fixtures/leasttime_server.toml
Normal file
36
integration/fixtures/leasttime_server.toml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
[global]
|
||||
checkNewVersion = false
|
||||
sendAnonymousUsage = false
|
||||
|
||||
[api]
|
||||
insecure = true
|
||||
|
||||
[log]
|
||||
level = "DEBUG"
|
||||
noColor = true
|
||||
|
||||
[entryPoints]
|
||||
|
||||
[entryPoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers.file]
|
||||
filename = "{{ .SelfFilename }}"
|
||||
|
||||
## dynamic configuration ##
|
||||
|
||||
[http.routers]
|
||||
[http.routers.router]
|
||||
service = "service1"
|
||||
rule = "Path(`/whoami`)"
|
||||
|
||||
[http.services]
|
||||
|
||||
[http.services.service1.loadBalancer]
|
||||
strategy = "leasttime"
|
||||
[[http.services.service1.loadBalancer.servers]]
|
||||
url = "{{ .Server1 }}"
|
||||
weight = 1
|
||||
[[http.services.service1.loadBalancer.servers]]
|
||||
url = "{{ .Server2 }}"
|
||||
weight = 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue