Capacity planning
Requests per second to concurrent users.
Turn request rate and response time into requests in flight, add think time to get concurrent users, or go the other way from users to requests per second.
Concurrent requests = requests per second x response time in seconds. Concurrent users = requests per second x (response time + think time). The same law, solved for users, gives requests per second = users / (response time + think time).
Your numbers
Result
Worked example
Matches the AWS Lambda guide: 100 requests per second at a 500 ms average duration is 100 x 0.5 = 50 concurrent requests. Double the rate to 200 per second at 250 ms and concurrency is still 50. For users, add a 4.5-second think time: 100 x (0.5 + 4.5) = 500 concurrent users. With 20% headroom, plan for 60 requests in flight. In reverse, 500 users with a 5-second cycle (0.5 s response + 4.5 s think) generate 500 / 5 = 100 requests per second.
How it works
Requests in flight is Little's law: L = lambda x W with lambda in requests per second and W the average response time in seconds. For interactive users the law is N = X x (R + Z), where X is throughput, R response time and Z think time (the interactive response time law). It assumes a steady load and a closed set of users who each wait for a response before the next request.
Use the peak, not the day's average, and note that "concurrent users" depends on how you define a user session. If a session lasts minutes between page views, use a long think time. A load test with no think time creates far more load than the same number of real users.
FAQ
How do I convert requests per second to concurrent users?
Multiply requests per second by the time one user spends per request cycle: response time plus think time. 100 requests per second with a 5-second cycle is 500 concurrent users.
How many concurrent requests is 1,000 requests per second?
It depends on latency. At 200 ms average, 1,000 x 0.2 = 200 requests in flight. At 2 seconds it is 2,000.
What is think time?
The pause between a user receiving a response and sending the next request. Setting it to 0 models a client that fires continuously.
Why does my real concurrency not match the formula?
The formula uses averages over a steady period. Bursts, slow outliers and retries raise peak concurrency, which is why a headroom percentage is offered.
Sources
Retrieved
- AWS Lambda Developer Guide: Understanding Lambda function scaling
- Wikipedia: Little's law (J. D. C. Little, Operations Research 9(3), 1961)
- University of Cambridge, Computer Systems Modelling: operational laws and bounds (interactive response time law)
Formulas are standard published results; the cited pages state them. Inputs, defaults and rounding are this tool's own. Runs entirely in your browser. Nothing you type is sent or stored.
Scope
Concurrency from averages is a starting estimate. Size from peak measurements and test under load.