In this video, take a look at PM2, a process manager for Node.js. This allows you to manage zero downtime clusters in production.
- [Instructor] In the last few examples,…we built our own simple cluster.…In the real world, there are already many tools…that we can use to help us manage clusters in production.…The tool I want to look at is called PM2.…PM2 is a no JS process manager.…It will allow you to manage…zero down time clusters in production.…Let's install PM2.…So, I'm in the terminal, in the exercise files,…under chapter one.…Chapter one, lesson six and I'm gonna go ahead…and run a sudo npm install…dash g PM2.…
And while PM2 in installing, let's go ahead and take a look…at our files within the start folder.…So we have a app dot js and this contains a web server…that will serve advice.…So this is a variation on the advice server that we used in…the third lesson in this chapter.…The difference with this advice server is on line 17…we're just also logging the process ID,…along with the advice, and we're no longer serving the port.…And then on line 22, this server is gonna…run on port 3000.…So this is the app that we're gonna split.…And every request should give us some random advice…
Released
10/16/2018- Cloning
- The scale cube
- Scaling the x-axis, z-axis, and y-axis
- Forking processes
- Implementing a database instance
- Database scaling
- Setting up horizontal partitioning
- Decomposing your app into microservices
Share this video
Embed this video
Video: Working with clusters with PM2