Understanding pacing & forever loop in simulation

I’ve been trying out different workloads to understand how Gatling user & load patterns form

I’ve been using the below code

val httpProtocol = http

val userScn = scenario(“users”)


My understanding here is that I should get 3 users executing the request every 1 second for 20 seconds max, so in total, I should get 60 requests
But I’m getting only 3 requests triggered overall

is my understanding wrong here?
if so, pls explain how it works

Sujin Sam


You are absolutely right.
There are ~60 requests tried… but a user will cache its previous request as the endpoint you’re calling has a Cache-Control header.

So, for each user, when created, has an empty cache.
First request: no cache, so when the virtual user perform the request, it actually calls the server (3 users, so 3 requests)
For next requests, the cache is present, so the virtual user perform the request by getting the response from the cache.


I forgot to mention disableCaching in your protocol definition if you want to see your ~60 requests.


Ah, forgot about that, Thanks Sebastien
Was plucking my head for 2hrs :slight_smile: