0

I have a get api that gives data pertaining to a store based on the storeid passed in the api endpoint. The implementation is such that if more than 50 hits in a second, the api is throttled and a message ought to be displayed as 'Throttled, wait 7 seconds' wth http code 503

When I simulate with 100 hits or even 200 hits via JMeter the spi gives 200 every tine and there's no throttling but when I simulate the same via shell the api gets throttled properly most 50 responses and the aforementioned throttled message is displayed.

What could be the reason?

1 Answer 1

1

My expectation is that you really don't send 100 or 200 hits per second with JMeter, the actual throughput is less therefore you are not getting errors.

Double check how many requests per second are actually being made using i.e. Transactions per Second and/or Server Hits Per Second listeners. If you don't see real requests going above 50 - you will need to increase number of threads (virtual users) in Thread Group accordingly.

Or even better switch to Concurrency Thread Group and Throughput Shaping Timer combination. Given you connect them via Schedule Feedback Function JMeter will automatically kick off extra threads to reach/maintain the desired throughput.

Last 2 cents:

1
  • Dmitri: The number of threads is 200 and ramp up time 1 sec. Why do you then doubt that it isn't really a 200 hits per second simulation? Commented Aug 2, 2018 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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