对物联网边缘计算的消息中间件进行基准测试:全面的性能研究
Benchmarking Message Brokers for IoT Edge Computing: A Comprehensive Performance Study
AI总结:
本文通过统一的基准框架评估了八个主流消息中间件,揭示了轻量级中间件在低延迟方面的优势及企业级平台的高开销问题,为物联网部署提供了实用指导。
摘要:
异步消息是现代分布式系统的核心,使解耦通信成为可能。当今消息队列(MQ)生态系统涵盖了从高吞吐量流平台到专为边缘和物联网环境设计的轻量级协议。尽管存在多样性,选择合适的MQ系统仍困难。现有评估主要关注固定硬件上的吞吐量和延迟,而忽略了CPU和内存足迹以及资源限制的影响,这对边缘和物联网部署至关重要。本文系统研究了八个主流消息中间件:Mosquitto、EMQX、HiveMQ、RabbitMQ、ActiveMQ Artemis、NATS Server、Redis(Pub/Sub)和Zenoh Router。我们引入了mq-bench,一个统一的基准框架,在相同条件下评估这些系统,扩展到10,000个并发客户端对,覆盖三种代表边缘硬件的虚拟机配置。本研究揭示了若干有趣且有时反直觉的见解。轻量级原生中间件实现亚毫秒延迟,而功能丰富的企业平台带来2-3倍的开销。在高连接负载下,多线程中间件如NATS和Zenoh扩展效率高,而广泛部署的Mosquitto由于单线程架构提前饱和。我们还发现基于Java的中间件消耗的内存显著多于原生实现,这对内存受限的边缘部署有重要影响。基于这些发现,我们提供了实用部署指南,将工作负载需求和资源限制映射到适当的中间件选择,用于遥测、流分析和物联网用例。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。