forked from MikeTeddyOmondi/locci-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-lb.yaml
More file actions
33 lines (28 loc) · 900 Bytes
/
config-lb.yaml
File metadata and controls
33 lines (28 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
mode: load_balancer
server:
bind_address: "0.0.0.0:8484"
workers: 4
upstream_connect_timeout_secs: 10
upstream_read_timeout_secs: 30
logging:
level: info
# Three instances of the same service — identical data, each tagged with its own
# instance name so round-robin is clearly visible in responses.
upstreams:
app_servers:
servers:
- "host.docker.internal:3001" # json-server --port 3001 db-lb-1.json
- "host.docker.internal:3002" # json-server --port 3002 db-lb-2.json
- "host.docker.internal:3003" # json-server --port 3003 db-lb-3.json
strategy: round_robin
tls: false
health_check:
interval_secs: 10
timeout_secs: 2
path: /instance # each db-lb-*.json serves /instance with its own id
load_balancer:
upstream: app_servers
control_api:
enabled: true
bind_address: "0.0.0.0:8485"
api_key: "admin-key-12345"