58: Scalability in Software Systems

Defining the system load and performance is important to understand scalability. Scalability is the system’s ability (performance) to cope with increased load. The load doesn’t say anything when it’s used alone. The load can be anything, depending on the system’s architecture. For Twitter, as an example, it can be the number of tweets posted in a second or the number of tweets read in a second.

Scalability: Ability for the system to perform and operate as the number of users or requests increases. — Fundamentals of Software Architecture

Scalability is not a label that we can define a service as scalable. Scalability means thinking about the strategies to deal with the growing load.

When we try to understand how scalable the system is, we usually ask questions like, “How does the system perform when it gets 10x more load than now?” and “How can we add more resources to cope with the increasing load?”

Before we look at the strategies to handle the increasing load, we have to understand how we measure the scalability and what load and performance mean.

The capacity of a system is often measured by throughput and response time. Throughput means the number of operations processed per second; response time means the time between request and response.

Defining the load depends on the system. As Martin Kleppmann explains in Designing Data-Intensive Applications,

The load can be described with a few numbers, which we call load parameters. The best choice of parameters depends on the architecture of your system: it may be the requests per second to a web server, the ratio of reads to writes in a database, the number of simultaneously active users in a chat room, the hit rate on a cache, or something else.

Once we know the load, we can understand the capacity of the systems.

Understanding Distributed Systems;


Don’t confuse it with Elasticity which is mentioned in the Fundamentals of Software Architecture by Mark Richards & Neal Ford

There are different types of scaling. It’s crucial to understand Horizontal vs Vertical Scaling.

Load Balancer is required in Horizontal Scaling.

Scalability in Cracking the Coding Interview gives a good overview of concepts related to Scalability and System Design.

It’s all trade-offs.

How does it work in Microservices architecture? Read the Building Microservices book on page 216.


This note is mentioned in:

48.

If you're unfamiliar with Zettelkasten: These notes are atomic. The aim is to have one idea in a note. The connections between notes are as important as the notes themselves.

Reply via email

or comment below.