[Feature] Add weighted load balancing support for RPC providers
@DaMandal0rian y travaille déjà.
Depuis le 14/8/2025.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 3.2k
- Forks
- 1.1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole responseOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
graphprotocol/graph-node#6719 ·
-
RUSTSEC-2026-0194: Quadratic run time when checking a start tag for duplicate attribute namesPeut-être pris @szupzj18 l’a pris il y a 61 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
graphprotocol/graph-node#6673 ·
-
RUSTSEC-2026-0185: Remote memory exhaustion in quinn-proto from unbounded out-of-order stream reassemblyPeut-être pris @abisheik687 l’a pris il y a 103 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
graphprotocol/graph-node#6650 · 1 commentaire ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
graphprotocol/graph-node#6738 ·
-
[Bug] Subgraph startup rehashes the WASM module once per data source (minutes for subgraphs with millions of dynamic data sources)Peut-être pris @madumas l’a pris il y a 3 jours. Ouverte
Difficulté 3/5 Une demi-journée Accessibilité débutants 22/100
graphprotocol/graph-node#6731 · 1 commentaire ·
Toutes les issues de graphprotocol/graph-node
Issues similaires
-
Add MimirOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
slavakurilyak/awesome-ai-agents#759 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
compiler-explorer/compiler-explorer#9272 ·
Les mainteneurs répondent en général sous 1 jour
-
Trash, bin or rubbish?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 63/100
pop-os/cosmic-files#2117 ·
Les mainteneurs répondent en général sous 2 jours
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
dependabot/dependabot-core#16547 ·
Les mainteneurs répondent en général sous 1 jour
-
bug status:ready-for-test
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
UniClipboard/UniClipboard#1985 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour