How do I handle lots of users?
Measure first, then add caching, background queues, rate limits and database indexes; save big changes like sharding for when the numbers demand it.
Scaling starts with numbers, not buzzwords. Track requests per second and response times as percentiles: the p95, the time 95 percent of requests finish within, shows the slow experiences that averages hide. Then fix the biggest bottleneck:
- Caching: keep popular data in memory or on a CDN (a network of servers close to users), with a clear rule for when it expires.
- Database: add indexes for common lookups, avoid running one query per item in a list, then consider read replicas.
- Queues: move slow work, like sending email, out of the request and process it in the background with retries.
- Idempotency keys: make retried requests safe, so a payment can't be charged twice.
- Rate limits: protect the service from bursts and abuse.
- Timeouts and fallbacks: don't let one slow dependency take the whole app down.
Make quick capacity estimates, from daily users to requests, storage and cost, before choosing tools. Many apps never need more than a well-indexed database and a cache.
Vumbli's System Design & Scaling track has you build each piece yourself, including an LRU cache, a job queue, rate limiters and consistent hashing, and ends with a design review of an AI-written service that would fall over at scale.
Start with these missions
- Think in requests per second and percentiles (System Design & Scaling)
- Caching 101: build an LRU cache (System Design & Scaling)
- HTTP caching and CDNs: pick the right Cache-Control (System Design & Scaling)
Tracks that teach it
More questions, answered by building