pm2集群-2instance与1instance-apache基准负载测试-在处理http请求方面没有显着改善

问题描述

我想知道nodejs服务器可以处理多少个http请求one instance vs 2 instances

所以我创建了一个简单的http路由,并使用apache benchmark进行测试。我使用pm2 cluster feature创建了2个实例

enter image description here

ab -n requestcount -c concurrentrequestcount http://hosturl/

apache基准测试的结果表明1 instance vs 2 instances之间没有明显改善。

我希望针对2个实例完成请求所花费的时间要短得多。 我不明白这里发生了什么。

enter image description here

用于测试的nodejs脚本

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)