V
V
verycooldev2018-07-26 19:12:29
Nginx
verycooldev, 2018-07-26 19:12:29

Load balance using nginx and pm2 cluster - interchangeable or conflicting?

I have an application in NodeJS. But there is no certainty that it will be able to withstand a large number of visitors. Application behind nginx proxy.
I tried the standard load balance using nginx, everything seems to be simple.
There is also an option to run the application in a pm2 cluster.
I have little experience with DevOps, so the question arose - are these technologies interchangeable? Well, for example, instead of running an application in the pm2 cluster, I can run 2 applications and do load balance. Or are they different things? Can it work together and should it? What are the simple options for scaling an application without much effort for a non-specialist? Docker is difficult.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PloAl, 2018-07-26
@verycooldev

What's stopping you from testing?
1. nginx is a web server, pm2 is a process manager, load balancing is one of the functions of both programs.
2. What you can run and whether you can do balancing should be known only to you.
3. Maybe if there are several servers and there are several processes on each server. With one tool you balance between servers with the second between processes.
4. Did not work with nginx, pm2 (cluster) balancer is a black box and works only within one server. Often, connecting clients connect to one or two of the four processes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question