how to keep variables that share all node processes in node cluster?

前端 未结 6 2005
离开以前
离开以前 2021-02-02 12:17

It seems like all the node woker processes are working as if it is executing a new copy of the same application. But would like to keep some variables that are shared by all nod

6条回答
  •  青春惊慌失措
    2021-02-02 12:40

    Nobody has mentioned this yet but this is a perfect case for Node Worker Threads which just got out of experimental mode in the latest version of Node v11.11.0.

提交回复
热议问题