muMQ: A lightweight and scalable MQTT broker

muMQ: A lightweight and scalable MQTT broker
复制标题

muMQ:轻量级且可扩展的 MQTT 代理

DOI:
10.1109/lanman.2017.7972165
复制
发表时间:
2017
期刊:
2017 IEEE International Symposium on Local and Metropolitan Area Networks (LANMAN)
影响因子:
--
通讯作者:
Ryousei Takano
Ryousei Takano
中科院分区:
--
文献类型:
--
作者:
Wiriyang Pipatsakulroj;V. Visoottiviseth;Ryousei Takano

文献摘要

被引文献

相似文献

消息代理是物联网系统中必不可少的组件,它充当物联网设备和应用平台之间的网关。随着当今物联网设备的增长,这些系统很容易淹没消息代理,除非软件可以充分利用多核设施等硬件资源。本文介绍了muMQ,一个在商用现成硬件上运行的高性能MQTT代理。它通过有效地利用多核CPU来解决提高单台机器上的消息代理性能的挑战。首先,muMQ利用事件驱动的I/O机制来实现多核可伸缩性。每个CPU核心平等地处理调度的TCP连接,并在本地处理MQTT逻辑。其次,muMQ采用了一个用户级的TCP/IP协议栈,mTCP与DPDK,以避免内核TCP/IP协议栈的开销,包括系统调用开销和资源争用。我们通过实验来评估我们的方法的有效性。结果表明,muMQ可以处理512 K或更多的长期订阅者,而不会丢失消息; muMQ的发布消息传递速率为每秒930 K条消息,比现有的MQTT代理快5.38倍。我们还确认mTCP使用内核TCP/IP堆栈与muMQ相比,性能提高了1.8倍。
A message broker is an imperative component in IoT systems, and it works as a gateway between IoT devices and application platforms. With the growth of IoT devices today, these systems can easily overwhelm message brokers unless the software can fully utilize hardware resources such as multi-core facility. This paper presents muMQ, a high-performance MQTT broker running on Commercial-Off-The-Shelf hardware. It tackles the challenge to improve the performance of message brokering on a single machine by efficiently utilizing multi-core CPUs. First, muMQ exploits an event-driven I/O mechanism for multi-core scalability. Each CPU core equally handles dispatched TCP connections and locally processes MQTT logic. Second, muMQ adopts a user-level TCP/IP stack, mTCP with DPDK, to avoid the overhead of the in-kernel TCP/IP stack, including system call overhead and resource contention. We evaluate the effectiveness of our approach through experiments. The results show that muMQ can handle 512K or greater long-lived subscribers with no message loss; muMQ achieves a publish messaging rate at 930K messages per second, which is 5.38 times faster than an existing MQTT broker. We also confirm mTCP accelerates the performance by 1.8 times compared with muMQ using the in-kernel TCP/IP stack.