How it works
How much can your system take?
What the model assumes
- Each active person opens a page every 20 seconds. Each page makes 1 dynamic request (HTML or API) and fetches 8 static files (images, CSS, JavaScript).
- A dynamic request takes 40 ms of CPU and runs 4 database queries of 3 ms each. A static file takes 2 ms.
- Single server: one 4-core machine runs the application, the database and the static files.
- Scalable architecture: the CDN serves 95% of static files; 2-core machines switch on and off to stay near 50% usage (minimum 2, maximum 48); 85% of database queries are reads, and a cache answers 70% of them; the primary database (8 cores) takes every write and shares the reads with up to 3 identical replicas.
- New machines are ready instantly. In real life each one takes a while to boot and warm up, which is why predictable peaks such as Black Friday call for machines switched on ahead of time.
- Response time: each part is treated as an M/M/1 queue, a simplification (on the single server the whole machine is one queue; on the scalable one, the application and the database are two). Mean time is service time divided by (1 − usage), and p95 is about 3 times the mean. We add up the queues and 60 ms of network.
- Above 100% usage the queue grows without bound: the share of requests that doesn't fit becomes a timeout error.
These numbers are assumptions about a typical system, not measurements of a real one. They are for comparing the two architectures, not for sizing your system: for that, the right move is to measure with a real load test.
Why it matters
A post that goes viral or a Black Friday multiplies traffic in minutes. If the system doesn't scale, it goes down on the very day it would sell the most. And scaling doesn't mean paying a lot all year: machines switch on for the peak and off afterwards, and the panel shows how many are running at each moment.
Everything runs in your browser: the model is a pure TypeScript function (loadPose(people, architecture)), and the 3D scene, the numbers and the chart read from it every frame. That's why they never disagree.

