Preface
Many MQTT projects and Internet of Things services provide online public MQTT server , users can directly use it for MQTT learning, testing, prototyping and even small-scale use, without the need for self-deployment, which is convenient and fast, saving time and energy cost.
However, due to different geographic locations, network environments, and server loads, the stability and message transmission delay of each public server are also different. Although almost all service providers state that they are not responsible for the stability and security of their free services, users need to consider these factors when using them.
To this end, this article has compiled some of the more popular free online MQTT servers, and evaluated and compared them through accessibility, network delay, small-scale performance testing, and actual message transmission delay, etc., hoping to provide a reference for your choice .
Popular online public MQTT servers
This article selects the following popular online public MQTT servers:
name | Broker address | TCP | TLS | WebSocket |
---|---|---|---|---|
EMQ X | broker.emqx.io | 1883 | 8883 | 8083,8084 |
EMQ X (domestic) | broker-cn.emqx.io | 1883 | 8883 | 8083,8084 |
Eclipse | mqtt.eclipseprojects.io | 1883 | 8883 | 80, 443 |
Mosquitto | test.mosquitto.org | 1883 | 8883, 8884 | 80 |
HiveMQ | broker.hivemq.com | 1883 | N/A | 8000 |
EMQ X
Free online MQTT 5 server, provided by EMQ X Cloud . In order to optimize the access speed of domestic users, two overseas and domestic access points are provided. EMQ X is deployed in the Oregon region of AWS, and EMQ X (domestic) is deployed in the Tencent Cloud Shanghai region. There is a stable network channel for domestic access.
Both access points are the EMQ X cluster composed of 2 nodes. Later, it can automatically expand more nodes according to the actual access volume and load. According to the background display, the server is based on EMQ X Enterprise Edition 4.2.6 version, and the current running time is 128 days.
For details, please visit the EMQ official website page: Free online MQTT 5 server .
Note: EMQ X and EMQ X (domestic) two access points do not communicate with each other.
Eclipse
The free online MQTT server provided by Eclipse IoT, the resolved IP shows that it is deployed in Azure, USA, Virginia. It’s worth mentioning that the server’s access address has always been mqtt.eclipse.org
, and it’s changed to the current access address for some reason. At the time of writing this article, I used the old address and failed to access the server. I thought the server had stopped, and finally accessed the original through HTTP. It was discovered that the 301 permanent redirection had been done when the access point was reached.
According to the $SYS/#
system subject query, the server is based on the Mosquitto 2.0.12 version, and the current running time is 71227 seconds. It is suspected that the service was restarted a day ago.
Related introduction: https://mqtt.eclipseprojects.io/
Mosquitto
A free online MQTT server provided by the Mosquitto community. The resolved IP shows that it is deployed in the OVH French Roubaix region. In the test, it was found that the network delay of the access point is relatively high under normal conditions, but fortunately the packet loss rate is relatively low, and connection failures may occur during certain periods.
According to the $SYS/#
system subject query, the server is based on the Mosquitto 2.0.12 version, and the current running time is 28,519 seconds. It is suspected that the service has been restarted in one day.
Related introduction: https://test.mosquitto.org/
HiveMQ
The free online MQTT server provided by HiveMQ, the resolved IP shows that it is deployed in the Frankfurt region of AWS, Germany.
Because its $SYS/#
system topic cannot be subscribed, it is impossible to know the type of Broker providing the service, the specific version, and the current running time.
Related introduction: http://www.mqtt-dashboard.com/
test environment
- Network: Domestic and Yunnan Telecom Network
- Operating system: macOS 10.15.7
Note: Due to different geographical locations, the network environment of different places will be different, which may lead to differences in the test results of this article.
Accessibility test
Test Results
In this session, the MQTT client tool-MQTT X was used to conduct an accessibility test, trying to establish a connection through the TCP 1883 port. After repeated testing, only the free services provided by Eclipse could not be accessed. The overall results are as follows:
name | Broker address | TCP | Available |
---|---|---|---|
EMQ X | broker.emqx.io | 1883 | YES |
EMQ X (domestic) | broker-cn.emqx.io | 1883 | YES |
Eclipse | mqtt.eclipseprojects.io | 1883 | NO |
Mosquitto | test.mosquitto.org | 1883 | YES |
HiveMQ | broker.hivemq.com | 1883 | YES |
Test configuration file download
MQTT X has the connection import and export function. The following is the connection data used in the test in this article, which can be imported into MQTT X through data recovery.
Domestic network delay test
Detect network connectivity and network delay through network access. Because some services have disabled the ICMP protocol, and the network conditions in various places are different, the WebSocket address is used here, with the help of the popular domestic speed measurement tool webmaster tool for HTTP speed measurement test:
name | HTTP address (click to test) | WebSocket |
---|---|---|
EMQ X | http://broker.emqx.io:8083/mqtt | 8083 |
EMQ X (domestic) | http://broker-cn.emqx.io:8083/mqtt | 8083 |
Eclipse | http://mqtt.eclipseprojects.io/mqtt | 80 |
Mosquitto | http://test.mosquitto.org/mqtt | 80 |
HiveMQ | http://broker.hivemq.com:8000/mqtt | 8000 |
Small-scale performance test
Use the open source MQTT performance testing tool emqtt-bench to test to test whether the Pub Sub of the client has a rate limit.
For practical considerations , this round of testing is not to explore the upper limit of the rate of each access point, but to consider that each access point can meet the conventional intensity of use. The scenario designed in this round is to test the single client Sub/Pub message for 1000 msg/s for 1 minute, and the message size is 256 Bytes. Record whether each access point meets the standard and whether the speed is limited. The following figure shows the test architecture:
After preparing emqtt-bench, each group of Sub Pub commands below can be executed in different windows:
name | Broker address | TCP | Pub meets the standard | Sub standard |
---|---|---|---|---|
EMQ X | broker.emqx.io | 1883 | YES | YES |
EMQ X (domestic) | broker-cn.emqx.io | 1883 | YES | YES |
Eclipse | mqtt.eclipseprojects.io | 1883 | YES | YES |
Mosquitto | test.mosquitto.org | 1883 | The rate fluctuates around 50 msg/s | The rate fluctuates between 0-50 msg/s |
HiveMQ | broker.hivemq.com | 1883 | YES | The rate is stable at about 50 msg/s |
# EMQ X
## Sub
./emqtt_bench sub -t t/1 -c 1 -h broker.emqx.io
## Pub
./emqtt_bench pub -t t/1 -c 1 -h broker.emqx.io -I 1
# EMQ X CN
## Sub
./emqtt_bench sub -t t/1 -c 1 -h broker-cn.emqx.io
## Pub
./emqtt_bench pub -t t/1 -c 1 -h broker-cn.emqx.io -I 1
# Eclipse
## Sub
./emqtt_bench sub -t t/1 -c 1 -h mqtt.eclipseprojects.io
## Pub
./emqtt_bench pub -t t/1 -c 1 -h mqtt.eclipseprojects.io -I 1
# Mosquitto
## Sub
./emqtt_bench sub -t t/1 -c 1 -h test.mosquitto.org
## Pub
./emqtt_bench pub -t t/1 -c 1 -h test.mosquitto.org -I 1
# HiveMQ
## Sub
./emqtt_bench sub -t t/1 -c 1 -h broker.hivemq.com
## Pub
./emqtt_bench pub -t t/1 -c 1 -h broker.hivemq.com -I 1
Message actual transmission delay test
Purpose: Consider the time required for the message to go from the Pub end to the Sub end, sample and analyze the transmission stability and average time consumption.
Test steps: The client connects to the public server and publishes a time-stamped message every 5 seconds. After the subscriber receives the message, the current timestamp is subtracted from the timestamp in the message, and the message delay is calculated and recorded in the database. Sampling and analysis are performed after 30 minutes of statistics.
The test model is as follows:
Test code: free-online-public-broker-test.js
Time delay history
Average delay
name | Broker address | TCP | Average delay |
---|---|---|---|
EMQ X | broker.emqx.io | 1883 | 212 ms |
EMQ X (domestic) | broker-cn.emqx.io | 1883 | 52.6 ms |
Eclipse | mqtt.eclipseprojects.io | 1883 | 261 ms |
Mosquitto | test.mosquitto.org | 1883 | 874 ms |
HiveMQ | broker.hivemq.com | 1883 | 574 ms |
Summarize
In several tests, each free online MQTT server has reached a usable level as a whole, but there are still significant differences between the servers in specific indicators. Low rate limits, unstable network delays, and even some servers are suspected of having a scheduled restart mechanism. These stability and usability issues will bring a bad experience to users even in simple testing and prototyping.
The above content also proves to a certain extent that the relevant performance of the IoT platform is affected by the geographic location of the device. Therefore, the EMQ X free online MQTT service that provides nearby access points based on high-quality cloud service provider networks in overseas and domestic has certain advantages in comparison, and all aspects of test data are relatively leading.
We are also very pleased to see that more and more IoT devices from all over the world are connected to the online MQTT server provided by EMQ X. On average, thousands of messages are delivered per second. broker.emqx.io:1883
also appears in various open source projects and sample codes on GitHub ( https://github.com/search?q=broker.emqx.io&type=Code ). Domestic users can choose the broker-cn.emqx.io
node that is optimized for domestic deployment.
Both domestic and overseas access point services of EMQ X online public server are provided by EMQ X Cloud . EMQ X Cloud is a fully managed cloud native MQTT messaging service provided by EMQ, supporting commercial-grade accessibility and stability guarantees. For business users, using EMQ X Cloud can quickly start projects at zero cost and implement MQTT device access in a simple and fast way. Later, it can be expanded as needed according to the business development, and at the same time, it can create access points around the world and enjoy the 7*24 technical support guarantee provided by the EMQ professional team.
Whether it is a personal or enterprise project, EMQ is committed to providing the most suitable MQTT messaging service for all kinds of users. If you have any comments or questions in the process of using EMQ X, please feel free to give feedback to our team.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。