Skip to main content
  1. Code Space/

Queue: Nats, Connectivity and Edge

·135 words·1 min Draft
Table of Contents

introduce
#

Nats includes two parts,
a simple memory queue with a TCP interface,
persistence and at least once delivery.

Nats looks special in topology.
Nats nodes are connected fully with each other in a single cluster, thus the connections become a full mesh. It employ a gossip algorithm to probe the others. Every time a new node joins, it will register itself to the adjacent nodes. With the rumor pass by, the cluster internal nodes will know the newcomer. The meta information registered contains not only the address, but also consumers connected with this node. That means everyone in the network can dynamically know all the other nodes together with all the consumers, topics subscribed.

However, the connections of full mesh does not increase linearly, so a cluster can’t include too many nodes.


todo