What is the difference between open and closed workload models in load testing?
AdvancedConceptCapacity, Load Testing & Chaos Engineering
Answer
- Closed model (
constant-vus,ramping-vus): a fixed number of virtual users, each waiting for its response before sending the next. When the system slows down, the request rate drops automatically, which hides the problem (coordinated omission). - Open model (
constant-arrival-rate,ramping-arrival-rate): requests arrive at a fixed rate regardless of response time, like real users on the internet. When the system slows, requests pile up and latency explodes, which is what happens in production.
For SLO validation of public services, use arrival-rate executors.
scenarios: { steady: { executor: 'constant-arrival-rate', rate: 200, timeUnit: '1s',
duration: '10m', preAllocatedVUs: 50, maxVUs: 300 } }
More on Capacity, Load Testing & Chaos Engineering
What is capacity planning in SRE?BeginnerWhat is N+1 and N+2 redundancy for capacity?BeginnerHow do you calculate how many instances you need?IntermediateWhat is the difference between load, stress, spike, soak and breakpoint testing?BeginnerWhat is k6 and why do SRE teams use it?BeginnerWrite a minimal k6 test with SLO thresholds.Intermediate