Scale your NodeJs Server to Utilize Full Resources

Node.js works in single-threaded, non-blocking performance, working as a single process in CPU. No matter how powerful server is used and the resources utilized, what a single-threaded process can do is limited. Node.js is designed for building distributed applications with multiple nodes, hence the name Node.js.

Workload is one of the main reasons we start scaling our application, including availability and fault tolerance among others. Scaling can be done in multiple ways, one of the easiest available solution is Cloning. We can perform cloning using Cluster Module provided by Node.js.

Before we start handling requests with our resource-utilized Node.Js …


The way in which JavaScript handles types is presumably the most misjudged and controversial part. People just consider “types” as in terms like C++ or Java, and since we don’t have as obvious of type in JS which shows up in syntax, the assumption is that JS’s type system is either naive (at best) or non-existent (at worst).

Many of us may think that the difference between “==” and “===” equality operator in JavaScript is that “==” compares two values and “===” compares the value and it’s type. It is the wrong concept to go by.

Tell me the difference…


Requiring a Module in NodeJs seems like a simple concept, you require a module using require(“module_name”) function and start working with it.

Modularity is the concept NodeJs is based on. Each module in Node has its own scope. A module cannot directly access things defined in another module unless it chooses to expose them. To expose things from a module, the module must be assigned to exports or module.exports. For a module to access another module’s exports or module.exports, it must use require().

When we require a module Node goes through following steps:

  1. Resolving, to find the absolute path of…

Biplap Bhattarai

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store