2016-02-01 10:07:05 +00:00
|
|
|
|
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.http]
|
2018-11-14 09:18:03 +00:00
|
|
|
address = ":8000"
|
2016-02-01 10:07:05 +00:00
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[log]
|
2015-09-27 13:59:51 +00:00
|
|
|
logLevel = "DEBUG"
|
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[providers]
|
|
|
|
[providers.file]
|
2015-10-12 06:44:56 +00:00
|
|
|
|
2018-11-14 09:18:03 +00:00
|
|
|
[routers]
|
|
|
|
[routers.router1]
|
2016-03-27 00:05:17 +00:00
|
|
|
rule = "Host:test.localhost"
|
2018-11-14 09:18:03 +00:00
|
|
|
service = "service2"
|
|
|
|
|
|
|
|
[routers.router2]
|
2016-03-27 00:05:17 +00:00
|
|
|
rule = "Path:/test"
|
2018-11-14 09:18:03 +00:00
|
|
|
middlewares = ["circuitbreaker"]
|
|
|
|
service = "service1"
|
|
|
|
|
|
|
|
[middlewares]
|
|
|
|
[middlewares.circuitbreaker.circuitbreaker]
|
|
|
|
expression = "NetworkErrorRatio() > 0.5"
|
|
|
|
|
|
|
|
[services]
|
|
|
|
[services.service1.loadbalancer]
|
|
|
|
[[services.service1.loadbalancer.servers]]
|
|
|
|
url = "http://172.17.0.2:80"
|
|
|
|
weight = 10
|
|
|
|
[[services.service1.loadbalancer.servers]]
|
|
|
|
url = "http://172.17.0.3:80"
|
|
|
|
weight = 1
|
|
|
|
|
|
|
|
[services.service2]
|
|
|
|
[services.service2.loadbalancer]
|
|
|
|
method = "drr"
|
|
|
|
[[services.service2.loadbalancer.servers]]
|
|
|
|
url = "http://172.17.0.4:80"
|
|
|
|
weight = 1
|
|
|
|
[[services.service2.loadbalancer.servers]]
|
|
|
|
url = "http://172.17.0.5:80"
|
|
|
|
weight = 2
|