Should You Use PM2, Node Cluster, or Neither in Kubernetes?

前端 未结 1 1314
离开以前
离开以前 2021-02-04 07:51

I am deploying some NodeJS code into Kubernetes. It used to be that you needed to run either PM2 or the NodeJS cluster module in order to take full advantage of multi-core hardw

1条回答
  •  甜味超标
    2021-02-04 08:35

    You'll achieve utilization of multiple cores either way; the difference being that with the nodejs cluster module approach, you'd have to "request" more resources from Kubernetes (i.e., multiple cores), which might be more difficult for Kubernetes to schedule than a few different containers requesting one core (or less...) each (which it can, in turn, schedule on multiple nodes, and not necessarily look for one node with enough available cores).

    0 讨论(0)
提交回复
热议问题