Best Practices for Building Apps on JetStream
Resources
JetStream turns NATS from a messaging system into a streaming, key-value, and persistence engine — all in the same single binary, with the same subjects and security model. That’s powerful. But the features that unlock its real performance, and the limits you have to design around, are the ones most teams never find on their own.
In this advanced RethinkConn session, Synadia’s NATS experts take you from the lesser-known features hiding in the Orbit libraries, through advanced JetStream patterns, to a candid look at exactly where the system slows down — with live demos along the way.
What’s inside
Part guided tour, part live performance lab. You’ll see backward-in-time “temporal” queries pull values as they were yesterday, watch atomic and fast-ingress batches push hundreds of thousands of messages per second into a single stream, watch a key-value store hit a wall under random access — and learn the one-flag fix — and leave with a clear list of production traps to avoid before they bite you.
What you’ll learn
- The Orbit client extensions — request-many, reusable NATS contexts, and JetStream helpers most users have never touched
- Advanced JetStream reads — get-batch and get-last-message-for, including “temporal” queries that scan backward in time without spinning up a consumer
- Faster, safer publishing — atomic batches with compare-and-set for event sourcing, plus fast-ingress batching (NATS 2.14) for raw throughput
- Increment-in-place counters (NATS 2.12) — server-side, race-free increments without optimistic-locking retries
- Kafka-style patterns, the NATS way — partitioned consumer groups, advanced sourcing and mirroring, mirror-to-primary failover, and persistent deduplication
- Consumer priority groups — pinning, overflow, and prioritized fetch for active/passive and locality-aware workloads
- Where NATS slows down — and why — random-access vs. streaming performance, caching limits, and persist-mode tuning, demonstrated live
- Production gotchas at scale — the 64 MB connection budget, head-of-line blocking, the consumer meta layer, and stream sizing
- KV vs. the raw Stream API — when to use each, and the “bad ideas” and gray-area traps to steer clear of
Who it’s for
Backend, platform, and infrastructure engineers already running NATS who want to get more out of JetStream — plus SREs and architects evaluating it as a Kafka alternative for streaming, key-value, and edge workloads, from a single cluster to large multi-tenant, leaf-node deployments.
Keep learning
All workshopsGo deeper with NATS training
Take your skills further with our live, instructor-led courses delivered by our experts to your team of developers or operators.