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
-
01Chapter 1: Scale from Zero to Millions of UsersRead →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 ofIntroduction, Section 1: Single Server Setup, Section 2: Database Separation
-
02Chapter 2: Back-of-the-Envelope EstimationRead →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 evaluaIntroduction, Section 1: Key Concepts, Section 2: Example Estimation - Twitter QPS and Storage Requirements
-
03Chapter 3: A Framework for System Design InterviewsRead →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 reIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
04Chapter 4: Design a Rate LimiterRead →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 oIntroduction, Benefits of Rate Limiting, Step 1: Understanding the Problem
-
05Chapter 5: Design Consistent HashingRead →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 anIntroduction, The Rehashing Problem, Consistent Hashing
-
06Chapter 6: Design a Key-Value StoreRead →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 kIntroduction, Single Server Key-Value Store, Distributed Key-Value Store
-
07Chapter 7: Design a Unique ID Generator in Distributed SystemsRead →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 isIntroduction, Step 1: Understanding the Problem, Step 2: High-Level Design Options
-
08Chapter 8: Design a URL ShortenerRead →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 musIntroduction, Step 1: High-Level Design, Step 2: Deep Dive into Design
-
09Chapter 9: Design a Web CrawlerRead →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**. ### ApplicationIntroduction, Step 1: Understanding the Problem, Step 2: High-Level Design
-
10Chapter 10: Design a Notification SystemRead →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 messIntroduction, Step 1: Understanding the Problem, Step 2: High-Level Design
-
11Chapter 11: Design a News Feed SystemRead →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 exploreIntroduction, Step 1: Understanding the Problem, Step 2: High-Level Design
-
12Chapter 12: Design a Chat SystemRead →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
-
13Chapter 13: Design a Search Autocomplete SystemRead →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
-
14Chapter 14: Design YouTubeRead →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** - **SIntroduction, Step 1: Understand the Problem and Scope, Step 2: High-Level Design
-
15Chapter 15: Design Google DriveRead →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 UploadIntroduction, Step 1: Understanding the Problem, Step 2: High-Level Design
-
16Chapter 16: Proximity ServiceRead →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 withinIntroduction, Step 1: Understanding the Problem and Establishing Scope, Step 2: High-Level Design
-
17Chapter 17: Nearby FriendsRead →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, **locationsIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
18Chapter 18: Google MapsRead →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 usIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
19Chapter 19: Distributed Message QueueRead →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 consumersIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
20Chapter 20: Metrics Monitoring and Alerting SystemRead →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
-
21Chapter 21: Ad Click Event AggregationRead →**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 sIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
22Chapter 22: Hotel Reservation SystemRead →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
-
23Chapter 23: Distributed Email ServiceRead →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
-
24Chapter 24: S3-like Object StorageRead →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, whichIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
25Chapter 25: Real-time Gaming LeaderboardRead →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
-
26Chapter 26: Payment SystemRead →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
-
27Chapter 27: Digital WalletRead →**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 usIntroduction, Step 1: Understand the Problem and Establish Design Scope, Step 2: Propose High-Level Design and Get Buy-In
-
28Chapter 28: Stock ExchangeRead →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
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.