In NodeJs, Why my last forked worker process handle request every time, Although 7 worker process remain ideal?
I want to use cluster module to run express server side by side using worker process. Here is my complete script.
I want to use cluster module to run express server side by side using worker process. Here is my complete script.
As you can see with the sample code below, I’m using Puppeteer with a cluster of workers in Node to run multiple requests of websites screenshots by a given URL:
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 node workers (child processes) in node cluster. Is there a simple way to do this?