Design Deep Dive: Chat, Notifications, and Feed
In this lesson we practice answering interview questions like: building a chat, a feed (the list of your friends' updates, like on social media), and notifications (the messages that pop up on your phone). We talk in plain terms about fanout (spreading the same update to many people at once, like a
System Design (planning how to build large software that works) is like planning a city: roads that move the traffic, warehouses for storage, traffic lights that manage the load, and maintenance crews that fix problems — so the city keeps running smoothly even during the busiest rush hour.
- Real-time and feed systems
- The classic question practiced in this lesson: designing real-time systems — chat, a feed (the list of friends' updates), and notifications. We walk through fanout (spreading one update to many people at once), ordering (the order messages appear in), delivery guarantees (making sure a message arrived), and push (pushing an alert to a phone).
- Trade-off
- A trade-off is a deliberate choice between two good things when you cannot fully have both — like choosing between fast and cheap. There is always a price, and in an interview you say it out loud to the interviewer.
- Operational metric
- A number that shows whether the decision really works for real users (in production — the live system). For example: latency (how long it takes to get an answer), error rate (the share of requests that fail), queue lag (how much work has piled up waiting in line), or cache hit ratio (how often the fast memory already had the answer).