Published on

NATS Topology

2 min read

Authors
banner

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

Topology

Below is a diagrammatic representation of the NATS topology.

Clients require no awareness of server topology beyond a connection URL

topology

Server

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.

server

Cluster

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.

cluster

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.

supercluster.png

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

supercluster-2

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-node.png

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.

Conclusion

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

© 2022 Shiva Poudel