| Users | Common Anti-patterns | Impact | Signs to Watch |
|---|---|---|---|
| 100 users | Monolithic design, no caching, tight coupling | System works but slow response under load | Slow page loads, high CPU spikes |
| 10,000 users | Single database instance, no load balancing, synchronous calls | Database overload, server crashes, slow API responses | Timeouts, increased error rates |
| 1,000,000 users | No sharding, no horizontal scaling, ignoring eventual consistency | Database bottleneck, network congestion, data loss risk | High latency, frequent downtime |
| 100,000,000 users | Ignoring microservices, no CDN, no caching layers | Massive delays, huge infrastructure costs, poor user experience | System outages, slow global access |
Anti-patterns to avoid in LLD - Scalability & System Analysis
At small scale, the database is the first to struggle because it handles all requests directly without caching or replicas.
As users grow, the application server CPU and memory become overloaded due to synchronous processing and lack of load balancing.
At large scale, network bandwidth and data storage become bottlenecks if data partitioning and CDNs are not used.
- Horizontal scaling: Add more servers to distribute load and avoid single points of failure.
- Caching: Use caches to reduce database hits and speed up responses.
- Database sharding: Split data across multiple databases to handle large volumes.
- Load balancing: Distribute incoming traffic evenly across servers.
- Use CDNs: Deliver static content closer to users to reduce latency.
- Microservices: Break monoliths into smaller services for better maintainability and scaling.
- At 10,000 users, expect ~1000 QPS (queries per second).
- Database storage grows with user data; plan for GBs to TBs depending on data size.
- Network bandwidth needs increase; 1 Gbps can handle ~125 MB/s, plan accordingly.
- Adding caching reduces database load by up to 70%, saving costs.
- Horizontal scaling increases server costs linearly but improves availability.
Start by identifying current system limits and bottlenecks.
Discuss how load increases affect each component.
Explain anti-patterns and why they cause problems at scale.
Propose clear, practical solutions matching the bottleneck.
Use real numbers to justify your approach.
Your database handles 1000 QPS. Traffic grows 10x. What do you do first?
Answer: Add read replicas and implement caching to reduce direct database load before scaling vertically or sharding.