strfry: An Efficient Server for the Nostr Protocol
summary
strfry is a C++ Nostr relay now used by most high-traffic relays and built around LMDB, flatbuffers, zstd dictionaries and a single-writer, multi-threaded pipeline. It imports millions of events, stores JSON payloads memory-mapped for zero-copy sends, and uses negentropy, a range-xor set-reconciliation that syncs million-item DBs in about 2–3 round trips using ~900/600 bytes. Features include SO_REUSEPORT zero-downtime restarts, per-filter scheduling to mitigate expensive queries, pluginable spam policies, and geo-replication via streaming and sync.
AI-written summary · about
chapters (11)
- 0:00Introduction to Nostr
- 6:21Database choice for relays
- 13:16FlatBuffers and LMDB design
- 20:22StirFry architecture overview
- 27:00Reuse port and zero downtime
- 29:28Negentropy for syncing relays
- 39:21Write policies and spam filtering
- 43:58Compression with Zstandard
- 46:23Templar HTML templating
- 50:34Nostr's community-driven future
- 51:17Q&A and closing
related talks
17mScaling Decentralized Low Latency Infrastructure with Huddle01
32mCentrifugo
51mHigh Bandwidth Data & Low-latency Java
17mTowards High-Performance Transactional Stateful Serverless Workflows with...
24mHow We Built Protosockets to Go Beyond HTTP and gRPC
28mSlirp is Dead, Long Live Slirp! A New Approach to User-mode Networking
20mFLAIR: Accelerating Reads with Consistency Aware Network Routing
15mReverie: Low Pass Filter-Based Switch Buffer Sharing for Datacenters with RDMA and TCP...
