How many clients can a MQTT broker handle?

*爱你&永不变心* 提交于 2020-01-16 12:47:13

问题


MQTT is a publish/subscribe protocol. Whenever a publisher publishes to a topic, all the subscribers that have subscribed to that topic will get the message via an MQTT broker. I would like to know the maximum number of clients an MQTT broker can handle. Is there any upper limit for that?


回答1:


The only way to work this out is to test depending on your specific workload.

It will be entirely dependent on the following:

  1. The size of the machine you run the broker on.
  2. The size of the messages you send.
  3. The rate of messages.
  4. The number of clients (both subscribers and publishers).
  5. The performance characteristics you need to meet.
  6. Which broker you are using.

And possibly many more factors.




回答2:


How many clients an MQTT broker can serve depends on the MQTT broker software you're using. Most MQTT brokers will likely only be limited by the amount of memory available (each socket uses a chunk of memory) and it therefore becomes a question of which broker software utilizes the memory (and other resources) in the most efficient manner. Of course some brokers might have other limitations.

In practice you'd also have to look at what you can do with the connected clients - some brokers may behave differently (performance wise) depending on how many clients are connected etc.



来源:https://stackoverflow.com/questions/48148237/how-many-clients-can-a-mqtt-broker-handle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!