Different rates for different queries

I like to shape the load my load test produces to mimic the load we see in our production environment. For example, url/endpoint1 gets 5 request/sec and url/endpoint2 gets 10 requests/sec, etc. Now add in 25 endpoints all with different rates.

I’ve worked with Jmeter and Artillery in the past and both times I had to hack together something that sort of worked. I’m new to K6 and I’m wondering if there’s some nifty solution to this scenario that I haven’t discovered yet?

Hey! If I understand, you need two different scenarios for two different URLs. I did it like this k6-sampler/sample.js at main · otus-load/k6-sampler · GitHub

Yes that should do it. Thanks.

1 Like