From 1 Server to 10M Users: Scaling Ladder
Grow a web app across four clear stages from 100 users to 10M+, and see why premature sharding sinks intern interviews.
In this lesson (4 bite-sized sections)
Start small, then earn every extra box
One of the fastest ways to fail an intern or new-grad system design round is to draw Kafka, a sharded database, and three global regions at minute five. When you pile on components before traffic breaks anything, interviewers hear pattern-matching rather than engineering judgment. Strong early-career candidates start with the simplest system that works and add each new box only when a concrete limit forces it.

At Stage 1 (100 users), one application server and one database handle everything. You can even run both on a single virtual machine or pair one app box with a tiny managed database. Deployments are trivial, requests take almost zero internal network hops, and debugging stays inside one log stream. For a launch prototype or small campus tool, adding distributed infrastructure here wastes engineering time and introduces failure modes you do not have traffic to justify.
Stage 2: 10K users and the first real split
As daily traffic climbs into the thousands, two bottlenecks show up before anything else. First, serving images, stylesheets, and video clips straight from your web server saturates its network bandwidth and ties up worker threads. Second, growing read queries start competing with writes for CPU and disk I/O on your single database instance.
The lean upgrade has three moves: split the database onto its own managed host so web and data tiers scale independently, put a CDN in front of static assets so edge servers near users absorb file traffic, and attach a read replica to handle read-heavy dashboards and feeds. Writes still go to one primary database, which keeps your data model and transactions simple.
| Stage | Active users | What breaks first | Components you add |
|---|---|---|---|
| Stage 1 | ~100 | Nothing yet; keep shipping fast | 1 app server + 1 relational DB |
| Stage 2 | ~10K | Static bandwidth and DB read load | Managed DB + CDN + read replica |
| Stage 3 | ~1M | Single app CPU, DB read QPS, slow jobs | Load balancer + stateless fleet + Redis + async queue |
| Stage 4 | 10M+ | Primary write ceiling and zone outages | Database sharding + multi-AZ or multi-region |
Stage 3: 1M users and stateless horizontal scale
Around one million users, upgrading to a bigger machine (vertical scaling) hits hardware limits, and running one application server leaves you with a single point of failure. To scale horizontally, add a load balancer and run multiple identical app servers behind it. That only works cleanly when app servers are stateless: move login sessions out of local process memory into a shared in-memory store like Redis so any server can handle any user request.
At this rung, repeated hot reads (trending items, user profiles, session lookups) also overwhelm read replicas. Putting Redis in front of the database cuts hot read latency from milliseconds to under a millisecond. Finally, decouple slow background work such as sending emails, resizing uploads, or building reports by pushing jobs onto an async message queue consumed by separate worker processes, keeping user-facing API responses fast.
Stage 4: 10M+ users, sharding, and interview restraint
Once write volume saturates a single primary database or a data center outage breaks your uptime
target, you finally reach Stage 4. Here you shard (partition) the database across multiple
primaries using a thoughtful shard key such as user_id or tenant_id, deploy stateless and
stateful tiers across multiple availability zones (multi-AZ) for automatic failover, and expand
to multi-region serving when global latency or disaster recovery requires it.
In an intern or new-grad interview, your biggest advantage is narrating the trigger before adding any box. Say out loud: "At 10K users one primary database with a CDN is plenty; once hot reads climb toward 1M users I will introduce Redis and stateless app servers behind a load balancer." That single habit proves you design from real constraints instead of reciting buzzwords.
Match each architecture upgrade to the scaling stage where it first earns its keep.
Sort 5 more items to check
Sources: AWS Well-Architected Performance Pillar · Scaling Memcache at Facebook · Designing Data-Intensive Applications, ch. 1
import math
def plan_architecture(name, dau, reqs_per_day=20, read_ratio=0.9, peak_factor=3):
avg_qps = dau * reqs_per_day / 86400
peak_qps = max(1, math.ceil(avg_qps * peak_factor))
read_qps = round(peak_qps * read_ratio)
write_qps = peak_qps - read_qps
app_nodes = max(1, math.ceil(peak_qps / 500))
if dau < 5_000 and peak_qps < 20:
stage = "Stage 1: 1 app server + 1 relational DB"
elif app_nodes == 1 and read_qps < 500 and write_qps < 200:
stage = "Stage 2: Managed DB + CDN + 1 read replica"
elif write_qps < 2_000 and dau < 5_000_000:
stage = f"Stage 3: LB + {app_nodes} stateless nodes + Redis + async queue"
else:
stage = f"Stage 4: {app_nodes} nodes + sharded DB + multi-AZ"
read_tier = "Redis + replica" if read_qps >= 500 else ("1 read replica" if dau >= 5_000 else "primary DB")
print(f"{name:15} | peak={peak_qps:>6} req/s (R:{read_qps}/W:{write_qps}) | {read_tier}")
print(f" -> {stage}")
# Edit DAU or read_ratio below and click Run it to see when each stage flips.
for app in [
("Campus club", 250, 15, 0.85),
("Event tickets", 15_000, 25, 0.90),
("Course reviews", 1_200_000, 20, 0.95),
("Global social", 15_000_000, 40, 0.80),
]:
plan_architecture(*app)Apply
Your turn
The task this lesson builds to.
Walk a campus study-group web app through all four scaling stages from 100 users to 10M+ users, naming the bottleneck that triggers each stage and the exact component you add.
Think about
- What breaks first at 10K users when everything runs on a single box?
- Why must user sessions leave local app memory before you add a load balancer at 1M users?
- Which write or availability pressure finally justifies database sharding and multi-AZ at 10M+ users?
Draft your design answer here Save your draft, compare against the model answer, and track progress.
Practice
Make it stick
A second problem on the same idea, so it survives past today.
Explain how you would evolve a college course-review site from 500 students during registration week to 5M users across universities, including what you intentionally leave out at launch.
Think about
- Why is registration week a read-heavy spike, and which Stage 2 and Stage 3 levers absorb it cheaply?
- What stays deliberately unbuilt at 500 users so you ship cleanly without operational drag?
- At 5M users across schools, what shard key keeps most course-listing queries on a single partition?
Draft your design answer here Save your draft, compare against the model answer, and track progress.