Throttling Questions

I like the idea of using “throttle” to control my load generation. But in order to decide if it is appropriate, I need to understand it a little better.

  1. If the scenario being throttled has a large number of requests in it, is it looking at average requests sent per second to do the throttling? Or is it more naive and just looks at scenario starts? Is it throttling individual requests, or only new user generation?

  2. Correct me if I am wrong, but the scenario should not control its duration through looping, the throttling handles that, yes? So, no .during( SOME_TIME ) { chain }

  3. If I wanted a mix of users doing flow X, Y, and Z, I could have a single scenario that uses a .randomSwitch or a .uniformRandomSwitch, picking one of the flows, and then exits. The throttling will start new users as needed in order to hit the target throughput

  4. So what happens if I choose an RPS that the application can not handle? For example, if the most it can do is about 180 RPS and I ask it to do 200 RPS?

What else should I know about throttling?

And if I don’t use throttle, but I want to have a scenario where individual flows are short, but I want the load to be sustained for a long time, do I embed a loop in the scenario, or is there a way to tell the scenario (or the simulation) to keep restarting users as necessary to maintain the target concurrent user count?

To make it more concrete, say I have a short scenario: Log in, check my account balance, log out. Takes 5(ish) seconds. I want to sustain an ever increasing load on the server for a long period of time. Let’s say growing the concurrent user count by one user per minute for 100 minutes, then sustaining it for 30-45 minutes, then kill them all and end the scenario (no ramp down). Is there a way besides using the looping constructs to do that?

Throttling is disconnected from injecting, looping, etc. It disables pauses though.
What it does is introduce a global throttler. Every second, excessive requests are queued.

Nice. So if you have a short scenario that you need to inject continuously in order to generate load, how do you normally do it?

Depends on your load model:

  • open model = new users arriving every second, see inject. That means new connections, so you might run out of ports depending on how fast they start and stop.

  • closed model = repeat loop.