the approach is important!
- goals: scalable, reliable, and efficient
- understand the problem statement
- clarify requirements - core requirements, constraints, and goals
- define scope - establish what feature and functionalities are needed
- design the system at a high level
- outline architecture - major components such as client, servers, databases, and APIs
- choose technologies - select appropriate technologies and tools for each component based on scalability, reliability, and ease of maintenance
- dive into detailed design
- component design - responsibilities and interactions of each component
- data modeling - schema for databases, how data will be stored, accessed, and managed
- APIs and interfaces - how communication happens (API endpoints, data formats, protocols)
- consider scalability
- load handling - load balancing, caching, sharding
- vertical vs. horizontal scaling - scale up or scale out based on the needs
- address scalability and fault tolerance
- redundancy - ensure system availability in case of component failure (eg. replication, failover)
- monitoring and alerts - respond to critical failures or performance degradations
- discuss trade-offs
- eg. consistency and availability, cost considerations
- test and validate
- simulate usage - describe methods for load testing and stress testing
- validation - ensure that design meets all requirements and can handle real-world usage
- clear communication
- design explanation - articulate your design choices and rationale, use diagrams
- seek feedback - engage with the interviewer, asking for feedback or clarification on any points of your design