forked from praxis-proxy/praxis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhealth-checks.yaml
More file actions
72 lines (65 loc) · 1.68 KB
/
Copy pathhealth-checks.yaml
File metadata and controls
72 lines (65 loc) · 1.68 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
# Active Health Checks
#
# Per-cluster health checks probe endpoints on a timer and remove
# unhealthy backends from the load balancer rotation. Supports HTTP
# GET probes (check status code) and TCP connect probes.
#
# Usage:
# cargo run -p praxis-proxy -- -c examples/configs/traffic-management/health-checks.yaml
listeners:
- name: default
address: "127.0.0.1:8080"
filter_chains:
- main
admin:
address: "127.0.0.1:9090"
insecure_options:
allow_private_health_checks: true # dev only; allows loopback endpoints
clusters:
- name: backend
endpoints:
- "127.0.0.1:3001"
- "127.0.0.1:3002"
- "127.0.0.1:3003"
health_check:
type: http
path: "/healthz"
expected_status: 200
interval_ms: 5000
timeout_ms: 2000
healthy_threshold: 2
unhealthy_threshold: 3
passive_unhealthy_threshold: 5
passive_healthy_threshold: 3
- name: database
endpoints:
- "127.0.0.1:5432"
- "127.0.0.1:5433"
health_check:
type: tcp
interval_ms: 10000
timeout_ms: 3000
healthy_threshold: 1
unhealthy_threshold: 2
filter_chains:
- name: main
filters:
- filter: router
routes:
- path_prefix: "/api"
cluster: backend
- path_prefix: "/db"
cluster: database
- path_prefix: "/"
cluster: backend
- filter: load_balancer
clusters:
- name: backend
endpoints:
- "127.0.0.1:3001"
- "127.0.0.1:3002"
- "127.0.0.1:3003"
- name: database
endpoints:
- "127.0.0.1:5432"
- "127.0.0.1:5433"