ayushsalampuriya.xyz Revise

System Design / Liquidslr notes

Liquidslr System Design

A 28-chapter path through scaling, estimation, architecture patterns, and complete system-design interview questions.

How to use this path: read the framework first, practise the building blocks, then explain one complete design aloud with requirements, estimates, APIs, data model, bottlenecks, and failure handling.
28chapters
4practice stages
1interview path
01FoundationsScaling and estimation
02PatternsRate limits, hashing, storage
03ProductsFeeds, chat, maps, media
04Deep divesPayments, wallets, exchange

The full path

28 chapters

Open source repo →
  1. 01Chapter 1: Scale from Zero to Millions of Users
    Scaling a system to support millions of users is a complex, iterative journey requiring refinement and optimization. This chapter outlines how to begin with a single server setup and scale the architecture step by step to handle millions of
    Introduction, Section 1: Single Server Setup, Section 2: Database Separation
    Read →
  2. 02Chapter 2: Back-of-the-Envelope Estimation
    Back-of-the-envelope estimation is a crucial skill in system design interviews. It involves making quick, rough calculations to assess system capacity or performance. According to Jeff Dean, Google Senior Fellow, these estimates help evalua
    Introduction, Section 1: Key Concepts, Section 2: Example Estimation - Twitter QPS and Storage Requirements
    Read →
  3. 03Chapter 3: A Framework for System Design Interviews
    System design interviews are a key part of the hiring process, simulating real-life problem-solving scenarios. These interviews evaluate not just technical skills but also collaboration, communication, and the ability to handle ambiguous re
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  4. 04Chapter 4: Design a Rate Limiter
    This chapter explores the design and implementation of a rate limiter—a system component used to control traffic rates sent by clients or services. Rate limiters are crucial for preventing abuse, reducing costs, and ensuring the stability o
    Introduction, Benefits of Rate Limiting, Step 1: Understanding the Problem
    Read →
  5. 05Chapter 5: Design Consistent Hashing
    This chapter explores consistent hashing, a technique essential for achieving horizontal scaling by efficiently distributing requests and data across servers. It minimizes data redistribution when servers are added or removed and ensures an
    Introduction, The Rehashing Problem, Consistent Hashing
    Read →
  6. 06Chapter 6: Design a Key-Value Store
    A **key-value store** is a type of non-relational database where data is stored as key-value pairs. Each key is unique, and values are accessed using these keys. This chapter details how to design a scalable, high-availability distributed k
    Introduction, Single Server Key-Value Store, Distributed Key-Value Store
    Read →
  7. 07Chapter 7: Design a Unique ID Generator in Distributed Systems
    This chapter addresses the challenge of designing a **unique ID generator** for distributed systems. Traditional auto-increment keys are unsuitable in distributed environments due to scalability and synchronization challenges. The focus is
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design Options
    Read →
  8. 08Chapter 8: Design a URL Shortener
    This chapter discusses the design of a URL shortening service like TinyURL. The system's main goals include **URL shortening**, **redirecting**, and **high scalability** to handle large traffic volumes. ### Requirements - Shortened URLs mus
    Introduction, Step 1: High-Level Design, Step 2: Deep Dive into Design
    Read →
  9. 09Chapter 9: Design a Web Crawler
    A **web crawler**, also known as a spider or robot, is used to discover and collect web content, such as web pages, images, and videos. This chapter focuses on designing a scalable web crawler for **search engine indexing**. ### Application
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  10. 10Chapter 10: Design a Notification System
    A **notification system** is essential for modern applications, providing timely updates like product notifications, events, offers, and alerts. Notifications can be sent through: 1. **Push notifications** (mobile or desktop), 2. **SMS mess
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  11. 11Chapter 11: Design a News Feed System
    A **news feed system** displays a constantly updating list of posts (status updates, photos, videos, and links) from a user’s connections. Examples include Facebook’s news feed, Instagram’s feed, and Twitter’s timeline. This chapter explore
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  12. 12Chapter 12: Design a Chat System
    A **chat system** supports real-time messaging between users. This chapter focuses on designing a chat app that includes: - **One-on-One Chat** - **Group Chat (max 100 users)** - **Online Presence Indicators** - **Multiple Device Support**
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  13. 13Chapter 13: Design a Search Autocomplete System
    Autocomplete, also known as typeahead or incremental search, provides real-time suggestions to users as they type in search boxes. The system must efficiently deliver top-k relevant and popular suggestions based on historical query data. ##
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  14. 14Chapter 14: Design YouTube
    YouTube is a massive video streaming platform supporting video uploads, playback, and various interactions. This chapter focuses on designing a scalable video streaming system with the following core features: - **Fast video uploads** - **S
    Introduction, Step 1: Understand the Problem and Scope, Step 2: High-Level Design
    Read →
  15. 15Chapter 15: Design Google Drive
    Google Drive is a cloud-based file storage and synchronization service that allows users to store, access, and share files from various devices. This chapter discusses designing a scalable system with the following features: - **File Upload
    Introduction, Step 1: Understanding the Problem, Step 2: High-Level Design
    Read →
  16. 16Chapter 16: Proximity Service
    A **proximity service** is designed to find nearby locations, such as restaurants, hotels, gas stations, and other businesses. This functionality is used in applications like **Google Maps** and **Yelp** to help users discover places within
    Introduction, Step 1: Understanding the Problem and Establishing Scope, Step 2: High-Level Design
    Read →
  17. 17Chapter 17: Nearby Friends
    This chapter focuses on designing a scalable backend for an application which enables user to share their location and discover friends who are **nearby**. The major difference with the proximity chapter is that in this problem, **locations
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  18. 18Chapter 18: Google Maps
    We'll design a simple version of **Google Maps**. Some facts about google maps: * Started in 2005 * Provides various services - satellite imagery, street maps, real-time traffic conditions, route planning * By 2021, had 1bil daily active us
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  19. 19Chapter 19: Distributed Message Queue
    We'll be designing a **distributed message queue** in this chapter. Benefits of message queues: - **Decoupling**: Eliminates tight coupling between components. Let them update separately. - **Improved scalability**: Producers and consumers
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  20. 20Chapter 20: Metrics Monitoring and Alerting System
    This chapter focuses on designing a highly scalable **metrics monitoring and alerting system**, which is critical for ensuring high availability and reliability. ---
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  21. 21Chapter 21: Ad Click Event Aggregation
    **Digital advertising** is a big industry with the rise of Facebook, YouTube, TikTok, etc. Hence, tracking ad click events is important. In this chapter, we explore how to design an **ad click event aggregation** system at Facebook/Google s
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  22. 22Chapter 22: Hotel Reservation System
    In this chapter, we're designing a **hotel reservation system**, similar to Marriott International. Applicable to other types of systems as well - Airbnb, flight reservation, movie ticket booking. ---
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  23. 23Chapter 23: Distributed Email Service
    We'll design a **distributed email service**, similar to **Gmail** in this chapter. In 2020, **Gmail** had 1.8bil active users, while **Outlook** had 400mil users worldwide. ---
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  24. 24Chapter 24: S3-like Object Storage
    In this chapter, we'll be designing an **object storage** service, similar to **Amazon S3**. Storage systems fall into three broad categories: - **Block storage** - **File storage** - **Object storage** **Block storage** are devices, which
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  25. 25Chapter 25: Real-time Gaming Leaderboard
    We are going to design a **leaderboard** for an online mobile game: ---
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  26. 26Chapter 26: Payment System
    We'll design a **payment system** in this chapter, which underpins all of modern **e-commerce**. A **payment system** is used to settle financial transactions, transferring monetary value. ---
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  27. 27Chapter 27: Digital Wallet
    **Payment platforms** usually have a **wallet service**, where they allow clients to store funds within the application, which they can withdraw later. You can also use it to pay for goods & services or transfer money to other users, who us
    Introduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
  28. 28Chapter 28: Stock Exchange
    We'll design an **electronic stock exchange** in this chapter. Its basic function is to efficiently match buyers and sellers. Major stock exchanges are **NYSE**, **NASDAQ**, among others. ---
    Introduction, Step 1: Understand the Problem and Establish Design scope, Step 2: Propose High-Level Design and Get Buy-In
    Read →
Source note: chapter structure and source links are derived from liquidslr/system-design-notes. The original repository includes additional diagrams and resources linked from each chapter.