Be it system design interviews or designing any new application, we can always use the below 8 step framework to approach any system design problem!
1.Defining Functional Req
- Ask open-ended questions
- Properly define at least 3 functional requirements
- Ask and make some assumptions about Daily Active users and Total users
2. Defining Non-Functional Req
- At least 3 non-functional requirements, such as fault tolerance, low latency, high availability, or high consistency, as partition tolerance is a must for distributed systems (CAP theorem).
3. Capacity Estimation and Scalability Estimation
- Data Estimation around Total Users and other data to be stored, taking replication into account to make the system fault-tolerant.
- API Throughput Scalability Estimation - Query per second(QPS) and Peak Query per second(double the QPS) as per daily active users or number of requests assumed
- Define if its a read or write heavy application
4. Prioritization of Microservices
- Think of the system has components that need to be scaled differently and broken down into microservices
5. Logical architecture
- Propose high-level architecture
6. Defining APIs
- List the most critical APIs and define the HTTP verb
7. Data Model Design
- Selection of storage/DB/object storage
- Schema design
- Selection of cache (only if not using MongoDB Atlas)
8. Solving API Business Logic
- Build on API logic for the most critical API
Top comments (0)