...

/

An Introduction to Application Scaling

An Introduction to Application Scaling

Get familiar with the basics of application scaling in Node.js.

Scalability can be described as the capability of a system to grow and adapt to the ever-changing conditions. Scalability isn’t limited to pure technical growth; it’s also dependent on the growth of a business and the organization behind it.

If we expect our product to reach millions of users worldwide rapidly, we’ll face serious scalability challenges. How is our application going to sustain the ever-increasing demand? Is the system going to get slower over time or crash often? How can we store high volumes of data and keep I/O under control? As more people are hired, how can we organize the different teams effectively and make them able to work autonomously, without contention across the different parts of the codebase?

Even if we’re not working on a high-scale project, that doesn’t mean that we’ll be free from scalability concerns. We’ll just face different types of scalability challenges. Being unprepared for these challenges might seriously hinder the success of the project and ultimately damage the company behind it. It’s important to approach scalability in the context of the specific project and understand the expectations for current and future business needs.

Because scalability is such a broad topic, we’ll focus our attention on discussing the role of Node.js in the context of scalability. We’ll discuss several useful patterns and architectures used to scale Node.js applications.

With these patterns and architectures in our toolbelt and a solid understanding of our business context, we’ll be able to design and implement Node.js applications that can adapt and satisfy our business needs and keep our customers happy.

Scaling Node.js applications

We already know that most of the workload of a typical Node.js application runs in the context of a single thread. This isn’t necessarily a limitation but rather an advantage, because it allows the application to optimize the usage of the resources necessary to handle ...