Calculating concurrent users



  • I have read a few posts and there was a time I know this.. but anyone have the equation for calculating representative concurrent users, for performance testing, for micro service based solution.

    if the API takes 900ms to respond, and the think time for an average user is 5 seconds (between requests) .. how do I calculate the concurrent users?

    Most of the discussion I have seen were based on page loads and carts and such. Any suggestions would be appreciated



  • Most probably you're looking for Little's Law

    Little's Law tells us that the average number of customers in the store L, is the effective arrival rate λ, times the average time that a customer spends in the store W, or simply:

    L = λW
    

    I also think that your question is a little bit vague as "concurrent users" will be the number of threads/virtual users you define in your load testing tool, the other question is how many hits per second they will generate.

    For example:

    • Given response time of 900 ms and 5 seconds of think time between requests 1 user will perform 10.16 calls per minute 60 000 ms in minute / (5000 + 900) time to execute 1 request
    • It means that 1 user generates 0.16 requests per second
    • Given the system scales normally (response time doesn't increase as load increases) 100 users will generate 16 requests per second, 200 users 32 requests per second, etc.

    This is probably the "concurrency" you're looking for.


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2