Thursday, 16 May 2019

How do you delegate tasks to a specific cluster? (using PM2)

Hey guys,​I have a server with 4 CPUs and I have PM2 setup so that it spins up 4 clusters. This is great for scaling, but I have an issue with my current setup because right now, node just cycles through all the clusters for any old request. This is an issue when we do a bulk email process and basically clog up our system and stop any other requests from being processed for a little while. Is there a way that I can dedicate like 2 clusters to emailing functions and the other 2 clusters to all other activities?​Hopefully some of you node experts here can give me a little bit of guidance.

Submitted May 16, 2019 at 08:24PM by snahrvar

No comments:

Post a Comment