简体   繁体   中英

What is maximum connection of Mosquitto?

I'm programming chat app with MQTT protocol

You can see here mqtt.org about MQTT

My used broker is mosquito

What struck my mind is that

How many users can connect to Mosquito broker?

I saw 100k in some website but i am not sure

This is dependent on a number of factors:

  • What OS your running on
  • The size of the machine(s) you run the broker on
  • What broker you choose to use
  • How much and what type of load you are generating:
    • How many clients subscribed to each topic
    • How big the messages are
    • How many retained messages you are generating
    • What the message rates is
    • Are you queuing message for offline clients

You also need to configure the broker/OS to get the most out of it, eg for mosquitto you need to set the number of open file handles on Linux to the maximum.

For a large scale app you may want to look at one of the brokers that supports federation/clustering to spread the load and allow fail over.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM