I am using Node.js with Firebase. I want to use all the cpu-cores, by using cluster-module. Do these two work together? As I have binded firebase nodes with event listeners and Firebase maintains socket between NodeJs and firebase. How can I use all CPUs of an instance (GAE).
Asked
Active
Viewed 1,014 times
1

Renaud Tarnec
- 79,263
- 10
- 95
- 121

kapoorji
- 158
- 12
-
Assuming you are using firebase as dbs for backend, use command `pm2 start app.js -i max` to use app cpu – georoot Mar 31 '17 at 13:28
-
yes, I am using firebase as DB and hosted the app on Google cloud. pm2 seems nice, I will definitely check it. – kapoorji Apr 01 '17 at 05:29
-
pm2 start app.js -i max this is fine, but I want to initiate only one firebase listener, not multiple. the above command will create x instances and x listener, equal to the numbers of core. – Nishant Aug 29 '17 at 13:13