Published on

NATS Topology

2 min read


In this article, we will learn about NATS topology and how different components such as Clusters, Servers, Supercluster, and Leaf Node are organized.


Below is a diagrammatic representation of the NATS topology.

Clients require no awareness of server topology beyond a connection URL



Here we have a single NATS server with clients connected to it. With the ability to process millions of messages a second per server, you'll find unparalleled efficiency with NATS server.



NATS Clusters are made up of any number of NATS servers that communicate with each other, service, or any number of clients.

NATS Cluster provides great fault tolerance and scalability.


Super Cluster

But sometimes super clusters aren't enough, for this NATS has a concept of Super Clusters.

Superclusters are made up of NATS clusters that are connected together by gateway connections.

Gateway connections route messages between clusters. They use a spline based technology to ensure resiliency and optimize traffic across clusters. This improves disaster recovery as well.

Fun fact: Super cluster are smart enough to only send requests if there is an active consumer.


Multiple clusters can be linked together to form vast network topologies that consider WAN network links and latency.


Leaf Node

A leaf node is a single NATS server extended out from a cluster or remote server. Leaf nodes extend clusters via a hub and spoke topology. Leaf nodes allow you to bridge separate security domains.


Leaf nodes are ideal for edge computing, IoT hubs, or data centers that need to be connected to a global, regional, or national NATS deployment. Transparently bridge on-premise and cloud deployments.


In this short article, we took a look at NATS topology. For more information, make sure to checkout the docs for more.

© 2024 Karan Pratap Singh