-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Implement dynamic weighted RPC load balancing for enhanced resilience #6128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DaMandal0rian
wants to merge
2
commits into
feature/add-weighted-random-steering-load-balancing
from
feature/dynamic-rpc-weighting
Open
feat: Implement dynamic weighted RPC load balancing for enhanced resilience #6128
DaMandal0rian
wants to merge
2
commits into
feature/add-weighted-random-steering-load-balancing
from
feature/dynamic-rpc-weighting
+137
−10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...lience This commit introduces dynamic weight adjustment for RPC providers, improving failover and resilience by adapting to real-time provider health. Key changes include: - Introduced a `Health` module (`chain/ethereum/src/health.rs`) to monitor RPC provider latency, error rates, and consecutive failures. - Integrated health metrics into the RPC provider selection logic in `chain/ethereum/src/network.rs`. - Dynamically adjusts provider weights based on their health scores, ensuring traffic is steered away from underperforming endpoints. - Updated `node/src/network_setup.rs` to initialize and manage health checkers for Ethereum RPC adapters. - Added `tokio` dependency to `chain/ethereum/Cargo.toml` and `node/Cargo.toml` for asynchronous health checks. - Refactored test cases in `chain/ethereum/src/network.rs` to accommodate dynamic weighting. This enhancement builds upon the existing static weighted RPC steering, allowing for more adaptive and robust RPC management. Fixes #6126
@DaMandal0rian
DaMandal0rian
force-pushed
the
feature/dynamic-rpc-weighting
branch
from
August 26, 2025 19:28
f7bdd4d
to
a66d004
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces dynamic weight adjustment for RPC providers, improving failover and resilience by adapting to real-time provider health. The system now dynamically adjusts provider selection weights based on health metrics including latency, error rates, and consecutive failures.
This enhancement builds upon the static weighted RPC steering implemented in #6126, making the RPC management more adaptive and robust.
Changes
Core Implementation
chain/ethereum/src/health.rs
): New module to track RPC provider health metricsIntegration Points
Dynamic Weight Adjustment (
chain/ethereum/src/network.rs
): Integrated health metrics into provider selection logicHealth Checker Initialization (
node/src/network_setup.rs
): Setup and management of health checkers for Ethereum RPC adaptersDependencies
tokio
dependency tochain/ethereum
andnode
crates for asynchronous health checksTesting
chain/ethereum/src/network.rs
to accommodate dynamic weighting behaviorRelated Issues
Builds on #6126 - Weighted RPC load balancing
Test Plan
🤖 Generated with Claude Code