Asynchronous messaging is a cornerstone of modern distributed systems, enabling decoupled communication for scalable and resilient applications. Today's message queue (MQ) ecosystem spans a wide range of designs, from high-throughput streaming platforms to lightweight protocols tailored for edge and IoT environments. Despite this diversity, choosing an appropriate MQ system remains difficult. Existing evaluations largely focus on throughput and latency on fixed hardware, while overlooking CPU and memory footprint and the effects of resource constraints, factors that are critical for edge and IoT deployments. In this paper, we present a systematic performance study of eight prominent message brokers: Mosquitto, EMQX, HiveMQ, RabbitMQ, ActiveMQ Artemis, NATS Server, Redis (Pub/Sub), and Zenoh Router. We introduce mq-bench, a unified benchmarking framework to evaluate these systems under identical conditions, scaling up to 10,000 concurrent client pairs across three VM configurations representative of edge hardware. This study reveals several interesting and sometimes counter-intuitive insights. Lightweight native brokers achieve sub-millisecond latency, while feature-rich enterprise platforms incur 2-3X higher overhead. Under high connection loads, multi-threaded brokers like NATS and Zenoh scale efficiently, whereas the widely-deployed Mosquitto saturates earlier due to its single-threaded architecture. We also find that Java-based brokers consume significantly more memory than native implementations, which has important implications for memory-constrained edge deployments. Based on these findings, we provide practical deployment guidelines that map workload requirements and resource constraints to appropriate broker choices for telemetry, streaming analytics, and IoT use cases.


翻译:异步消息传递是现代分布式系统的基石,支持可扩展和弹性应用中的解耦通信。当今的消息队列生态系统涵盖了从高吞吐量流式处理平台到为边缘和物联网环境量身定制的轻量级协议的广泛设计。尽管存在这种多样性,但选择合适的消息队列系统仍然困难。现有的评估主要关注固定硬件上的吞吐量和延迟,而忽略了中央处理器和内存占用以及资源约束的影响,这些因素对于边缘和物联网部署至关重要。在本文中,我们对八个主流的消息代理:Mosquitto、EMQX、HiveMQ、RabbitMQ、ActiveMQ Artemis、NATS Server、Redis (Pub/Sub) 和 Zenoh Router 进行了系统的性能研究。我们引入了 mq-bench,一个统一的基准测试框架,用于在相同条件下评估这些系统,在三种代表边缘硬件的虚拟机配置中扩展到多达 10,000 个并发客户端对。这项研究揭示了一些有趣且有时反直觉的见解。轻量级的原生代理实现了亚毫秒级的延迟,而功能丰富的企业级平台则会产生 2-3 倍的更高开销。在高连接负载下,像 NATS 和 Zenoh 这样的多线程代理可以高效扩展,而广泛部署的 Mosquitto 由于其单线程架构而更早饱和。我们还发现,基于 Java 的代理比原生实现消耗的内存显著增加,这对内存受限的边缘部署具有重要意义。基于这些发现,我们提供了实用的部署指南,将工作负载需求和资源约束映射到遥测、流式分析和物联网用例中合适的代理选择上。

0
下载
关闭预览

相关内容

专知会员服务
37+阅读 · 2021年7月8日
《“边缘计算+”技术白皮书》,82页pdf
专知
11+阅读 · 2022年8月28日
【边缘计算】边缘计算面临的问题
产业智能官
17+阅读 · 2019年5月31日
我所了解的物联网设备测试方法(硬件篇)
FreeBuf
12+阅读 · 2019年2月12日
边缘计算应用:传感数据异常实时检测算法
计算机研究与发展
11+阅读 · 2018年4月10日
边缘计算:万物互联时代新型计算模型
计算机研究与发展
15+阅读 · 2017年5月19日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
10+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
12+阅读 · 6月17日
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员