api icon indicating copy to clipboard operation
api copied to clipboard

Use node process manager to run the api

Open kachar opened this issue 4 years ago • 2 comments

At the moment we use node to run the main process, but this is not convenient as on every crash of the API another pod needs to be recreated which takes time.

We need to switch to a better process strategy

kachar avatar Oct 26 '21 14:10 kachar

Among the ones listed, I would recommend pm2 - I've used it in several projects and it is really easy to use and did the job right; the cluster mode is a big advantage that helps you scale across CPUs (which is important for single-threaded NodeJS processes).

Nodemon is more of a development tool, haven't used supervisord

kirilpopov avatar Oct 27 '21 19:10 kirilpopov

Do we want to setup PM2 in the Dockerfile by using pm2 enabled alpine as per the Usage section in here: https://hub.docker.com/r/keymetrics/pm2

igoychev avatar Nov 08 '21 17:11 igoychev