|
|
|
|
|
by distracteddev90
3699 days ago
|
|
The benchmarks for node.js are terribly misleading. The node.js implementations only ever spawn a single process, and thus node is only running on a single core and uses only a single thread. Specifically, the http server example(1), doesn't even bother using the standard library provided Cluster module(2). Cluster is specifically designed for distributing server workloads across multiple cores. All node.js services/applications I've worked on in the past 3 years (that are concerned with scale) utilize a multi-process node architecture. The current benchmark can only claim that a single python process that spawns multiple threads is 2x faster than a single node.js process that spawns only one thread. This fact may be interesting to some, but is irrelevant to real world performance. [1]: https://github.com/MagicStack/vmbench/blob/master/servers/no... [2]: https://nodejs.org/api/cluster.html |
|
Yes, in production you should run your nodejs app in cluster, your Python apps in a multiprocess configuration, and you should never use GOMAXPROCS=1 for your go apps in production!
Running all benchmarks in multiprocess configuration wouldn't add anything new to the results.