46 lines
1.1 KiB
TOML
46 lines
1.1 KiB
TOML
[global]
|
|
checkNewVersion = false
|
|
sendAnonymousUsage = false
|
|
|
|
[log]
|
|
logLevel = "DEBUG"
|
|
|
|
[entryPoints]
|
|
[entryPoints.web]
|
|
address = ":8000"
|
|
|
|
[providers]
|
|
[providers.file]
|
|
|
|
[http.routers]
|
|
[http.routers.router1]
|
|
rule = "Host(`test.localhost`)"
|
|
service = "service2"
|
|
|
|
[http.routers.router2]
|
|
rule = "Path(`/test`)"
|
|
middlewares = ["circuitbreaker"]
|
|
service = "service1"
|
|
|
|
[http.middlewares]
|
|
[http.middlewares.circuitbreaker.circuitbreaker]
|
|
expression = "NetworkErrorRatio() > 0.5"
|
|
|
|
[http.services]
|
|
[http.services.service1.loadbalancer]
|
|
[[http.services.service1.loadbalancer.servers]]
|
|
url = "http://172.17.0.2:80"
|
|
weight = 10
|
|
[[http.services.service1.loadbalancer.servers]]
|
|
url = "http://172.17.0.3:80"
|
|
weight = 1
|
|
|
|
[http.services.service2]
|
|
[http.services.service2.loadbalancer]
|
|
method = "drr"
|
|
[[http.services.service2.loadbalancer.servers]]
|
|
url = "http://172.17.0.4:80"
|
|
weight = 1
|
|
[[http.services.service2.loadbalancer.servers]]
|
|
url = "http://172.17.0.5:80"
|
|
weight = 2
|