High Level System Design :: A Complete Guide

Published on
-
2 mins read
Authors
  • Name
    Twitter

Interview Template for HLD :

Follow points must be covered in any high level design problem -

  • Functional Requirements
  • Non-Functional Requirements
  • APIs required
  • DB Schema
  • Algorithm ( if any )
  • Draw the block diagram for HLD, and try to include following components -
    • DNS
    • CDN
    • Load Balancer
    • Reverse Proxy ( not so neccessary )
    • Database
    • Cache
    • Message Queues

Some concepts common asked by interviewers -

  • Caching Eviction Policies -
    • LIFO ( Last In First Out )
    • FIFO ( First In First Out )
    • LRU ( Least Recently Used)
    • LFU (Least Frequently Used)
  • Reverse Proxy
  • Load balancers techniques -
    • Round Robin
    • Least Connections
    • Least Time
    • Hash
    • IP Hash
  • Database -
    • ACID rule
    • "Key" v/s "Primary Key" v/s "Index" v/s "Unique"
    • CAP Theorem
    • When to use SQL and When NoSQL
    • Data Replication
      • Synchronous
      • Asynchronous
    • Partioning -
      • Vertical Partioning -

        Example - User DB, Product DB etc...

      • Horizontal Partioning ( also called Sharding )

        • Range based
        • Hash based
        • Round Robin
        • Consistant Hashing
  • Difference between REST v/s SOAP apis
    • REST is an architecture whereas SOAP is a protocol
    • SOAP uses more bandwidth as it contains a lot of information apart from payload
    • SOAP can only work with XML format whereas REST can work in different data format such as Plain text, HTML, XML, JSON, etc.
  • Types of Persistant Connection between Client and Server -
    • Ajax Polling
    • Long Polling
    • Web-Sockets
    • Server-Sent Events

Examples of HLD Problems :

Easy

Medium

Hard