What is NATS?
NATS is an open source messaging system. Applications connect to a NATS server and exchange messages by subject, without knowing each other's network addresses.
Overview
At its core, NATS is about publishing and listening for messages. It provides a layer between application components, allowing them to communicate without being directly connected or even aware of each other's existence.
NATS optimizes for a small single binary, low latency at high message rates, and secure defaults. It runs from one server on a laptop up to clusters of servers spanning regions.
How NATS Works
NATS is a messaging fabric that connects all your applications and services:
Core Components
- NATS Server - The messaging broker that routes messages
- Publishers - Applications that send messages
- Subscribers - Applications that receive messages
- Subjects - Named channels for message organization
The NATS Ecosystem
NATS ships as a small set of pieces you compose together: the server, a client for your language, and tooling you add as you need it.
- Server — the single
nats-serverbinary. Clustering, JetStream, leaf nodes, MQTT, and WebSocket are all configuration on the same process. - Clients — official Tier 1 clients exist for Go, JavaScript/TypeScript, Python, Java, Rust, C#/.NET, and C. Tier 2 clients (may lag on new server features) cover Zig, Swift, Ruby, and Elixir.
- Orbit — optional per-language extension libraries with higher-level utilities and experimental features built on top of the core client.
- Tooling — the
natsCLI with built-innats authidentity commands,nscas the standalone identity tool, NACK and Helm charts for Kubernetes, Prometheus exporter, surveyor, bridges to Kafka / JMS / Spark / Flink, and a Terraform provider.
See the ecosystem page for the full list with links.
Key Differentiators
Simplicity
NATS focuses on moving messages between applications. The server is one binary, and the client API is small.
Performance
- Process millions of messages per second
- Sub-millisecond latency
- Small memory footprint (typically ~15MB)
Location transparency
Applications don't need to know where other services are located. NATS handles:
- Service discovery
- Load balancing
- Fault tolerance
Multi-tenancy
Accounts isolate messaging domains within one server or cluster, which supports:
- Secure multi-tenant deployments
- Department or team isolation
- SaaS platform building
Use Cases
NATS excels in scenarios requiring:
Agentic AI
- Agent-to-agent communication with automatic service discovery
- Real-time event streams for LLM inference and tool calls
- Multi-region GPU inference routing with scale-to-zero
Real-time Data Streaming
- IoT telemetry collection
- Financial market data distribution
- Log and metrics aggregation
Microservices Communication
- Service mesh data plane
- Event-driven architectures
- CQRS and Event Sourcing patterns
Edge Computing
- Edge-to-cloud connectivity
- Intermittent network handling
- Bandwidth and resource-constrained environments
Command and Control
- Remote procedure calls
- Configuration management
- System orchestration
Next steps
- Core NATS deep dive — go hands-on with the messaging fundamentals
- The full Learn section — guided chapters across every NATS topic
- Getting Started Guide — set up your first NATS application
- Pub/Sub Basics — deep dive into the publish-subscribe pattern
- Request-Reply — learn synchronous communication patterns