35 lines
601 B
YAML
35 lines
601 B
YAML
backends:
|
|
- id: "srv-1"
|
|
ip: "127.0.0.1"
|
|
port: 8081
|
|
|
|
- id: "srv-2"
|
|
ip: "127.0.0.1"
|
|
port: 8082
|
|
|
|
clusters:
|
|
main-api:
|
|
- "srv-1"
|
|
- "srv-2"
|
|
priority-api:
|
|
- "srv-1"
|
|
|
|
rules:
|
|
- clients:
|
|
- "0.0.0.0/0:8080"
|
|
targets:
|
|
- "main-api"
|
|
strategy:
|
|
type: "RoundRobin"
|
|
|
|
- clients:
|
|
- "0.0.0.0/0:6767"
|
|
- "0.0.0.0/0:6969"
|
|
targets: # no issues with duplicate servers or clusters
|
|
- "priority-api"
|
|
- "priority-api"
|
|
- "priority-api"
|
|
strategy:
|
|
type: "Adaptive"
|
|
coefficients: [ 1.5, 1.0, 0.5, 0.1 ]
|
|
alpha: 0.75 |