System Design - Approach

 

System design interview questions have become a standard part of software engineering interview process, especialy for senior level roles. Most candidates struggle with system design interview questions; either because they do not have the experience in designing large-scale systems, or because they have not prepared for the open-ended and unstructured nature of such questions.

There are many ways to prepare for and answer a system design interview question. Below is one way that uses a 7 step approach to solve system design interview questions.

Step 1 - Clarify Requirements and Determine Scope

 

  • Who are users of the system?
    • People?
    • Systems?
    • Processes?
  • What features and functionality are in scope?
  • What actions are performed on the system?
    • Writes?
    • Gets?
    • Updates?
    • Deletes?
  • Does the system have a UI? Is UI design in scope for this interview?

Step 2 - Estimate for Scale (Back of the Envelope Estimations)

 

Ask questions to interviewer to understand the requirements and scope for the interview. Below are some of the questions for most systems.

  • Estimate scale
    • Number of requests per second
    • Number of Read vs Write requests.
  • Estimate storage
    • Estimate size of write request
    • Estimated storage requirement per year
  • Estimate bandwidth
    • Payload size of read and write requests
    • Bandwidth requirement per second

Step 3 - High Level Design

 

Include following components if applicable

  • Client
  • DNS Server
  • DNS Server
  • UI/Web layer (react.js, angular.js, backbone.js, etc.)
  • Service/API Layer (app servers, micro services, etc.)
  • Data layer (database, image storage, file server, etc.)
  • Async/off-line processing (messaging queue, kafka, .etc)

Step 4 - High Level Design for Scale

 

Sketch High Level Design For Scale
Include following components if applicable

  • Load-balancers
  • Caching
  • Data partitioning
  • Data replication

Step 5 - Data Model (Optional)

 

  • Define entities
  • Define interaction between entities
  • SQl, NoSQL or Both?

Step 6 - Define the System Interface Definition (optional)

 

  • Services
  • API Endpoints for each service

Step 7 - Deep Dive (optional)

 

Deep dive into one or more of key components

  • Any specific algoriths to use
  • Address any bottlenecks

 
Subscribe to our Questions

 

System Design - Interview Questions

Components of System Design
 
RECOMMENDED RESOURCES
Behaviorial Interview
Top resource to prepare for behaviorial and situational interview questions.

STAR Interview Example