Nostrfi
/Docs
Browse documentation
Owner: NostrfiLast reviewed: 2026-11-11

Capacity and sizing

These numbers come from a shared development sandbox, from single runs. They are a baseline, not a guarantee. Measure on your own hardware before relying on them.

Sizing

ProcessIdle memoryUnder load
Relay (Go)about 55 MBabout 270 MB peak, settling near 257 MB
Dashboard (Nuxt)about 97 MBabout 250 MB
  • Size for the loaded figure. Both processes keep their high-water mark: DuckDB keeps its buffer pool, and Node's heap doesn't shrink promptly.
  • CPU is the relay's constraint. The full load test kept the relay at about one busy core, mostly NIP-50 search. A dashboard page costs about 7 ms of CPU.

As a floor, the relay, dashboard, and Caddy fit in 1 GB of RAM and 1 vCPU for a relay under load with a few operators. Plan 2 vCPUs if the dashboard will also see sustained traffic, and 2 GB for headroom. The shipped Compose files set no resource limits; that is a per-deployment choice.

Measured throughput

Measured with the relay's default configuration:

ScenarioResult
Connection ramp, 50 connectionsp95 4 ms to the authentication challenge
Live delivery, 10 subscribers × 100 eventsp50 0.3 ms, p95 208 ms
Negentropy full resync, 200 eventsone round trip, about 4 ms
Unique publishes, 50 connections × 5 events/s250 events/s

The per-connection publish rate limit (5 events/s by default) bounded publish throughput, not storage. Raising it is a configuration change.

Search cost

Search scans the stored content, so its cost grows roughly linearly with the number of events. With 10 concurrent searchers alongside publishing:

Stored eventsSearch p50 / p95Publish throughput during search
about 7,70084–150 ms / 182–267 ms247 events/s
about 28,000226–350 ms / 421–559 ms166 events/s

Concurrent search competes with writes: at about 28,000 events it cut publish throughput by a third. The default 5-second search budget is estimated to start binding at a few hundred thousand events, which hasn't been measured directly.

Reproducing it

The relay repository includes the load-test tool used for these numbers:

cd backend
go build -o loadtest ./cmd/loadtest
./loadtest -url ws://localhost:8080 -json results.json

Run ./loadtest -h for the scenario flags.

Not yet measured

  • Repeated runs for variance, and production-class hardware
  • Long soak tests (memory growth, leaks, degradation over hours)
  • Larger events and tag-heavy payloads
  • Multi-round Negentropy and search beyond about 28,000 events
  • More than one instance