How throttle affect Users workflow

Hi, I have a use case where one user will have to execute 7 APIs, with a desired QPS is 1, and System loaded with 50 Users, so I set up the scenario:

          .inject(rampConcurrentUsers(1).to(50).during(100 seconds),
                  constantConcurrentUsers(50).during(500 seconds))
          .throttle(reachRps(1) in (2 seconds),holdFor(10 minutes))
    httpScenarios("scn"): _*)
    .maxDuration(10 minutes)

Observing results, I notice that the differences between API executed as below, base on behavior, it would execute first two APIs for all 50 Users, then it will continue moving on to next API, and so on.

---- Requests ------------------------------------------------------------------
> API 1                                     (OK=83     KO=0     )
> API 2                                     (OK=83     KO=0     )
> API 3                                     (OK=73     KO=0     )
> API 4                                     (OK=61     KO=4     )
> API 5                                     (OK=61     KO=5     )
> API 6                                     (OK=60     KO=0     )
> API 7                                     (OK=56     KO=0     )

All of the APIs sharing a range response time of [100; 150]ms, so it is not possible for any APIs to return slow response. Is this the correct behavior of throttle ?

Only use throttling with single request scenarios. Otherwise distribution between requests is likely to be unbalanced.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.