wind-c / comqtt

A lightweight, high-performance go mqtt server(v3.0|v3.1.1|v5.0) supporting distributed cluster
MIT License
869 stars 50 forks source link

gRPC client connection pooling #40

Closed kenuestar closed 1 year ago

kenuestar commented 1 year ago

集群性能被单grpc客户端所限制,调整为grpc客户端池,并发处理grpc的消息。

The performance of the cluster is limited by a single gRPC client, so we will adjust it to use a gRPC client pool to handle gRPC messages concurrently.

kenuestar commented 1 year ago

测试工具:https://github.com/emqx/emqtt-bench 服务器(2台):

系统版本 内存 CPU 硬盘 网卡数量
CentOS Linux release 7.9.2009 (Core) 16G 4核 40G 4

压测机(2台):

角色 系统版本 内存 CPU 硬盘 网卡数量
发布者 CentOS Linux release 7.9.2009 (Core) 8G 2核 40G 1
订阅者 CentOS Linux release 7.9.2009 (Core) 8G 2核 40G 1

压测场景

主题数 1对1(压测30min)

发布者数 订阅者数 payload/字节 PUBLISH发布速率 PUBLISH接收速率 发布总数 发布成功数 订阅成功数
单gRPC客户端 1500 1500 1024 1,499.43/s 1,500.15/s 2698981 2698980 2700284
gRPC客户端池化 5000 5000 1024 4,990.80/s 4,992.45/s 8983443 8983433 8986421
wind-c commented 1 year ago

非常感谢你的性能测试,在v2.3.5版本里已经进行了性能优化