hmq icon indicating copy to clipboard operation
hmq copied to clipboard

[Question] Is the router could be part of the broker?

Open MarcMagnin opened this issue 7 years ago • 6 comments

Hey,

So if I understand it, a cluster of broker require a router. That sounds like a single point of failure. Is this router functionality could be embedded in the broker such as I suppose emqtt is doing? http://emqtt.io/docs/v2/cluster.html

Regards

MarcMagnin avatar Jan 23 '18 16:01 MarcMagnin

I am also a bit confused about cluster design, I have another version similar to emqtt, branch "newbroker", but the "router" looks more distinct.

chowyu08 avatar Jan 24 '18 11:01 chowyu08

What about using raft algorithm (for instance the etcd implementation?)

MarcMagnin avatar Jan 24 '18 14:01 MarcMagnin

it is not easy to use DHT since there's wildcard inside topic filter.. so i think simple broadcast the subscription is enough.

hui6075 avatar Jan 25 '18 14:01 hui6075

Sorry @hui6075 I'm not sure to follow. Broadcast the subscription of what to who? A broker subscription to other brokers?

MarcMagnin avatar Jan 25 '18 14:01 MarcMagnin

@MarcMagnin yes, a broker broadcast it's local clients' subscription to other brokers inside the cluster. ONLY broadcast the subscription which comes from external clients, this does work for my mosquitto cluster;)

hui6075 avatar Jan 25 '18 15:01 hui6075

They seems to have a kafka broker with raft for the clustering. That may be good to look at it at some point: https://github.com/travisjeffery/jocko

MarcMagnin avatar Feb 01 '18 10:02 MarcMagnin