Add weighted round robin load balancer on TCP
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
8e18d37b3d
commit
685c6dc00c
33 changed files with 787 additions and 239 deletions
42
integration/fixtures/tcp/wrr.toml
Normal file
42
integration/fixtures/tcp/wrr.toml
Normal file
|
@ -0,0 +1,42 @@
|
|||
[global]
|
||||
checkNewVersion = false
|
||||
sendAnonymousUsage = false
|
||||
|
||||
[log]
|
||||
level = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.tcp]
|
||||
address = ":8093"
|
||||
|
||||
[api]
|
||||
insecure = true
|
||||
|
||||
[providers.file]
|
||||
filename = "{{ .SelfFilename }}"
|
||||
|
||||
## dynamic configuration ##
|
||||
[tcp]
|
||||
[tcp.routers]
|
||||
[tcp.routers.to-whoami-a]
|
||||
rule = "HostSNI(`whoami-a.test`)"
|
||||
service = "whoami"
|
||||
entryPoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-a.tls]
|
||||
passthrough=true
|
||||
|
||||
[[tcp.services.whoami.weighted.services]]
|
||||
name="whoami-a"
|
||||
weight=3
|
||||
[[tcp.services.whoami.weighted.services]]
|
||||
name="whoami-b"
|
||||
weight=1
|
||||
|
||||
[tcp.services.whoami-a.loadBalancer]
|
||||
[[tcp.services.whoami-a.loadBalancer.servers]]
|
||||
address = "localhost:8081"
|
||||
|
||||
[tcp.services.whoami-b.loadBalancer]
|
||||
[[tcp.services.whoami-b.loadBalancer.servers]]
|
||||
address = "localhost:8082"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue