Skip to main content
NATS is a simple, secure and performant communications system for digital systems, services and devices. NATS is part of the Cloud Native Computing Foundation (CNCF) and provides a lightweight messaging infrastructure for building modern distributed systems.

What is NATS Server?

NATS Server is the core messaging platform that enables applications to communicate through message passing. It can run on-premise, in the cloud, at the edge, and even on a Raspberry Pi. NATS can secure and simplify the design and operation of modern distributed systems.
NATS has over 40 client language implementations, making it easy to integrate with your existing technology stack.

Key capabilities

Publish-subscribe messaging

NATS provides a lightweight publish-subscribe messaging pattern that allows services to communicate asynchronously. Publishers send messages to subjects, and subscribers receive messages from subjects they’re interested in.

JetStream

JetStream is NATS’s persistence layer that provides streaming, message replay, and guaranteed delivery. Enable JetStream functionality with the -js flag when starting the server.
nats-server -js --store_dir /data/nats

Clustering

NATS supports clustering for high availability and scalability. Multiple servers can be connected together to form a cluster, with automatic failover and load balancing.
Clustering is configured through the cluster block in your configuration file. The default cluster port is 6222.

Security

NATS provides multiple authentication and authorization mechanisms:
  • Token authentication: Simple token-based authentication using the --auth flag
  • Username/password: Basic authentication with --user and --pass flags
  • TLS encryption: Enable secure connections with --tls, --tlscert, and --tlskey flags
  • Account-based security: Multi-tenancy with isolated accounts

Use cases and scenarios

NATS provides a lightweight, high-performance messaging backbone for microservices architectures. Services can discover and communicate with each other without tight coupling.
With JetStream, NATS can function as an event streaming platform for building event-driven applications with message persistence and replay capabilities.
NATS’s small footprint and ability to run on resource-constrained devices makes it ideal for IoT deployments and edge computing scenarios.
NATS excels at distributing real-time data updates across distributed systems with minimal latency.

Why choose NATS?

  • Simple: Easy to deploy, operate, and use with a straightforward API
  • Secure: Built-in security features including TLS, authentication, and authorization
  • Performant: Designed for high throughput and low latency
  • Cloud native: Part of CNCF with Kubernetes-native deployments
  • Lightweight: Minimal resource footprint suitable for edge deployments
A third-party security audit was performed by Trail of Bits following engagement by OSTIF. Review the full security audit report for detailed findings.

Next steps

Quickstart

Get your first NATS message working in minutes

Installation

Install NATS Server on your platform

Additional resources

Build docs developers (and LLMs) love