Hello guysI have a node app that's starting to get pretty popular. I need to upgrade to a Digital Ocean Droplet (=VPS) with 4 CPUs.In order to run one instance of the node app on each CPU, I'm going to use Pm2 with cluster mode.Now, I have two questions :1) My app has a method called every 5 minutes that call an external API and update the database. If I run 4 instances of the app with PM2 cluster, will every instance call this API and update the db ?2) I want only one app to run this external API call +db update, not the 4 of them, how can I handle this ?Thanks guys
Submitted December 11, 2017 at 02:52PM by OogieFrenchieBoogie
No comments:
Post a Comment