DEV Community

Discussion on: Build a highly available Node.js application using Docker, NGINX and AWS ELB

Collapse
 
gayanhewa profile image
Gayan Hewa

Won't using PM2 type process manager solve the problem. ELB is able to deal with load balancing if you plan to spin up multiple boxes. But within the box request can be served via PM2 or node cluster these serve the requests over each process in a round-robin fashion.

Thread Thread
 
sowmenappd profile image
Sowmen Rahman

Thank you @gayanhew. To answer your question, yes it would! However, my intention for this video wasn’t to get into pm2, like I said above in my note before starting the tutorial. At the base level, both nginx and pm2 would handle distributing load to multiple app instances, and I chose nginx. If I had chosen pm2, that too would have worked but I’d have needed to explain clusters, processes and forking.

Thread Thread
 
gayanhewa profile image
Gayan Hewa

True, valid point.