...

/

Measuring Load and Performance

Measuring Load and Performance

Learn how to measure load and performance in a distributed system.

Scaling a system is critical to coping with the increasing load imposed on it. For example, think of our hypothetical My Cool App’s growth—it is now a billion-dollar company.

Initially, when the My Cool App had a few hundred concurrent users, handling the load using 33 to 55 nodes with a decent amount of resources was not an issue. Life was simple and beautiful.

Things changed with the fame of the app. More and more people started to use My Cool App and within a short period of time, the system started to see 100k100k concurrent users. This increased load definitely requires scaling.

Note: To scale a system, you need to define the load and performance of your system. Based on the numbers you see, you decide whether to scale your system, and how far you should go with scaling.

Let’s discuss load and performance measurement.

Press + to interact

Measuring load

How can we measure load in a distributed system?

The answer depends on our system type. Let’s see a few measurement techniques.

Queries per second (QPS)

One common method of load measurement is to calculate queries per second (QPS), also known as requests per second (RPS).

This basically means how many queries or requests a node needs to handle each second. For example, say a server receives 10M10M requests per day. Then we calculate the QPS as

QPS=1000000246060=11.57QPS = \frac{1000000}{24 * 60 * 60} = 11.57

This is roughly 11.611.6 requests per second. So we consider this value the QPS of the node.

Now, this is a very simple measurement. If the requests are uniformly distributed over ...