node.js - Nodejs为后台的Web App如何保证服务的稳定性和高响应效率?
阿神
阿神 2017-04-17 15:32:18
0
2
646

如题,我们公司是全栈JS开发,后台用的NodeJs。
听说NodeJs是单线程的,容易出现单点故障,而且不能充分使用机器的CPU。
那我们在选购云服务器的时候,是否应该“多买低配置机器”,而不是像PHP服务器那样“买一个高配置机器”?

阿神
阿神

闭关修行中......

reply all(2)
巴扎黑

This article can help you understand

http://f2e.souche.com/blog/no...

黄舟
  1. Single-threaded but can run multiple processes, it can be fully utilized. It depends on how many cores your machine has

  2. For online deployment, you can look at pm2. Generally speaking, node deployment is in master-slave mode. One master process has several sub-processes. For example, the one we use is older, forever, and the master is responsible for monitoring. , if the child process hangs, the master will restart it, and there will be no so-called single point of failure

  3. I haven’t deactivated the cloud server, so it’s not easy to answer

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