How many clients can a MQTT broker handle?

2019-08-16 06:59发布

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?

标签: mqtt
2条回答
别忘想泡老子
2楼-- · 2019-08-16 07:32

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.

查看更多
Ridiculous、
3楼-- · 2019-08-16 07:43

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.

查看更多
登录 后发表回答