Benchmarking Performance of node.js (cluster) with mysql pools : Lighttpd + PHP?

后端 未结 7 1017
無奈伤痛
無奈伤痛 2020-12-28 12:01

Edit(2): Now using db-mysql with generic-pool module. The error rate has dropped significantly and hovers at 13% but the throughput is still around 100 req/

相关标签:
7条回答
  • 2020-12-28 12:40

    This is a bad benchmark comparison. In node.js your selecting the whole table and putting it in an array. In php your only parsing the first row. So the bigger your table is the slower node will look. If you made php use mysqli_fetch_all it would be a similar comparison. While db-mysql is supposed to be fast it's not very full featured and lacks the ability to make this a fair comparison. Using a different node.js module like node-mysql-libmysqlclient should allow you to only process the first row.

    0 讨论(0)
提交回复
热议问题