How to simulate thousands of users for load testing

Last updated on
Wednesday
November
2026
To simulate thousands of users, you don't open thousands of browsers. You run thousands of lightweight virtual users (VUs) from a load testing tool. Each VU replays a scripted user journey at the protocol level, with its own session, test data and think time.
The process: script the journey as code, convert your production traffic into an arrival rate with Little's Law, choose an open or closed workload model, ramp up to a steady state, and spread the load across several load generators once one machine saturates. Then judge the run on p95/p99 response time, error rate and throughput, not on the user count.
On an async engine like Gatling's, a single load generator can sustain up to 60,000 concurrent VUs or 300,000 requests per second, depending on the protocol and scenario. Benchmark your own scenario before relying on any per-machine number.
The hard part isn't generating thousands of users. It's making those users behave like real ones.
What "thousands of users" actually means
A virtual user is a scripted session that sends the same traffic a real client would: HTTP, WebSocket, gRPC or MQTT requests, with its own cookies, tokens and pauses. It doesn't render pages or run front-end JavaScript, which is why one machine can carry thousands of them.
"10,000 users" is ambiguous. It can mean four different loads:
Simulating 10,000 concurrent users is not the same as sending 10,000 requests per second, or serving 10,000 visitors a day.
Size the test with Little's Law
Little's Law links arrival rate and concurrency:
Concurrent users = arrival rate (users/s) × average session duration (s)
Example: your analytics show 50 new sessions per second at peak, and a session lasts 240 seconds. That's 50 × 240 = 12,000 concurrent users. If each session makes 30 requests, you need 50 × 30 = 1,500 requests/s on average.
Then add a peak factor for launches and sales (often 2 to 5× the daily average) plus headroom. Note what happens if the system slows down: sessions get longer, so concurrency climbs even when arrivals stay the same. That's exactly the effect your test needs to capture.
Open vs closed workload models
The workload model decides how load reacts when your system slows down, and it matters more than the VU count.
The closed model's blind spot has a name: coordinated omission. When the system slows, the load generator waits with it, sends fewer requests, and never records the delay real users would have felt. In a ScyllaDB benchmark, a closed-model run reported a p99 of about 249 µs. The latency-corrected open-model p99 was about 665 ms.
Rule of thumb: if real users don't wait for each other before showing up, use an open model. Gatling makes you choose explicitly with injectOpen and injectClosed, and refuses to mix the two in one injection chain (Gatling docs).
How to simulate thousands of users, step by step
The examples use Gatling's Java SDK. The same DSL exists in JavaScript, TypeScript, Kotlin and Scala.
1. Pick the journeys that matter
Start from production analytics, not a round number. Choose the business-critical flows and their mix, for example 70% browse, 20% search, 10% checkout. Write SLOs per journey before you write code: checkout p95 under 800 ms, errors under 0.5%.
2. Script the journey with realistic data
Each virtual user needs its own account, token and product IDs. Reusing one user gives you near 100% cache hits and flattering numbers. Correlate dynamic values (session IDs, CSRF and OAuth tokens) and add checks so a 200 error page isn't counted as a success.
Watch the feeder strategy. queue uses each record once, so 10,000 users and 2,000 accounts will exhaust the file. random never runs out but lets users share credentials. Size your data file to the test.
3. Define the load profile
Translate your Little's Law numbers into an injection profile: warm-up, ramp, steady state, then ramp-down. For a public app, use an open model:
At 50 arrivals/s and 240 s sessions, this settles around 12,000 concurrent users. If your goal is a fixed population instead, switch to a closed model:
This ramps to 10,000 concurrent users over five minutes and holds them for ten. Same headline number, very different behavior when the system slows.
4. Check the load generator first
Run a smoke test with a handful of users, then a small ramp while watching the generator's CPU, memory, network and GC. A saturated generator adds its own latency and caps throughput, so you end up measuring your test rig. Scale out before it saturates (next section).
5. Watch the system under test
Correlate test metrics with server-side telemetry from your APM or OpenTelemetry stack: CPU, memory, DB connection pools, queue depth, GC pauses, autoscaling events. Load test numbers tell you something broke. APM metrics tell you what.
6. Read percentiles and find the breaking point
Look at p50, p95, p99 and max, plus throughput and errors over time. Then push past your target in steps to see where SLOs fail and how the system degrades and recovers.
7. Automate it
Assertions turn the simulation into a pass/fail gate. Run it in CI/CD on every release and compare against a baseline, so regressions surface in a pipeline instead of an incident.
Scaling past one machine
How many machines you need depends mostly on how your tool maps virtual users to compute.
Thread-per-user tools (JMeter, LoadRunner) give every VU an OS thread. A VU waiting for a response or sitting in a pause still holds that thread and its memory, so CPU and RAM run out long before the network does.
Async, event-driven engines (Gatling, k6, Artillery) treat a VU as lightweight state. Gatling's engine is built on Netty: a waiting VU holds no thread, and a small thread pool serves all of them. It's also engineered around the physical limits of a load generator:
- About 64,000 sockets per local IP to one target: non-blocking I/O uses every available socket
- About 60 s TIME_WAIT before Linux reuses a closed port: persistent connections avoid burning through ports
- CPU-heavy TLS handshakes: BoringSSL and session reuse cut that cost
The result: up to 60,000 concurrent VUs or 300,000 requests/s on a single generator, depending on protocol and scenario. Cryptography in your own script (JWT signing, HMAC, mutual TLS) eats into that, so measure.
When you need distributed load
Scale out when a smoke-tested generator approaches CPU or network saturation, when you need traffic from several regions, or when the target sits behind a firewall. Gatling Community Edition runs on any machine you provision. Gatling Enterprise Edition adds distributed execution:
- Managed load generators: 10+ regions, with traffic weighted by region (for example 70% US, 30% EU) and optional dedicated IPs to allowlist in your WAF
- Private locations: generators run in your AWS, Azure, GCP, Kubernetes, OpenShift or on-prem environment, next to the system under test; the agent connects outbound to Gatling, so no inbound firewall rules are needed
- Automatic sharding: you write one injection profile, and Gatling splits it across generators and aggregates results into one report
For scale reference, Enterprise customers run 5M+ concurrent VUs on 20 load generators. Most teams need far less: the point is to add generators when the test requires it, not to maintain a fleet.
{{cta}}
Common pitfalls
A wrong model gives confident, wrong numbers. These are the mistakes that distort large tests more than tool choice does.
Reading the results
Reaching 10,000 users proves nothing on its own. Two hypothetical runs, same VU count:
Test ATest BVirtual users10,00010,000p95 response time350 ms3,800 msFailed requests0.2%8%Throughput4,000 req/s1,200 req/sVerdict (p95 < 500 ms, errors < 1%)PassFail
Both could be reported as "we tested 10,000 users." Only one system is ready. Judge every run on these performance testing metrics:
- Response time percentiles (p50, p95, p99): averages hide the slow tail your unhappiest users feel
- Throughput achieved vs target: if requests/s plateaus while users keep rising, requests are queueing
- Error rate and type: 5xx, timeouts and 429s each point to a different bottleneck; declare expected statuses so a planned rate limit isn't counted as failure
- Active users over time: in an open model, a climbing curve at constant arrivals means sessions are getting slower
- Server resources: CPU, memory, DB pool, GC and queue depth show the cause behind the symptom
- Generator health: proof the test itself is trustworthy
For AI and LLM-backed endpoints, also track time to first token, tokens per second and cost per run.
Tools that can simulate thousands of users
Every tool below can reach thousands of users. They differ in scripting language, concurrency model and whether distributed execution is free.
How to choose: match the language your team already writes, check protocol coverage (gRPC, WebSocket, MQTT, Kafka), check whether scale-out is free or paid, and benchmark your own scenario on one generator before trusting any vendor's VUs-per-machine figure, including ours. For deeper comparisons, see JMeter alternatives and Gatling vs k6.
Who needs to simulate thousands of users
Large-scale load testing pays off where traffic spikes at predictable moments, like Black Friday, and where failure has a direct revenue, legal or safety cost.
What teams reach with Gatling
Start with one realistic test
Simulating thousands of users is easy. Simulating them accurately takes the right workload model, realistic data, a healthy load generator and SLO-based pass/fail criteria. Start with one critical journey, size it with Little's Law, and grow from there.
About the author
FAQ
FAQ
Multiply your peak arrival rate (new sessions per second) by the average session duration in seconds. 50 sessions/s × 240 s = 12,000 concurrent users. Then add a peak factor and headroom.
Usually, with an async engine. Gatling can sustain up to 60,000 concurrent VUs or 300,000 requests/s per load generator, depending on protocol and scenario. Thread-per-user tools typically need several machines for the same load.
No. Concurrency counts active sessions; throughput counts requests. 10,000 users with realistic think time might generate 1,000 to 2,000 requests/s.
Open for public websites and APIs, where new users keep arriving regardless of response time. Closed only when real concurrency is capped, such as a call center or an admission queue.
Related articles
Ready to move beyond local tests?
Start building a performance strategy that scales with your business.
Need technical references and tutorials?
Minimal features, for local use only




