-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwrangler.toml
More file actions
77 lines (54 loc) · 1.86 KB
/
wrangler.toml
File metadata and controls
77 lines (54 loc) · 1.86 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
name = "passky-loadbalancer-eu"
main = "src/index.js"
compatibility_date = "2025-11-03"
[vars]
# Specify all origins that you want to monitor.
ORIGINS = [
"https://eu3.passky.org",
"https://eu4.passky.org"
]
# Used if you choose Weighted round robin algorithm
WEIGHTS = [
50,
50
]
# To monitor specific endpoint for health checks
ENDPOINT = "/?action=getInfo"
# Choose Load Balancing algorithm
# Static:
# - 0 (Round robin)
# - 1 (Weighted round robin)
BALANCING_ALGO = 0
# === HEALTH CHECK CONFIGURATION ===
# How long to cache health check results (in seconds)
# Lower = more frequent checks, higher = less load on origins
HEALTH_CACHE_TTL = 15
# Timeout for health check requests (in milliseconds)
HEALTH_CHECK_TIMEOUT = 2000
# === CACHING CONFIGURATION ===
# How long to cache user-origin assignments in browser cache (in seconds)
USER_CACHE_TTL = 30
# How long to cache KV lookups in Cloudflare cache (in seconds)
KV_CACHE_TTL = 300
# === SESSION PERSISTENCE CONFIGURATION ===
# Initial TTL for user-origin assignment in KV (in seconds)
# Used when first assigning a user to an origin or after failover
INITIAL_ASSIGNMENT_TTL = 3600
# Extended TTL for user-origin assignment in KV after successful requests (in seconds)
# Used to maintain sticky sessions for active users
EXTENDED_ASSIGNMENT_TTL = 3600
# === REQUEST CONFIGURATION ===
# Timeout for main user requests (in milliseconds)
REQUEST_TIMEOUT = 7000
# Maximum number of origins to try during failover
MAX_FAILOVER_ATTEMPTS = 3
# Timeout for failover requests (in milliseconds)
FAILOVER_REQUEST_TIMEOUT = 3000
# === ERROR HANDLING ===
# Retry-After header value for 503 responses (in seconds)
RETRY_AFTER_SECONDS = 10
# Whether to return error response (true) or redirect (false) when all origins fail
ERROR_RESPONSE_ON_FAILURE = true
[[kv_namespaces]]
binding = "KV"
id = "1c92215efde74e198906be9e3d2a3162"