Back to Blog
Vector Relays: Magnitude

Magnitude Relay: The Fastest Nostr Relay

Vector now runs on its own Nostr relay. Real Vector traffic is answered 38× faster, Community messages land 72× sooner, and the same data takes less than half the disk.

300×
Headroom
72×
Faster Delivery
38×
Faster Requests
59%
Less Disk

Relays are the servers that carry Vector's encrypted messages between devices. They can't read your DMs or Communities (everything is gift-wrapped), but they decide how fast those load, sync and arrive.

Vector's relays ran strfry, the workhorse of Nostr. It served us well, but it's built for every kind of Nostr traffic, and Vector's is specific: gift-wrapped DMs, Concord Communities, negentropy sync and live typing indicators. So we built a relay for exactly that: Magnitude Relay, sibling to Magnitude, our media server. It took over both of Vector's relays on 21–22 October. Nobody had to update a thing.

DMs and Communities Load up to 10× Faster

Same machine, same two CPU cores, the same million Vector-shaped events, every answer checked. Here's how long each relay takes to answer what Vector asks.

Time to answer · lower is better
What Vector asks, timed
strfry (before)Magnitude Relay (now)
Open a DM inbox 500 messages8.8× faster
4.39 ms
0.50 ms
Catch up on two days of DMs10.4× faster
1.77 ms
0.17 ms
Open a Community channel 500 messages10.4× faster
4.26 ms
0.41 ms
Scroll back through a busy Community 5 pages7.5× faster
13.11 ms
1.75 ms
Real Vector traffic 951 requests, 4.9M real events38× faster
17.4 ms
0.45 ms
Benchmarks: median time to a complete answer, 2 cores each, 1M Vector-shaped events, best of 3, 21 Oct 2026. Real traffic: mean time to a complete answer for 951 requests drawn from jskitty.com's real data, both relays answering side by side.

The last row counts most. We replayed 951 requests built from jskitty.com's 4.9 million real events against both relays side by side. The answers matched, except for messages their senders or recipients had asked to delete, which strfry was still serving. Magnitude Relay averaged 0.45 ms; strfry, 17.4 ms.

How

Messages live in one append-only log that's regrouped in the background, so each DM inbox and each Community sits together on disk: a 500-message inbox is one short read, not 500 scattered ones. Indexes are compressed, checksummed blocks behind a filter that rules out misses without reading a block, and the hot paths parse JSON and hex with SIMD.

Sync up to 6.7× Faster

After time offline, Vector catches up with negentropy (NIP-77): the app and relay compare compact fingerprints, and only what's missing is sent. Magnitude Relay builds those fingerprints from its index alone, without opening a single message.

NIP-77 sync, app already has 90% · lower is better
Catching up after time offline
strfryMagnitude Relay
A busy DM inbox6.7× faster
29.9 ms
4.46 ms
A quiet DM inbox4.1× faster
0.57 ms
0.14 ms
Median time per sync session, 2 cores each, relay flat out, best of 3. Busy inboxes: 512 sessions/s vs 112. Quiet inboxes: 48,085/s vs 12,365.

The relays sync each other the same way, so a message sent to jskitty.com in Helsinki reaches Vector Asia in Kuala Lumpur in under a second.

Community Messages Arrive 72× Sooner

When someone posts in a Community, the relay stores the message and pushes it to every member online. That gap is the relay's whole share of how instant chat feels.

Live delivery · median
One message, a 1,000-member Community

Both lanes in true proportion, slowed down 500×.

Magnitude Relay0.58 ms
strfry41.9 ms
sender → 1,000 members · 500× slow motion
72×

sooner for a typical message: 0.58 ms vs 41.9 ms.

18×

sooner for the slowest 1 in 100: 6.1 ms vs 111 ms.

1,000 members subscribed, 4 senders, 2,000 messages/s for 20 s, 2 cores each, every delivery checked, none missed by either. 21 Oct 2026.

strfry picks up new messages for delivery in small batches, which adds tens of milliseconds to each one. Magnitude Relay delivers the moment a message is safely on disk.

Ready to Scale

Today each Vector relay averages about 34 requests and 3 new messages a second. On just two CPU cores, Magnitude Relay handles over 11,000 DM inbox loads and 29,000 new messages a second: more than 300× today's reads and 9,000× today's writes.

Work per second · higher is better
What one relay can carry on two cores
strfryMagnitude Relay
New messages stored5.7×
5,228/s
29,618/s
DM inboxes opened7.0×
1,603/s
11,267/s
Community pages loaded8.0×
1,653/s
13,213/s
Busy DM inboxes synced4.6×
112/s
512/s
Duplicate messages skipped24×
10,911/s
260,132/s
Same machine, 2 cores each, 1M Vector-shaped events, best of 3, 21 Oct 2026. Both relays confirm a message only once it's on disk. Today's load: jskitty.com's average over 22–23 Oct.

Every message reaches each relay more than once (Vector sends to several, and the relays sync each other), so skipping duplicates 24× faster frees the relay for real work.

Proven in Production

Vector's two relays, in the 30 hours after their latest update on 22–23 October:

Production · jskitty.com + Vector Asia · 30 hours
A day and a half of real traffic
6,765,112

requests answered

0.23 ms

average time to a complete answer

58,402,815

events delivered to apps

856,293

connections served

From each relay's public /stats, 23 Oct 2026. Answer time is measured inside the relay; the network adds its own.
The relay's live dashboard: traffic charts, answer times and other live signals
Every Vector relay has a public dashboard. jskitty.com's is at jskitty.com/nostr/dashboard.

A switch with zero downtime

No downtime, a way back at every step, no message lost.

Updates roll out one relay at a time, each back online in about half a second. A release that isn't healthy within 30 seconds is rolled back automatically.

Built for Self-Hosters

Our rule: maximum speed on minimum hardware. Every change that cost resources had to prove it made the relay faster.

Disk · the same 4.9 million events
Less than half the disk
strfry27 GB
Magnitude Relay11 GB
59%smaller. Each square is 1 GB, measured on jskitty.com's real data, 22 Oct 2026.

Most relays, strfry included, slow down once the database outgrows memory; this summer, that happened to jskitty.com. So we tested Magnitude Relay with 13 GB of real data and only 1 GB of memory:

Memory · 13 GB of real data, 1 GB allowed
Fast without the database in RAM
1 GB memory allowed13 GB database
0.17–0.30 ms

to open the 50 busiest DM inboxes in the dataset

9,100+/s

busy inboxes served, 50× more than with the data in arrival order

Process held to 1 GiB by the kernel (cgroup), its page cache dropped first, 4.81M real events, 21 Oct 2026.

In production each relay uses 190–370 MB of its own memory while serving over a thousand connections. After loading a million events, its total footprint was 1.2 GB against strfry's 3.1 GB, 61% less (most of both is cached database the system can reclaim).

Restart · 4.9 million events
Updates cost about half a second
stop 0.3 s
ready 0.25 s
0 s0.5 s1 s
jskitty.com, measured at the switch and on later updates: 0.54–0.88 s from restart to answering again. Only the newest part of the log is replayed, so start-up stays short as data grows.

Magnitude Relay is open source under the AGPL-3.0: run your own from github.com/VectorPrivacy/magnitude-relay.

Private by Design

A relay can't read gift-wrapped messages, but it decides what's kept, and whether delete means delete.

What Happens to Your Data

On Vector's relaysstrfry (before)Magnitude Relay
"Request to Vanish" honoured NIP-62: erase everything I sentNoYes
Deleted messages wiped from disk not just hiddenNot guaranteedOverwritten
Typing indicators & push requests ephemeral eventsStored 5 minNever stored
What it acceptsAnythingVector's kinds only
Publishes its Tor & I2P addressesNoBuilt in

Moving jskitty.com over, we found 38 vanish requests and 24 deletions strfry had never applied, covering over a thousand events. Magnitude Relay applied them all on import, and now overwrites deleted data on disk. Both relays also serve Tor and I2P, as gateways to the relay only.

Standing on the Shoulders of Giants

Like Open-Source DOOM, Magnitude Relay was built as a collaboration between a human developer and an AI (Claude, by Anthropic).

Vector needed a relay as fast as its client.
So we built one.

Join the Vector Community

Get connected with the Vector Community, where you can meet other like-minded privacy advocates and make friends from around the world. Get the latest updates in development, insights, and some teasers only dropped in the Vector Community!

Join Community