[Feature] Add weighted load balancing support for RPC providers
@DaMandal0rian đang làm issue này rồi.
Từ ngày 14/8/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
Currently, Graph Node uses a sequential failover approach for RPC providers. It attempts to use the first configured provider and only moves to the next provider if there are issues or if a required feature is not available. This means traffic is not distributed across providers - instead, the first healthy provider handles all requests until it fails.
This limitation prevents operators from:
- Distributing load across multiple healthy RPC endpoints
- Utilizing all available RPC capacity efficiently
- Preventing single provider overload when multiple endpoints are available
- Optimizing costs by balancing requests across providers with different pricing
- Achieving true high availability through active load distribution
Proposed Solution
Implement weighted random load balancing for RPC provider selection, allowing operators to configure traffic distribution percentages for each endpoint.
Example Use Cases
- Performance-based routing: Direct 80% of traffic to a high-performance dedicated node and 20% to a backup
- Cost optimization: Route 90% to cheaper endpoints and 10% to premium endpoints for critical requests
- Gradual rollout: Start a new provider at 5% traffic and increase as confidence grows
- Capacity management: Distribute load according to each endpoint's actual capacity
Implementation
I've created PR #[YOUR_PR_NUMBER] that adds this functionality with:
- Configurable decimal weights (0.0-1.0) per RPC provider
- New
--weighted-rpc-steeringCLI flag and config option - Backward compatibility (defaults to equal weights when not specified)
- Weighted random selection algorithm for provider choice
Configuration Example
[chains.mainnet]
weighted_rpc_steering = true
provider = [
{
label = "primary-node",
details = { type = "web3", url = "https://fast.example.com", weight = 0.7 }
},
{
label = "secondary-node",
details = { type = "web3", url = "https://medium.example.com", weight = 0.2 }
},
{
label = "backup-node",
details = { type = "web3", url = "https://backup.example.com", weight = 0.1 }
}
]
Related Work
- PR - Implementation of weighted load balancing
- This addresses a common request for managing multiple RPC endpoints with varying characteristics
Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
No response
Some information to help us out
- Tick this box if you plan on implementing this feature yourself.
- I have searched the issue tracker to make sure this issue is not a duplicate.
- Ngôn ngữ chính
- Rust
- Star
- 3.2k
- Fork
- 1.1k
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
graphprotocol/graph-node#6719 ·
-
RUSTSEC-2026-0194: Quadratic run time when checking a start tag for duplicate attribute names Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
graphprotocol/graph-node#6673 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
graphprotocol/graph-node#6650 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
graphprotocol/graph-node#6722 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
graphprotocol/graph-node#6721 ·
Tất cả issue của graphprotocol/graph-node
Issue tương tự
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
paritytech/zombienet-sdk#591 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
farion1231/cc-switch#7638 · 1 bình luận ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100