Grafana K6 spike config for a passage at television


We have a TV appearance on my company this sunday.
I am writing spike test for it and wondering if my scenario is good.
Knowing that we expect a traffic of 10.000 users .
What I am doing:

import http from 'k6/http';
import { sleep } from 'k6';

export let options = {
   stages: [
       { duration: '5s', target: 10000 }, // Ramp-up to 10,000 users over 10 seconds
       { duration: '60s', target: 10000 }, // Stay at 10,000 users for 1 minutes
       { duration: '5s', target: 0 }, // Ramp-down to 0 users over 1 minute

export default function () {

Hi @billmetangmo1, sorry for the slow reply :bowing_man:

I would argue this might be a bit … too much, but if you intend on testing that 10 thousand users will all connect within 5 secodns this seems okay.

I will argue that you can also use http.batch to lower the number of VUs used instead of just bumping VUs numbers. This is as VUs while farily cheap (you can definitely run 10k even on a laptop) are not free so there likely will be some problems.

What you are doing seems like a spike test and reading more of that page will likely help you decide if this is a good or not so good test for you.

Again this depends a lot on what you are actually testing and for that we will need a lot more info. You can also look at the executors documentation to see which executor is good for what. In your script you are using some shorthand options to configure Ramping VUs btw.

Hope this helps you