Answer the question
In order to leave comments, you need to log in
How to create a technical page for a site on nodejs?
There is a site that runs on nodejs, and which needs to be updated periodically. At the time of the update, I want to show visitors a technical page with relevant information. What is the easiest way to organize the switching of such a site to a technical mode. What are good practices?
Answer the question
In order to leave comments, you need to log in
Have you seen this mode on Google or Facebook?
Deploy the new version side by side and then switch upstream. Without downtime.
For good, there should be a proxy in front of the node. Here on it you can do balancing, switching between nodes or maintenance mode.
Use pm2 in cluster mode, not only will it re-raise dead processes, it will also solve your problem:
When you give a command pm2 restart app-name
, it restarts processes in turn (1 extinguished, 1 started, 2 extinguished, 2 started, ...)
How result - we work without downtime
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question