Q1.Open vs closed workload models: which k6 executors implement each?
Short answer: in a closed model a fixed number of virtual users loop, so when the system slows down, fewer requests are sent (constant-vus, ramping-vus). In an open model new iterations start at a set rate regardless of response time (constant-arrival-rate, ramping-arrival-rate). Real public traffic usually behaves like the open model.
export const options = {
scenarios: {
checkout: {
executor: 'constant-arrival-rate',
rate: 50, // 50 iterations started...
timeUnit: '1s', // ...every second
duration: '10m',
preAllocatedVUs: 100,
maxVUs: 400,
},
},
};
If k6 warns that it ran out of VUs, the target rate was not reached - raise maxVUs or check whether the system has already saturated.
