Hey @tiagotaq2,
Welcome to our community, thanks for sharing your question here
Shouldn’t they be the same?
“Yes” (between quotes), you’re almost right!
By having a quick look at the script, the intuition says that they should be the same, indeed.
However, what I suspect is happening here, and likely confirmed by the fact that the total number of HTTP requests is basically 2x the amount of iterations, is that the test.k6.io
enforces the use of HTTPS.
So, on each iteration, the VU is receiving a 308 Permanent Redirect
pointing to the same domain, but secure, as response to the first request, and following such redirection, performing a 2nd request per iteration.
You can easily confirm that by either:
- Using
https://test.k6.io
instead ofhttp://test.k6.io
. - Setting
redirects
to0
from HTTP params: see docs. - Setting
maxRedirects
to0
from k6 options: see docs.
I hope that helps you clarify what you’re experiencing and to understand why it happens.