Design Distributed Stream Processing System (Kafka-like) - System Design
“Stream processing” sounds like a for loop over a queue: read a message, do a thing, write a result. That mental model dies the moment the …
Read MoreDesign Top K Most Shared Articles in Time Windows - System Design
Everyone thinks top-K is a SELECT article_id, COUNT(*) FROM shares GROUP BY article_id ORDER BY count DESC LIMIT 100. Store every share, …
Read MoreDesign Yelp / Nearby Friends - System Design
“Nearby Friends” looks like the Uber problem wearing a different hat - a map, some dots, find the ones near me. It is not. Uber asks “out of …
Read MoreDesign Distributed Metrics & Log Aggregation - System Design
Everyone underestimates log aggregation because the demo is trivial: run an agent on a box, ship each line over the network, dump it into a …
Read MoreDesign Pastebin - System Design
Pastebin looks like a URL shortener with a bigger payload, and people design it that way: mint a key, stuff the text somewhere, return a …
Read MoreDesign Stock Exchange Order Matching - System Design
“Match buy and sell orders” sounds like a database join. Then you look at the constraints. A million orders a second arrive from thousands …
Read MoreDesign an Airbnb / Hotel Booking System - System Design
“Design Airbnb” sounds like a listings app: a host posts a room, a guest searches a city, they book, money changes hands. The interviewer …
Read MoreDesign Instagram-like Photo Sharing - System Design
Instagram sounds like Twitter with pictures, and half of it is. The follow graph, the feed of people you follow, the celebrity who breaks …
Read MoreDesign Netflix Recommendation Engine - System Design
The recommendation engine is the product. Netflix does not have a search box you visit with intent; it has a home screen that must guess, …
Read MoreDesign a Distributed Job Scheduler - System Design
Everyone thinks a job scheduler is a while loop with a sleep. “Check the clock, if a job is due run it, sleep a second, repeat - cron …
Read MoreDesign a Food Delivery System (Swiggy / Zomato) - System Design
“Design Swiggy” looks like a restaurant catalogue with a Buy button. Browse restaurants, tap dishes into a cart, pay, wait for food. The …
Read MoreDesign Google Maps / Nearby Search - System Design
“Design Google Maps” sounds like it is about drawing a map. It is not. The map tiles are the easy, cacheable part. The interviewer is really …
Read MoreDesign a Distributed Unique ID Generator - System Design
Almost every large system needs one boring-sounding thing: a way to mint unique identifiers. Tweet IDs, order IDs, message IDs, row keys. It …
Read MoreDesign a Key-Value Store (like DynamoDB) - System Design
A key-value store looks like a solved problem for about thirty seconds. “Put a value under a key, get it back later, it is a hash map.” Then …
Read MoreDesign a Metrics and Monitoring System - System Design
Everyone thinks a monitoring system is a database with a graph on top. “Every server writes its CPU and memory somewhere, you draw a line …
Read MoreDesign a Distributed Message Queue (like Kafka) - System Design
Everyone thinks a message queue is a list. “Producers push messages onto the back, consumers pop them off the front, done - it is a queue, …
Read MoreDesign YouTube / a Video Streaming Platform - System Design
A video platform looks trivial for about five seconds: POST /video to upload, GET /video to play. Then you remember that one uploaded file …
Read MoreDesign a Real-Time Leaderboard - System Design
Everyone thinks a leaderboard is a SELECT ... ORDER BY score DESC LIMIT 100. “Store the scores, sort them, return the top 100, done.” Then …
Read MoreDesign a Web Crawler - System Design
Everyone starts a web crawler the same way: a queue of URLs, a while loop, fetch, parse out the links, push them back on the queue, repeat. …
Read MoreDesign an Ad Click Aggregator - System Design
Everyone thinks an ad click aggregator is a SELECT COUNT(*) ... GROUP BY ad_id. “Log every click, count the rows, show the advertiser their …
Read More