REQ limit is too low
alexgleason opened this issue · 1 comments
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.
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.