-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
82 lines (71 loc) · 1.51 KB
/
Copy pathconfig.yaml
File metadata and controls
82 lines (71 loc) · 1.51 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
80
81
82
# Gateway Configuration
server:
host: "0.0.0.0"
port: 3000
shutdown_timeout: 30 # seconds
# HTTP settings
http:
version: "http2" # Options: "http1", "http2", "auto"
# Connection pool settings
pool:
max_idle_per_host: 10
idle_timeout: 90
connection_timeout: 10
# Request settings
request:
timeout: 30
max_retries: 3
retry_delay: 1 # seconds
# Backend service discovery
backends:
# Discovery method: "k8s-headless", "k8s-service", "k8s-statefulset", "k8s-deployment", "static"
discovery_type: "static"
# Static IP list (fallback)
static_ips:
- "localhost:3001"
# Health check settings
health_check:
enabled: true
interval: 10 # seconds
timeout: 5
unhealthy_threshold: 3
healthy_threshold: 2
path: "/health"
# Load balancing
load_balancer:
algorithm: "round-robin" # Options: "round-robin", "least-conn", "random", "ip-hash"
# Middleware settings
middleware:
# Rate limiting
rate_limit:
enabled: true
max_requests: 1000
window_secs: 60
burst_size: 50
# Authentication
auth:
enabled: false
jwt_secret_env: "JWT_SECRET"
required_for_paths:
- "/api/admin/*"
- "/api/user/*"
# CORS
cors:
enabled: true
allow_origins:
- "*"
allow_methods:
- "GET"
- "POST"
- "PUT"
- "DELETE"
- "PATCH"
allow_headers:
- "Content-Type"
- "Authorization"
# Logging
logging:
level: "info"
format: "json"
access_log: true
error_log: true