Sumit Bhanushali
Musings of Curious Software Engineer


Musings of Curious Software Engineer


Can your backend system handle a million requests per second?

Sumit Bhanushali's photo
Sumit Bhanushali
·Jan 31, 2023·

2 min read

As a backend developer, we all face questions like “Can your backend system handle a million requests per second”.

How can we give an approximate answer to this? We can’t replicate such a load locally and we certainly can’t test this on a live production server.

We can figure this out if we go to the basics like we know one server obviously can’t handle such load but a set of servers can. If we figure out how much load one server can take then we can add more servers accordingly using basic Math. For example, if one server can take 1000 requests per second then 1000 servers can take a million requests per second.

There are tools like JMeter and locust that can help to simulate such load on a single server. After you figure out that your system is not handling requests as it is required to, you need to figure out what component of your system you needed to upgrade.

Tools like Prometheus can help you monitor key components like CPU, RAM, Disk and Network to find out which component is lagging.

✅ Upgrade CPU if your server has to perform CPU intensive tasks such as video or image processing, also you should pick the right programming language like C++ or Rust

✅ Upgrade RAM if your server has high cache utilization or has APIs that need to maintain a heavy state like Report APIs

✅ Upgrade Disk if you are caching on Disk. Also, Disk speed is important when using tools like Kafka. You can exponentially improve the performance of Kafka by switching to SSD

✅ Upgrade Network Card in cases like streaming content like videos or logs which requires low latency

Share this