Rps on each stage

K6 Team, thank you for providing a great test tool. This is a feature request, which I think valuable.

I wish I could specify rps per stage, i.e. would be able to control the number of maximum requests on each stage in addition to the number of concurrent users. With this feature, we will be able to write scripts that have “peak” and “idle” stages. I think it is especially useful for running more realistic stress tests. What do you think?

Tami (Masaaki) Takamiya

1 Like

Hi, thanks for the feature request.

This is not supported in the latest k6 version, but work is underway in #1007 to introduce more flexible execution options. The new variable-arrival-rate executor might be useful for your use case, though this will affect iterations per second and not strictly requests per second. If your default function executes a single request then this would work as is, otherwise it presumably wouldn’t be much work to support variable RPS down the line as well.

Feel free to follow #1007 for updates. We expect it to land in master sometime in the next few months.

Thank you for the information. In addition to the variable-arrival-rate executor, the externally-controlled executor looks promising. For us, controlling RPS directly is easier, but definitely those new features would be helpful.

Tami (Masaaki) Takamiya

We finally released #1007 as a part of k6 v0.27.0 :sweat_smile: More information at Release v0.27.0 · grafana/k6 · GitHub and Scenarios