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

REQ limit is too low #93

Closed
alexgleason opened this issue Dec 19, 2023 · 1 comment
Closed

REQ limit is too low #93

alexgleason opened this issue Dec 19, 2023 · 1 comment

Comments

@alexgleason
Copy link
Contributor

strfry has maxSubsPerConnection = 20 by default. Which to be fair matches what is currently standard behavior in the Nostr ecosystem. It works fine in the standard client/relay setup where every user has one IP address. But it's a problem when you're a server fetching a lot of things from one IP address.

What this limit forces me to do is batch my requests together, into one giant REQ for all the IDs I want accumulated over the last X milliseconds, and send that at an interval so I never hit the REQ limit. It doesn't make sense why relays would prefer massive REQs for a lot of IDs over atomic requests for individual IDs.

It's a general Nostr concern, but I'm raising it here since strfry is one of the most popular relays and the one that I use.

@alexgleason
Copy link
Contributor Author

I changed my mind about this. Thanks for talking me through it @hoytech

tl;dr 20 should actually be high enough if all you're doing is fetching an ID and closing it. If you need to make lots of long-running queries to relays you may need to rethink the application.

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

No branches or pull requests

1 participant