Skip to content

Conversation

@sigurpol
Copy link
Contributor

  • Accept comma-separated URIs for multiple endpoints (--uri "ws://a,ws://b")
  • Add runtime failover when subscription stalls or terminates unexpectedly, swapping backend across all tasks

Related issue: #1141

@sigurpol sigurpol changed the title Add RPC endpoint pool with failover support [DRAFT] Add RPC endpoint pool with failover support Jan 7, 2026
- Accept comma-separated URIs for multiple endpoints (--uri "ws://a,ws://b")
- Add runtime failover when subscription stalls or terminates
  unexpectedly, swapping backend across all tasks
@sigurpol sigurpol changed the title [DRAFT] Add RPC endpoint pool with failover support Add RPC endpoint pool with failover support Jan 21, 2026
/// independently, we can leverage RwLock semantics to swap all tasks to use the new
/// connection without explicit coordination. One writer updates the client and after that, all
/// subsequent .read() returns the new client.
chain_api: Arc<RwLock<ChainClient>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welcome to the beautiful world of shared mut pointers in Rust :D

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only had a skim, looks good and it has been running locally well for @sigurpol for a while.

@sigurpol sigurpol merged commit 99cc4cb into main Jan 23, 2026
10 checks passed
@sigurpol sigurpol deleted the rpc-pools branch January 23, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants