# KodeKloud: Courses System Design for Interview Prep ## System Design for Interview Prep ### The Interview, Replayed - [Course: System Design for Interview Prep](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/index.md): Beginner-friendly course teaching a six-step framework and hands-on labs to prepare for system design interviews covering trade-offs, APIs, high-level design, and common systems - [Course Introduction](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/The-Interview-Replayed/Course-Introduction/page.md): Beginner-friendly course teaching a six-step framework and hands-on labs to prepare for system design interviews covering trade-offs, APIs, high-level design, and common systems - [How a Design Interview Is Judged and the Six Step Framework](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/The-Interview-Replayed/How-a-Design-Interview-Is-Judged-and-the-Six-Step-Framework/page.md): How to approach system design interviews using a six-step framework to clarify requirements, estimate scale, define APIs, design architecture, deep dive, and plan scaling - [The First Five Minutes Clarifying Questions](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/The-Interview-Replayed/The-First-Five-Minutes-Clarifying-Questions/page.md): Guidance on using the first five minutes of system design interviews to ask clarifying, architecture-influencing questions and state assumptions with measurable constraints. ### Warm-Ups: The Read-Heavy Classics - [URL Shortener Requirements and the API](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener-Requirements-and-the-API/page.md): Guide to designing a scalable URL shortener covering requirements, traffic estimates, API and data model, short-code generation, redirect performance, caching, analytics, and scaling tradeoffs. - [URL Shortener Two Ways to Make a Code](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener-Two-Ways-to-Make-a-Code/page.md): Explains hashing versus counter methods to generate unique short codes for URL shorteners, comparing trade offs in uniqueness, statelessness, scalability, and latency - [URL Shortener Hash or Counter](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener-Hash-or-Counter/page.md): Comparison of hashing versus counter for URL shorteners, advocating counter with secret bijective shuffling, addressing enumeration, concurrency fixes, and read‑heavy caching strategies - [URL Shortener The Celebrity Spike and the Cache](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener-The-Celebrity-Spike-and-the-Cache/page.md): URL shortener caching strategy to absorb celebrity-driven hot key spikes using CDN, Redis, app server caches, and Postgres to minimize database load. - [URL Shortener Redirects Bottlenecks and the Wrap Up](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener-Redirects-Bottlenecks-and-the-Wrap-Up/page.md): Discusses URL shortener design trade-offs focusing on 301 versus 302 redirects, caching impacts, failures, scaling, and short code generation. - [Curveball Byte URL Shortener](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Curveball-Byte-URL-Shortener/page.md): Practical follow-up strategies for designing a URL shortener including atomic counters, per-server ID block allocation, and link expiry handling with implementation options and trade offs - [URL Shortener](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/URL-Shortener/page.md): Guide to running a local URL shortener lab that creates a short link, generates traffic, and verifies each redirect is recorded in Postgres. - [Rate Limiter Requirements and Estimation](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Rate-Limiter-Requirements-and-Estimation/page.md): A guide to designing a rate limiter covering identification methods, limits and responses, storage and traffic estimations, algorithms and deployment implications for protecting APIs from abusive clients. - [Rate Limiter Fixed and Sliding Windows](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Rate-Limiter-Fixed-and-Sliding-Windows/page.md): Explains fixed-window and sliding-window rate limiting techniques, their tradeoffs, implementation patterns, and recommended HTTP responses and headers for throttling APIs. - [Rate Limiter The Token Bucket](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Rate-Limiter-The-Token-Bucket/page.md): Overview of token bucket rate limiting, explaining per-user token buckets, refill behavior, burst handling, implementation, headers, and distributed deployment considerations. - [Rate Limiter Make It Scale](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Rate-Limiter-Make-It-Scale/page.md): Explains scalable distributed rate limiting using Redis Lua scripts to atomically implement token buckets so multiple gateways share authoritative counters and avoid race conditions, with operational trade-offs - [Curveball Byte Rate Limiter](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Curveball-Byte-Rate-Limiter/page.md): Discusses rate limiter follow ups including configurable rules, Redis sharding, local gateway counters, trade offs, and mitigations for abusive traffic. - [Rate Limit It](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Warm-Ups-The-Read-Heavy-Classics/Rate-Limit-It/page.md): Guide to testing a simple API rate limiter enforcing 10 requests per minute using an X-Client header, showing rate limit response headers and 429 rejections. ### Fan-Out: One Event, Many Readers - [Notification System What It Must Do](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-What-It-Must-Do/page.md): Guide to designing scalable notification systems that detect events, determine recipients and channels, respect preferences, and reliably deliver transactional and marketing messages. - [Notification System The Notify API and the Data Model](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-The-Notify-API-and-the-Data-Model/page.md): Designing an asynchronous Notify API and data model for resilient delivery, queuing, retries, and scaling with external push, SMS, and email providers. - [Notification System Why We Need a Queue](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-Why-We-Need-a-Queue/page.md): Explains using a message queue and workers to decouple notification acceptance from delivery, improving reliability, scalability, retries, and visibility when sending push, SMS, and email. - [Notification System One Queue Per Channel](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-One-Queue-Per-Channel/page.md): Designing a scalable resilient notification system using per-channel durable queues, fan-out of events, and robust worker behavior with retries, idempotency, DLQs, rate limiting, and observability - [Notification System Retries and the Dead Letter Queue](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-Retries-and-the-Dead-Letter-Queue/page.md): Designing polite retry strategies with exponential backoff and jitter and using dead-letter queues to handle failed notifications, preserve messages, and enable monitoring and replay - [Notification System The Duplicate Trap](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-The-Duplicate-Trap/page.md): Explains preventing duplicate notification sends caused by queue redelivery using idempotency claims in Redis with atomic set-if-not-exists and owner tokens - [Notification System The Outbox](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-The-Outbox/page.md): Outbox pattern to ensure reliable notification delivery by making the database the source of truth, eliminating two-write races, and using an outbox processor plus idempotent workers - [Notification System Bottlenecks and the Real World](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notification-System-Bottlenecks-and-the-Real-World/page.md): Explains notification system bottlenecks and production solutions using durable queues, idempotency, worker scaling, retries, dead-letter queues, central gateways, and priority routing. - [Curveball Byte Notifications](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Curveball-Byte-Notifications/page.md): Concise interview-ready follow-ups for designing resilient notification systems covering priority queues, outage handling, idempotency limits, expiry, and multi-provider failover. - [Notifications That Survive](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Notifications-That-Survive/page.md): Lab demonstrating fan-out notification delivery to push and email workers, showing duplicated and redelivered messages, worker retries, and dead-letter queue handling for failed notifications - [News Feed Requirements and Estimation](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-Requirements-and-Estimation/page.md): Designing a scalable social news feed for interview problems, detailing functional and non functional requirements, traffic estimation, read heavy trade offs, caching and fan out strategies. - [News Feed The API and the Tables](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-The-API-and-the-Tables/page.md): Designing a scalable news-feed service covering API endpoints, users/follows/posts schema, feed generation, and fan-out scaling strategies - [News Feed Where the Design Breaks](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-Where-the-Design-Breaks/page.md): Comparing pull versus push feed designs, recommending fan-out-on-write to precompute timelines for low-latency reads while discussing tradeoffs and hybrid strategies for large follower counts. - [News Feed Feeds Built in Advance](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-Feeds-Built-in-Advance/page.md): Designing precomputed per-user social feeds using fan-out-on-write with a Redis feed-index and post cache to achieve sub-second load times while handling scaling, eviction, and celebrity fan-outs. - [News Feed The Background Job](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-The-Background-Job/page.md): Explains using the transactional outbox, dispatcher, and idempotent workers to reliably fan out posts to followers' feeds and prevent duplicates. - [News Feed The Celebrity Problem](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-The-Celebrity-Problem/page.md): Describes a hybrid social feed design that pushes posts for normal users and pulls celebrity posts at read time to reduce write amplification while balancing read and write costs - [News Feed The Two Caches and the Database](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-The-Two-Caches-and-the-Database/page.md): Explains precomputed feed architecture focusing on two caches, sizing examples, active-user optimization, database choices, and sharding strategies for scalable news feed systems - [News Feed Media Viral Posts and the Wrap Up](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/News-Feed-Media-Viral-Posts-and-the-Wrap-Up/page.md): Describes scalable media storage and feed architecture using object storage and CDN, Redis-based feed caching, hybrid push pull fan out, and strategies for viral posts and celebrity accounts. - [Curveball Byte News Feed](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Curveball-Byte-News-Feed/page.md): Strategies for designing scalable social news feeds covering celebrity caching, prioritized fan-out to reduce latency, and read-time relevance ranking with trade-offs and measurement guidance - [Feed Fan Out](https://notes.kodekloud.com/docs/System-Design-for-Interview-Prep/Fan-Out-One-Event-Many-Readers/Feed-Fan-Out/page.md): Explains building a low latency news feed using fan-out-on-write, including worker design, storage tradeoffs, operational best practices, and hybrid scaling strategies.