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