1

I have started reading some details about MQTT protocol and its implementation. I came across the term 'cluster' a lot. Can anyone help me understand what does 'cluster' mean for MQTT protocol?

In this comparison of various MQTT protocol, there is a column for the term 'cluster'

fosUffe
  • 13
  • 4

2 Answers2

3

Forwarding messages with topic bridge loops will not result in a true MQTT broker cluster, which will lead to drawbacks lined out above.
A true MQTT broker cluster is a distributed system that represents one logical MQTT broker. A cluster consists of various individual MQTT broker nodes, that are typically installed on separate physical or virtual machines and or connect over a network.
Typical advantages of MQTT broker clusters include:

  • Elimination of the single point of failure
  • Load distribution across multiple cluster nodes
  • The ability for clients to resume sessions on any broker cluster
  • Scalability
  • Resilience and fault tolerance - especially useful in cloud environments

I recommend this blogpost, if you're looking for a more detailed explanation.

fraschbi
  • 533
  • 3
  • 6
-1

A cluster is a collection of MQTT brokers set up to bridge all topics between each other so that a client can connect to any one of the cluster members and still publish and receive messages to all other clients no matter which cluster member they are connected to.

A few things to be aware of:

  • Topic bridge loops, where a message is published to one cluster member which is then forwarded to another cluster member, then another and finally back to the original. If this happens the original broker doesn't have a way to know it originally pushed this to the other cluster members so the message and end up in a loop. Shared message state databases or using a single bridging replication broker can fix this.
  • Persistent subscriptions/sessions, unless brokers have a pooled session cache then clients will not retain session or subscription status if they connect to a different cluster member when reconnecting.
hardillb
  • 54,545
  • 11
  • 67
  • 105