search

Home  >  Q&A  >  body text

node.js - Can a single-core CPU use cluster to open multiple threads?

In order to reduce the chance of downtime. I plan to use node's cluster module to enable multi-threading. One master thread is responsible for scheduling, and multiple worker threads are responsible for processing business.

Now the server's CPU only has a single-core CPU, which should be able to have multiple worker threads, right?

My thinking: A single-core CPU can have multiple parallel processes. Each process can start a node instance to achieve the above effect.

天蓬老师天蓬老师2710 days ago1025

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-06-27 09:21:14

    No, one core and one cluster

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-27 09:21:14

    cpu to worker1:1

    reply
    0
  • 某草草

    某草草2017-06-27 09:21:14

    cluster does multi-process, one core and one process

    reply
    0
  • Cancelreply