0

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

2

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.

|improve this answer|||||
  • I think you sort of nailed the goal..determine the point at which degredation is unacceptable. If the user response under no load situation is 900ms, 1 second for sake of the discussion, and if we deem the 'max' acceptable response time to be 5 seconds.. what number of 'concurrent' users does it take to hit that. For example, if we keep increasing users until we get 5seconds response and that.. for the sake of argument is 32 requests per second.. then that means the current system, as configured, can handle 200 'concurrent' users... but the question is what does that translate to actual users? – Raphael Jan 9 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.