Ask HN: How can I improve the performance of this Node.js app?

1 points by gengstrand ↗ HN
I have heard how node.js apps are faster than Java so I was surprised when I load tested node.js micro-service https://github.com/gengstrand/clojure-news-feed/tree/master/server/feed4 and compared the results with the same load test of this feature identical Java version https://github.com/gengstrand/clojure-news-feed/tree/master/server/feed3 and found the node.js service to have 40% lower throughput and from 19 to 34% higher latency. What could I have done to make this app faster?

2 comments

[ 2.8 ms ] story [ 17.1 ms ] thread
Use node cluster mode to run multiple processes to handle the requests so that you are using all the cores of the machine.
Thanks. That did improve the node.js performance. It now has comparable latency and only 16% lower throughput.