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
# Vein Configuration Example
# Copy to vein.toml and customize as needed
[]
= "0.0.0.0"
= 8346
= 4 # Number of worker threads (default: CPU count)
[]
= "./gems" # Local filesystem storage for cached gems
[]
# For SQLite, point to a file with a URL (preferred) or uncomment `path`.
= "sqlite://./vein.db"
# path = "./vein.db"
# For Postgres, switch to e.g.:
# url = "postgres://user:pass@db.internal/vein"
# max_connections = 32
# DATABASE RELIABILITY CONFIGURATION
[]
= true # Enable automatic retries (default: true)
= 5 # Maximum retry attempts including initial request (default: 5)
= 500 # Initial backoff delay in milliseconds (default: 500)
= 30 # Maximum backoff delay in seconds (default: 30)
= "exponential" # Strategy: "exponential", "fibonacci", or "constant" (default: "exponential")
# backoff_strategy = "fibonacci" # Fibonacci: 500ms, 500ms, 1000ms, 1500ms, 2500ms...
# backoff_strategy = "constant" # Constant: always uses initial_backoff_ms
[]
= "info" # debug, info, warn, error
= false # Set to true for JSON-formatted logs
# HOT CACHE CONFIGURATION
[]
# Cron schedule for refreshing hot cache from SQLite index
# Format: "sec min hour day month weekday year"
# Examples:
# "0 0 * * * *" = Every hour at :00
# "0 */30 * * * *" = Every 30 minutes
# "0 0 0 * * *" = Once per day at midnight
# Set to empty string ("") to disable automatic refresh
= "0 0 * * * *"
# HOTCACHE RELIABILITY CONFIGURATION
[]
= true # Enable automatic retries (default: true)
= 3 # Maximum retry attempts including initial request (default: 3)
= 1000 # Initial backoff delay in milliseconds (default: 1000)
= 2 # Maximum backoff delay in seconds (default: 2)
= "constant" # Strategy: "exponential", "fibonacci", or "constant" (default: "constant")
# backoff_strategy = "exponential" # Exponential: 1000ms, 2000ms, 4000ms...
# backoff_strategy = "fibonacci" # Fibonacci: 1000ms, 1000ms, 2000ms...
# UPSTREAM CONFIGURATION (Optional)
# By default, Vein runs in cache-only mode.
# Uncomment this section to enable proxying to an upstream server:
# [upstream]
# url = "https://rubygems.org" # primary upstream
# fallback_urls = ["https://gems.coop"] # optional fallback list, tried in order
# timeout_secs = 30
# connection_pool_size = 128
#
# [upstream.reliability.retry]
# enabled = true
# max_attempts = 3
# initial_backoff_ms = 100
# max_backoff_secs = 2
# backoff_strategy = "exponential"