2016-02-01 10:07:05 +00:00
|
|
|
defaultEntryPoints = ["http"]
|
|
|
|
|
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.http]
|
|
|
|
address = ":8000"
|
|
|
|
|
2015-09-27 13:59:51 +00:00
|
|
|
logLevel = "DEBUG"
|
|
|
|
|
|
|
|
[file]
|
2015-10-12 06:44:56 +00:00
|
|
|
|
|
|
|
# rules
|
|
|
|
[backends]
|
|
|
|
[backends.backend1]
|
|
|
|
[backends.backend1.circuitbreaker]
|
|
|
|
expression = "NetworkErrorRatio() > 0.5"
|
|
|
|
[backends.backend1.servers.server1]
|
|
|
|
url = "http://172.17.0.2:80"
|
|
|
|
weight = 10
|
|
|
|
[backends.backend1.servers.server2]
|
|
|
|
url = "http://172.17.0.3:80"
|
|
|
|
weight = 1
|
|
|
|
[backends.backend2]
|
|
|
|
[backends.backend2.LoadBalancer]
|
|
|
|
method = "drr"
|
|
|
|
[backends.backend2.servers.server1]
|
|
|
|
url = "http://172.17.0.4:80"
|
|
|
|
weight = 1
|
|
|
|
[backends.backend2.servers.server2]
|
|
|
|
url = "http://172.17.0.5:80"
|
|
|
|
weight = 2
|
|
|
|
|
|
|
|
[frontends]
|
|
|
|
[frontends.frontend1]
|
|
|
|
backend = "backend2"
|
|
|
|
[frontends.frontend1.routes.test_1]
|
2016-03-27 00:05:17 +00:00
|
|
|
rule = "Host:test.localhost"
|
2015-10-12 06:44:56 +00:00
|
|
|
[frontends.frontend2]
|
|
|
|
backend = "backend1"
|
|
|
|
[frontends.frontend2.routes.test_2]
|
2016-03-27 00:05:17 +00:00
|
|
|
rule = "Path:/test"
|