Maybe we can start with Nostr Client App anti-patterns.

Nostr client app Anti-patterns

* Updating a subscription too often (triggers new SQL queries)

* Connecting to a relay multiple times (use a single websocket)

* How can we best manage this with multiple open web app tabs?

* Opening a websocket and not creating at least one subscription

* If you disconnect from a relay, don't instantly reconnect (add random wait)

* Gracefully disconnect (helps servers free descriptors faster for new connections)

* Overlapping subscription queries (you'll get dupe data - from each relay)

* Using Until and updating the subscription's until every x seconds/minutes (if you didn't use until and just used client logic to show events, you wouldn't trigger a server query and just stream the data instead)

* Using the same relay list for home feeds, global, general queries, DMs, notifications, etc

Reply to this note

Please Login to reply.

Discussion

Great list!

Suggestion:

- use randomized _increasing_ intervals after each failed connect

Question:

- "using Until and updating the subscription's until every x seconds/minutes" - you mean don't scan the relay using older and older 'until' filter, making many requests one after another?