A next-generation messaging server
NATS is a messaging server originally created by Derek Collison (ex Cloud Foundry, VMware) in 2010 in Ruby, rewritten in Go in 2012. The backing company is Synadia Communications. Apache 2.0 licence.
In March 2018 NATS enters the CNCF Sandbox; promoted to Incubating in 2019. Development continues with focus on performance and simplicity.
Features
NATS is designed around three goals: performance, simplicity, resilience:
- Pub-Sub, Request-Reply, Queue Groups as base patterns
- Subject-based routing —
orders.europe.it, wildcard patternsorders.*.it,orders.> - Textual wire protocol — debug via telnet/nc
- Single Go binary — no dependencies
- Native cluster — NATS nodes discover each other via gossip, form full-connected mesh
- Superclusters — connections between geographic clusters
- Leaf nodes — edge deployment with traffic subset
Performance
Published benchmarks show millions of messages/second per node on commodity hardware, with sub-millisecond latency. Designed as the opposite of Kafka design-wise: low-latency, fire-and-forget rather than durable persistence.
JetStream (persistence)
NATS originally non-persistent. In 2020 (NATS 2.2) introduces JetStream: persistent streaming with exactly-once semantics, replay, compaction. Rivals Kafka for event sourcing cases but with much smaller footprint.
Usage
NATS is chosen in scenarios where Kafka is overkill:
- IoT — messages from millions of devices
- Real-time microservices — intra-cluster request/reply
- Gaming — low-latency coordination
- Cloud-native — classical message broker alternative
- Edge computing — leaf nodes bring logic close to sensors
In the Italian context
Italian adoption in:
- Corporate IoT — fleet management, smart manufacturing
- Gaming studios
- Microservices startups
- Banks with algorithmic trading systems (low latency)
Comparison
- Kafka — durable persistence, high throughput but high latency
- RabbitMQ — AMQP protocol, complex routing, heavier
- Redis Pub-Sub — simple but no persistence or cluster resilience
- NATS — sweet spot among simplicity, performance, cluster resilience
References: NATS Server in Go (2012). Derek Collison, Synadia Communications. CNCF Sandbox (March 2018), Incubating (March 2019). Apache 2.0 licence. JetStream (2020, NATS 2.2). Textual protocol. Subject-based routing.
