node.js - node开多个进程,但是脚本都是监听一个端口,如何解决
PHPz
PHPz 2017-04-17 15:55:04
0
3
646

因为想充分发挥多核CPU的优势

PHPz
PHPz

学习是最好的投资!

reply all(3)
巴扎黑

Use pm2, it can help you start multiple service threads, utilize the server's CPU as much as possible, and ensure that the process is always alive and reloaded in 0 seconds.
For specific usage, you can google it yourself.
Official website address: http://pm2.keymetrics.io

PHPzhong

To take full advantage of multi-core CPU, please use go

PHPzhong

The native cluster module has already solved this problem for you.
Reference: https://cnodejs.org/topic/56e...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template