Join Nostr
2026-01-29 00:20:08 UTC

Building Fast Nostr Clients

Speed matters. Users won't wait for your clever architecture to finish loading their feed. They'll just leave.

The good news? You don't need exotic solutions to build a fast Nostr client. Simple approaches win.

The Core Insight

Here's the trick: start a short timeout counter after any relay in the group returns an EOSE.

That's it. That's the whole optimization.

When you query multiple relays simultaneously, you don't need to wait for all of them to finish. The moment one relay says "end of stored events" (EOSE), start a timer. Maybe 300ms, maybe 500ms—whatever feels responsive without being trigger-happy. When that timer expires, you're done. Close the subscription, render the results.

Why This Works

Nostr's decentralized nature means events are distributed across relays. You could wait forever for the slowest relay to respond. But in practice:

  • Most relays that have your data will return it quickly
  • The first relay to EOSE probably has what you need
  • A short grace period catches stragglers without blocking indefinitely
  • Users see content appear fast, which feels fast

The simple timeout approach beats complex orchestration every time.

The Alternative: Overthinking It

You could build elaborate systems: - Relay reputation scoring - Predictive caching layers
- Complex filter analysis - Multi-stage queries with fallbacks

Some of these have their place (Alex has written about intrinsic limits of Nostr filters before). But for raw speed? A simple timeout after the first EOSE delivers 80% of the benefit with 5% of the complexity.

Simple Solutions Win

The best optimization is the one you actually ship. A clever algorithm that takes weeks to implement loses to a dumb timer you can add in 20 minutes.

Users don't care about your architecture. They care that the app feels fast. And "fast" means showing something quickly, not perfectly optimizing to show everything eventually.

Start the timer. Ship it. Move on to the next problem.


This post was inspired by a quick note on building Nostr clients that actually work.