Pub/sub where the log is the broker. Publishing is an append, replay is a scan and delivery takes microseconds.
A JetStream publish-ack is a stronger per-message promise than Relay's append with periodic flush, so part of the durable gap is semantics. The full footnotes sit under the table.
NATS is the closest rival in design: subjects, request/reply and durable streams through JetStream. Same box, 16-byte messages, settings that favour NATS (separate pub and sub connections, pipelined publishes, file-backed JetStream with a deep ack window), measured as sustained delivered messages with identical pacing on both sides.
| Scenario | Relayembedded | Relaymesh¹ | NATS |
|---|---|---|---|
| Live pub to sub, sustained | ~6M msg/s | 2.4M msg/s¹ | ~1.3M msg/s core |
| Durable pub to sub, persisted | ~4M msg/s | n/a | ~0.15M msg/s JetStream² |
| Publish to handler, p50 | 1–3 µs | n/a | ~11 µs |
| Request/reply round trip, p50 | 3–7 µs | n/a | ~20 µs |
| Replay persisted history | ~50M msg/s | n/a | ~1.3M msg/s JetStream |
The embedded column compares designs, not wire speed: Relay lives inside your process, and NATS always crosses to a server. That gap is the product. NATS is fast and battle-tested, and where it fits, it fits. Relay's bet is that most systems don't need a separate broker and pay dearly for having one.
Test bed: the drylane demo box, bare-metal Ubuntu, 32 threads,
.NET 10 Release x64, data on NVMe, nats-server v2.14 (-js, file storage), NATS.Net 2.x,
loopback. Ranges are 3 runs on a box that also serves the live demos, so throughput carries
some contention. ¹ Mesh is two RelayNodes over loopback Nio (a Windows dev-box
figure; box re-measure pending). ² A JetStream publish-ack is a stronger
per-message contract than Relay's append with periodic flush, so part of that gap is
semantics. Full harness and method in samples/Relay.CompetitiveBench.
home.chat.*) resolve at subscribe time, and a
subject created later splices in before its first message can be missed.Relay is embedded and .NET-first. It wins by deleting the broker, which also defines where it doesn't fit:
Zao packs the message, Relay routes and persists it, Facts is the log it lives in and Nio carries it between machines. The same bytes go from your struct to the wire to the column store, with no seams.
We're taking a few early users. If you're running a broker you'd rather not, tell us what you'd build. You get Relay and direct help; we get your feedback.
info@drylane.io