-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_multi_protocol.json
More file actions
92 lines (92 loc) · 2.03 KB
/
config_multi_protocol.json
File metadata and controls
92 lines (92 loc) · 2.03 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
83
84
85
86
87
88
89
90
91
92
{
"version": 1,
"jwt": {
"secret": "your-super-secret-jwt-key-change-this-in-production",
"issuer": "rusta-gateway",
"audience": "api-clients",
"required_claims": ["sub", "exp"]
},
"rate_limit": {
"strategy": "sliding_window",
"requests_per_minute": 100,
"burst_size": 150
},
"routers": [
{
"protocol": "http",
"backends": [
{
"host": "http://backend-1",
"port": 8080,
"weight": 2
},
{
"host": "http://backend-2",
"port": 8080,
"weight": 1
}
],
"load_balancing_strategy": "weighted",
"external_path": "/api/users/{id}",
"internal_path": "/v1/user/{id}",
"methods": ["GET", "PUT", "DELETE"],
"auth_required": true,
"retry": {
"max_retries": 3,
"initial_backoff_ms": 100,
"max_backoff_ms": 5000,
"backoff_multiplier": 2.0,
"retry_on_status_codes": [502, 503, 504],
"retry_on_connection_error": true
}
},
{
"protocol": "websocket",
"backends": [
{
"host": "ws://websocket-backend",
"port": 8080,
"weight": 1
}
],
"external_path": "/ws/chat",
"internal_path": "/realtime/chat",
"methods": ["GET"],
"auth_required": false
},
{
"protocol": "ftp",
"backends": [
{
"host": "ftp://ftp.example.com",
"port": 21,
"weight": 1
}
],
"external_path": "/ftp",
"internal_path": "/",
"methods": ["GET", "POST"],
"auth_required": true
},
{
"protocol": "dns",
"backends": [
{
"host": "8.8.8.8",
"port": 53,
"weight": 1
},
{
"host": "1.1.1.1",
"port": 53,
"weight": 1
}
],
"load_balancing_strategy": "round_robin",
"external_path": "/dns",
"internal_path": "/",
"methods": ["POST"],
"auth_required": false
}
]
}