DEV Community

Cover image for NATS Topology
Karan Pratap Singh
Karan Pratap Singh

Posted on • Originally published at karanpratapsingh.com

8

NATS Topology

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.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay