Urgent.News

What's breaking now, across thousands of outlets.

Tech

Concurrent users vs requests per second: the load test mistake that makes results look too good

A requirement lands on your desk: "The system must support 10,000 concurrent users." It sounds precise. It isn't. Depending on what those users do, it means anything from ~670 to ~12,000 requests per second . And the way most people then load test it hides the exact moment the system starts to fail. Let's fix both. Three numbers that get mixed up Concurrent users: people with your app open right…

The article highlights a common mistake in load testing: confusing concurrent users with requests per second. A requirement for a system to support 10,000 concurrent users isn't precise, as it could translate to anywhere from 670 to 12,000 requests per second, depending on user activity. The key issue is that most users don't send requests constantly; they're usually just reading or typing.

The article explains that load testing tools can generate traffic in two ways: a closed model, where a fixed pool of virtual users repeatedly send requests and wait for responses, and an open model, where new users arrive at a fixed rate regardless of the system's response time. The closed model can make a system appear stable when it's actually struggling because the load decreases as the server slows down.

This discrepancy is known as coordinated omission, where the load generator omits crucial requests that would have strained the system the most.

To accurately assess a system's performance, the author recommends using the open model, which models the arrival rate of users, even if earlier ones haven't finished their requests. To do this, one needs to gather data from analytics or access logs on how often users act and how many requests each action costs. With this information, you can convert concurrent users to requests per second and identify the true capacity of your system.

The article also delves into Little's Law, which states that requests in flight (simultaneous) equal RPS (requests per second) multiplied by average response time. This law helps to understand why even a small slowdown can lead to a significant increase in the number of simultaneous requests, potentially causing a system to reach its limit.

For a more realistic load test, the author suggests testing at 2-3 times the peak traffic observed during the busiest hour of operation. This will provide a better understanding of the system's behavior under heavy load and help identify its true limits.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Your Drupal node page says 403. Your RSS feed doesn't care

I ran into a bug where private content leaked even though a node access hook was already in place. Opening the node directly returned 403, exactly as intended.

  • Private content leaked through RSS feed
  • Node access hook ineffective
  • Drupal's access systems not synchronized

More from Thursday 22 October →