Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Conversation

@angel-ding-cb
Copy link
Contributor

This PR enhances the WebSocket proxy to support connecting to multiple upstream servers simultaneously. This is particularly useful for high-availability setups where multiple backend servers may be available but only one is actively producing data.

Changes

  • Modified Args to accept a vector of URIs via a comma-separated list
  • Enhanced WebsocketSubscriber to track and log connection status for each upstream
  • Added metrics to monitor multiple upstream connections
  • Updated main.rs to spawn a subscriber task for each upstream URI

Notes

  • Only the active upstream will send data, avoiding duplication issues

@danyalprout
Copy link
Collaborator

danyalprout commented Mar 17, 2025

@angel-ding-cb looks good overall

Only the active upstream will send data, avoiding duplication issues

Can you elaborate on how this will work with rollup-boost and op-rbuidler?

Also just an FYI looks like you may need to run cargo fmt --all for the CI to pass. Can we also add a test to validate multiple WebsocketSubscribers and a single listener

@danyalprout danyalprout merged commit 4976b4f into master Mar 19, 2025
3 checks passed
@danyalprout danyalprout deleted the clean-branch branch March 19, 2025 18:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants