forked from MikeTeddyOmondi/locci-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
79 lines (68 loc) · 1.78 KB
/
config.yaml
File metadata and controls
79 lines (68 loc) · 1.78 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
mode: api_gateway # load_balancer | api_gateway
server:
bind_address: "0.0.0.0:8484"
workers: 4
upstream_connect_timeout_secs: 10 # seconds to wait for TCP connect to upstream
upstream_read_timeout_secs: 30 # global read timeout (overridden per route by timeout_secs)
logging:
level: debug # trace | debug | info | warn | error (overridden by RUST_LOG env var)
# Upstream groups — referenced by name in both load_balancer and api_gateway sections.
upstreams:
users_server:
servers:
- "127.0.0.1:3001"
strategy: round_robin
tls: false
health_check:
interval_secs: 10
timeout_secs: 2
path: /users # HTTP GET — 2xx marks server healthy
products_server:
servers:
- "127.0.0.1:3002"
strategy: round_robin
tls: false
health_check:
interval_secs: 10
timeout_secs: 2
path: /products
web_server:
servers:
- "127.0.0.1:3003"
strategy: round_robin
tls: false
health_check:
interval_secs: 10
timeout_secs: 2
path: /pages
# Used when mode: load_balancer
# load_balancer:
# upstream: web_server
# Used when mode: api_gateway
api_gateway:
routes:
users_api:
path_pattern: "^/users"
methods: [GET, POST, PUT, DELETE]
upstream: users_server
strip_prefix: false
timeout_secs: 30
middlewares: []
products_api:
path_pattern: "^/products"
methods: [GET, POST, PUT, DELETE]
upstream: products_server
strip_prefix: false
timeout_secs: 30
middlewares: []
web_app:
path_pattern: "^/"
methods: [GET, POST]
upstream: web_server
strip_prefix: false
middlewares: []
middlewares: {}
control_api:
enabled: true
bind_address: "0.0.0.0:8485"
api_key: "admin-key-12345"