Skip to content
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

feat: limit subscription concurrency #288

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

heilhead
Copy link
Contributor

Description

This limits the relay subscription concurrency to prevent huge database request spikes on reconnections. Also makes use of the new 'blocking' subscriptions. See reown-com/reown-rust#56 and https://github.com/WalletConnect/rs-relay/pull/1387.

How Has This Been Tested?

Untested.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

Copy link
Contributor

@geekbrother geekbrother left a comment

Choose a reason for hiding this comment

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

lgtm

.collect::<Vec<_>>();

// Limit concurrency to avoid overwhelming the relay with requests.
const REQUEST_CONCURRENCY: usize = 48;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chris13524 Let's keep an eye on how long the subscription takes and adjust this if needed. It'll definitely take longer than it used to be, but not sure how long.

@chris13524 chris13524 merged commit 20300d2 into main Jan 17, 2024
13 checks passed
@chris13524 chris13524 deleted the feat/subscription-concurrency-limit branch January 17, 2024 14:18
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.

4 participants