Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

nodejs服务端应该启动【多进程】还是【一个进程多线程】?

如何选择 cluster 和 worker_threads


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

可以参考一下这里:https://stackoverflow.com/que...
和这里
https://soshace.com/advanced-...

多线程和多进程各有优缺点,关于它们的比较网上有很多讨论,具体怎么选择还是看业务的场景。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...