Q27 of 38 · Performance
How do you design a realistic workload model for a load test?
Short answer
Short answer: A workload model defines who your virtual users are, what they do, in what proportion, and at what pace. Derive it from production access logs or analytics — not from guessing. A load test that does not match real traffic patterns produces misleading results.
Detail
The workload model has four components.
User mix (transaction mix): what percentage of users perform each action? If production logs show 40% browsing, 30% searching, 20% viewing product detail, 10% completing a purchase — those percentages define your virtual user scenarios.
Think time: the pause between user actions. Real users do not click instantly. Calculate mean think time from session recordings (time between requests). Omitting think time artificially concentrates requests and makes the test more aggressive than reality.
Arrival rate vs concurrency: decide whether your test models open (users arrive at a rate regardless of system response) or closed (a fixed pool of VUs, each waiting for a response before making the next request) workload. Most real web traffic is open — users arrive whether or not the server is keeping up.
Ramp-up: start at 10–20% of target load and increase gradually. This catches regressions at lower load levels and avoids a cold-start spike that is not representative of production.
// WHAT INTERVIEWERS LOOK FOR
// Related questions