| Scale | What Changes? |
|---|---|
| 100 users | Simple class list; few classes identified; manual analysis manageable |
| 10,000 users | More complex requirements; need automated tools to extract classes; more relationships |
| 1 million users | Highly complex domain; classes must support scalability and concurrency; design patterns needed |
| 100 million users | Distributed systems; classes represent microservices; focus on decoupling and scalability |
Identifying classes from requirements in LLD - Scalability & System Analysis
At small scale, the bottleneck is understanding and correctly identifying all relevant classes from requirements. As complexity grows, the bottleneck shifts to managing class dependencies and ensuring classes can scale with user load and data volume.
- Small scale: Use manual analysis and domain expert interviews to identify classes.
- Medium scale: Employ modeling tools (UML) and automated requirement analysis to extract classes.
- Large scale: Apply design patterns (e.g., Factory, Singleton) to manage class creation and dependencies.
- Very large scale: Break system into microservices; each service has its own class model to reduce complexity.
Identifying classes is a design activity, so costs relate to time and effort:
- At 100 users: Few hours to days of analysis.
- At 10,000 users: Weeks of analysis with tooling support.
- At 1 million users: Months of design with iterative refinement.
- At 100 million users: Continuous design evolution with dedicated teams.
Structure your scalability discussion by first explaining how you identify classes from requirements at small scale, then describe challenges as complexity grows, and finally explain how you adapt your approach (tools, patterns, microservices) to handle scale.
Your database handles 1000 QPS. Traffic grows 10x. What do you do first?
Answer: Since the database is the bottleneck, first add read replicas and implement caching to reduce load before redesigning classes or architecture.