← the Dry Stack

Relay

Pub/sub where the log is the broker. Publishing is an append, replay is a scan and delivery takes microseconds.

35× faster history replay than NATS JetStream: 50M against 1.3M msg/s. 4M msg/s durable pub/sub, persisted. JetStream manages 0.15M. 1–3 µs from publish to handler, median. NATS takes about 11. 3–7 µs request/reply round trip, median. NATS takes about 20.

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.

What it is
Messaging fused onto Facts. A durable subject is a stream in the column store, so publishing a message and persisting it are the same operation. No broker process, no second system for history. Subscribers ride live pushes, and anyone who falls behind or joins late reads the log directly.
The problem
Brokered messaging pays twice: every live message crosses to a server and back, and every replay is a stream of per-message round trips. In Relay, catching up is a columnar scan at tens of millions of messages a second.
Patterns
Request/reply and streaming responses are a 16-byte convention on top of pub/sub, an inbox and a correlation id, not a bolted-on RPC runtime. Across machines, nodes form a full mesh over Nio, and a consumer that misses messages heals itself from the origin's log, exactly once and in order.

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.

ScenarioRelayembeddedRelaymesh¹NATS
Live pub to sub, sustained~6M msg/s2.4M msg/s¹~1.3M msg/s core
Durable pub to sub, persisted~4M msg/sn/a~0.15M msg/s JetStream²
Publish to handler, p501–3 µsn/a~11 µs
Request/reply round trip, p503–7 µsn/a~20 µs
Replay persisted history~50M msg/sn/a~1.3M msg/s JetStream
Replay at 50M msg/s, about 35 times JetStream. History isn't a fetch, it's a scan. A consumer replaying two million persisted messages reads the column store directly, with no broker in the read path. That's what "the log is the broker" buys.

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.

Kill the leader mid-stream A real two-node cluster, one button. Kill the leader and watch the consumer's counter climb straight through the failover: zero gaps, zero duplicates, and the subscriber never reconnects. open the demo →

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.

Want Relay in your system?

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
Relay is part of the Dry Stack, built by Drylane.