Replies (8)

Websocket request limit in node defaults to 1GB, but most server implementations limit to something like 1-16MB. All of which would still work for very large filters. I'm just wondering if anyone has direct experiences with relays blocking for a REQ that was too large.
There are many limits. Byte size limits of 65000 bytes, filter limits of about 12 per sub, kind list limits of about 10 kinds, each connection can open 20 subs. Usually relays crop the return in 500 events regardless of your limit parameter. Rate limits are around 100ms for new events and 200ms for filters.
> filter limits of about 12 per sub 12 what per sub?? 👀 I'm filtering for kind 0 + relay list (10002) + a couple more kinds (e.g. 10050 and 10051). How many pubkeys could I add to the filter before it becomes a problem? e.g. Can I create a sub for those kinds for 10 pubkeys, 100 pubkeys, 1000 pubkeys?
I think the byte size limit was mostly removed? The rest of these are quite limited, more than I’ve seen in testing but I feel like you have a lot of data…
Nostr.land will limit it to a thousand or so, and a total of ~10K combinations per filter. Rate limits are dynamic based on the complexity of your queries and your AUTH status. I would encourage you to split queries (at least for NFDB relays) in cases that aren't feeds, for example 1 per profile request. Internally it executes similarly but one means you won't lose an entire request due to rate-limits if they happen + the query execution can be parallelized more.