[System Design] Overview

Resources

Basic

Advanced

Problems

The typical outcome of such a discussion is a high-level architecture addressing the goals and constraints in the question. Perhaps the interviewer will choose one or more areas where they will want to discuss bottlenecks and other common problems.

Topics

  • SQL vs NoSQL:
    • NoSQL: low latency, unstructured data, only need to serialize or deserialize data, massive amount of data
  • Horizontal Scale vs Vertical Scale
    • Vertical: hard limit, single point of failure
  • Load balancers: private & public IPs
  • Database replica
    • master: generally only supports write operation
    • slave: copies of master, only supports read
    • most applications require much higher ratio of reads to writes

Interview steps

  • Clarify the question
    • Users/Customers
    • Scale (read/write)
      • How many read queries/second?
      • How much data is queried/request?
      • How many video views are processed/second?
      • Can there be spikes in traffic?
    • Performance
    • Cost
  • Estimation
    • Scale
    • Storage
    • Network bandwidth
  • Interface definition
  • Data model
  • High-level design
  • Detailed design: dive deeper into 2-3 components
  • Identifying and resolving bottlenecks: single point of failure,

Concepts

  • CheckSum: Video Store the data and also crypto-hash of data in DB. When retrieving the data, we return both data, hash of the data, and the hash method, the client compares the new computed hash with the hash coming from the DB.