Stage 1: Single server
Every product starts here: one machine runs the web app, API, and database.
StreamHub at launch (2024)
- Stack — Node.js monolith + Postgres on one VPS.
- Users — ~500 DAU, friends and early creators.
- Bottleneck signal — none yet; simplicity is the feature.
- Ops — one deploy script, one backup cron.
# Deploy v0 — literally one box
ssh streamhub-prod
git pull && npm run build && pm2 restart api
pg_dump streamhub > /backups/$(date +%F).sql
This is correct engineering for the stage. Premature distribution adds failure modes without users to justify them.
Stage 2: Separate web and database
When CPU contention appears, split the database onto its own host (or managed RDS). The app tier can still be one instance.
StreamHub hit this at ~5K DAU when nightly analytics queries slowed live uploads.
Stage 3: Load balancer + multiple app servers
Horizontal scaling begins when one app process cannot handle concurrent connections.
AWS ALB → EKS traffic path
- Session state moves to Redis.
- File uploads go to S3 (not local disk).
- Health checks remove unhealthy instances automatically.
POST /api/v1/videos
Authorization: Bearer <token>
Content-Type: application/json
{ "title": "Sunset timelapse", "s3_key": "uploads/tmp/abc123" }
At 50K DAU, StreamHub ran four API instances behind an ALB in one region.
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 5 sections
- Stage 4: Database read replicas + cache
- Stage 5: CDN + object storage
- Stage 6: Async workers + message queue
- Stage 7: Database sharding + multi-region
- Evolution principles
Test yourself
Answer these before moving on — recall is what makes it stick.