← Courses

CS 490 · 4 credits

Course Outline

System Design & Distributed Systems

Grow one small app into a planet-scale system, one bottleneck at a time. Starting from a single server running an app and a database, you will add load balancers, caches, replicas, shards, and queues, learning why each piece exists and what it costs. The course ends with the back-of-envelope method and three full worked interview designs: a URL shortener, a chat app, and a news feed.

What you will learn

  • Explain how a single-server app works and predict what breaks first as traffic grows
  • Choose between vertical and horizontal scaling, and design stateless services behind a load balancer
  • Place caches at the right layer and reason about invalidation, TTLs, and hit rates
  • Scale a database with indexes, replication, read replicas, and sharding, and weigh SQL against NoSQL honestly
  • Use queues, retries, and idempotency keys to make background work reliable
  • Reason about consistency tradeoffs using the CAP intuition and quorum reads and writes
  • Run the back-of-envelope estimation method and a repeatable framework in a system design interview
  • Design a URL shortener, a chat app, and a news feed end to end

Course outline

Unit 1One Server: Where Every System Starts

  • 1-1One box runs everything3 checks · 9 min
  • 1-2What breaks first4 checks · 9 min
  • 1-3Latency and throughput3 checks · 10 min

Unit 2Scaling Out: Load Balancers and Stateless Services

  • 2-1Vertical vs horizontal scaling4 checks · 9 min
  • 2-2Load balancers4 checks · 11 min
  • 2-3Stateless services3 checks · 10 min

Unit 3Caching: Answering Without Asking the Database

  • 3-1Where caches live3 checks · 9 min
  • 3-2Cache-aside, step by step3 checks · 10 min
  • 3-3Invalidation: the hard part4 checks · 11 min
  • 3-4When the cache fills up: eviction3 checks · 10 min

Unit 4Database Scaling I: Indexes and Replication

  • 4-1Indexes: the first database fix4 checks · 9 min
  • 4-2Replication: leader and followers3 checks · 10 min
  • 4-3Read replicas and replication lag3 checks · 10 min

Unit 5Database Scaling II: Sharding and the SQL vs NoSQL Question

  • 5-1Sharding: splitting the data5 checks · 12 min
  • 5-2Hot keys3 checks · 9 min
  • 5-3SQL vs NoSQL, honestly2 checks · 10 min

Unit 6Asynchronous Work: Queues, Workers, and Retries

  • 6-1Queues and workers4 checks · 11 min
  • 6-2Retries and idempotency3 checks · 11 min
  • 6-3Poison messages and dead letter queues4 checks · 10 min

Unit 7Consistency and the CAP Intuition

  • 7-1Eventual consistency in plain words4 checks · 10 min
  • 7-2Quorums and consensus, gently4 checks · 11 min

Unit 8Microservices vs Monolith, and Observability

  • 8-1Monolith vs microservices, honestly3 checks · 10 min
  • 8-2Observability basics4 checks · 10 min
  • 8-3Timeouts, fallbacks, and circuit breakers3 checks · 10 min

Unit 9Estimation and the Interview Method

  • 9-1Back-of-envelope numbers5 checks · 12 min
  • 9-2A repeatable interview framework2 checks · 10 min

Unit 10Capstone Designs: Three Full Interviews

  • 10-1Design a URL shortener3 checks · 13 min
  • 10-2Design a chat app4 checks · 14 min
  • 10-3Design a news feed4 checks · 13 min

Practice while you learn

Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.