forked from Axionvera/axionvera-network
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhorizon-config.example.json
More file actions
51 lines (47 loc) · 2 KB
/
Copy pathhorizon-config.example.json
File metadata and controls
51 lines (47 loc) · 2 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
# Horizon API Configuration Example
# This file shows how to configure multiple Horizon providers with fallback and load balancing
# You can set the HORIZON_CONFIG environment variable with the following JSON structure:
# export HORIZON_CONFIG='{"providers":[{"url":"https://horizon.stellar.org","name":"Stellar Public","priority":1},{"url":"https://horizon-blockdaemon.stellar.ovh","name":"Blockdaemon","priority":2},{"url":"https://stellar-horizon.infura.io","name":"Infura","priority":3}],"health_check_interval_seconds":60,"circuit_breaker_failure_threshold":3,"circuit_breaker_recovery_timeout_seconds":300}'
{
"providers": [
{
"url": "https://horizon.stellar.org",
"name": "Stellar Public",
"priority": 1
},
{
"url": "https://horizon-blockdaemon.stellar.ovh",
"name": "Blockdaemon",
"priority": 2
},
{
"url": "https://stellar-horizon.infura.io",
"name": "Infura",
"priority": 3
},
{
"url": "https://horizon.stellar.technology",
"name": "Stellar Technology",
"priority": 4
}
],
"health_check_interval_seconds": 60,
"circuit_breaker_failure_threshold": 3,
"circuit_breaker_recovery_timeout_seconds": 300
}
# Configuration Options:
# - providers: Array of Horizon endpoint providers
# - url: The Horizon API endpoint URL
# - name: Human-readable name for logging
# - priority: Lower number = higher priority (primary provider)
# - health_check_interval_seconds: How often to ping all providers (default: 60)
# - circuit_breaker_failure_threshold: Number of failures before opening circuit (default: 3)
# - circuit_breaker_recovery_timeout_seconds: How long to wait before trying recovery (default: 300)
# Environment Variable Setup:
# 1. Copy this configuration and set as environment variable:
# export HORIZON_CONFIG='$(cat horizon-config.json)'
#
# 2. Or add to your .env file:
# HORIZON_CONFIG='{"providers":[...],"health_check_interval_seconds":60,...}'
#
# 3. Restart the network node to apply changes