
Explore how to use NodeJS cluster for multi-core production, with PM2 for process management, RabbitMQ and Redis for messaging and caching, and Nginx as a reverse proxy and load balancer.
Use the current Node.js LTS version and Microsoft Visual Studio Code, with optional IDEs like WebStorm or Sublime Text. Install RabbitMQ, Redis, Nginx, PM2, and Nodemon using the provided links.
Explore Redis as an in-memory NoSQL key-value store, with data structures, caching, and pub/sub, in a Node.js cluster using PM2, including installation and basic set/get.
Configure nginx as a load balancer and reverse proxy for two Express API instances, using an upstream cluster, separate ports 3000 and 3001, and proxy_pass to distribute requests.
As we all know, Node JS is single threaded event-driven JavaScript runtime. When we run any CPU intensive operation, Node will not be able to take an advantage of all the cores of our machine. This is where we will use Node JS cluster to run Node JS in multiple cores. In this course you will see -
Why Node JS cluster is important?
How to create Node JS cluster application?
Using PM2 to run Node JS application
Communication between Master process and Child Process
Communication between Master process and Child Process using PM2 and RabbitMQ
Working with Redis cache
Using Nginx as a reverse proxy and load balancer
At the end of this course, you will be ready to use Node JS cluster with PM2, RabbitMQ, Redis and Nginx.