Web Socket 性能对比——Spring Boot vs Tomcat vs Netty

版权声明:欢迎访问个人博客网站 www.dubby.cn,和个人微信公众号ITBusTech https://blog.csdn.net/u011499747/article/details/83055853

原文链接:https://www.dubby.cn/detail.html?id=9106

统计结果精确到5位小数;每次请求都预热过了

等待上一个消息响应后再发送下一个消息

实现方式 消息类型 消息长度 发送消息数 总耗时(s) Messages/s单方向 单次耗时(ms) 吞吐(MChars/s单方向)
Spring Boot Text 100 100000 32.358 3090.42586 0.32358 0.30904
Tomcat Text 100 100000 30.276 3302.94623 0.30276 0.33029
Netty Text 100 100000 25.091 3985.4928 0.25091 0.39855
Spring Boot Text 1024 100000 19.502 5127.67921 0.19502 5.25074
Tomcat Text 1024 100000 17.209 5810.91289 0.17209 5.95037
Netty Text 1024 100000 14.18 7052.18618 0.1418 7.22144
Spring Boot Text 4096 100000 43.615 2292.78918 0.43615 9.39126
Tomcat Text 4096 100000 42.49 2353.49494 0.4249 9.63992
Netty Text 4096 100000 36.4 2747.25275 0.364 11.25275

发送全部消息,然后等待所有结果

实现方式 消息类型 消息长度 发送消息数 总耗时(s) Messages/s单方向 单次耗时(ms) 吞吐(MChars/s单方向)
Spring Boot Text 100 100000 8.207 12184.72036 0.08207 1.21847
Tomcat Text 100 100000 8.152 12266.92836 0.08152 1.22669
Netty Text 100 100000 7.11 14064.69761 0.0711 1.40647
Spring Boot Text 1024 100000 12.54 7974.48166 0.12539 8.16587
Tomcat Text 1024 100000 12.11 8257.63832 0.1211 8.45582
Netty Text 1024 100000 10.55 9478.67299 0.1055 9.70616
Spring Boot Text 4096 100000 24.454 4089.31054 0.24454 16.74982
Tomcat Text 4096 100000 24.132 4143.87535 0.24132 16.97331
Netty Text 4096 100000 21.583 4633.27619 0.21583 18.97789

猜你喜欢

转载自blog.csdn.net/u011499747/article/details/83055853