Top 5 Fan out Interview Questions
Browse 5 real-world technical and behavioral interview questions about Fan out. Review scenarios, edge cases, and architectural best practices.
Design a notification system that sends 50 million messages a day across email, SMS and push.
A notification system at 50 million a day is sized by bursts and provider limits, not its average of about 580 a second. Accept with an idempotency key, apply preferences once, fan out to per-channel queues with transactional and bulk lanes, rate-limit each provider, and never fail over blindly on a timeout.
Ten million users need a green dot beside their name. What does that cost, and what happens when a phone loses signal without disconnecting?
Presence at 10 million users is a lease system, not a connection-state table. Clients renew short-lived keys, the dot expires when renewals stop, and the real cost is bounded fan-out to visible watchers rather than every contact.
Adding a second LEFT JOIN doubled the revenue figure on a report. Explain what happened and write the correct query.
SQL join duplicates cause double counting when two one-to-many joins multiply rows before aggregation. Aggregate each child table to one row per parent first, then join those results back to the parent. Use this sql queries answer to show the decision, trade-off, and evidence rather than a memorised definition.
Design the home feed for a social network.
Size it first: 200M daily actives opening the feed six times a day is 42k reads/s at peak, while 100M posts fanned out to 200 followers each is 231k feed writes/s, so writes dominate. Push to ordinary accounts, pull for high-follower ones, and store ids so deletes and blocks filter on read.
One celebrity account is ninety per cent of your write traffic on a single partition. What do you do about a key you cannot rebalance?
A hot partition from one account cannot be fixed by ordinary rebalancing because it is one key. Split the key into write-sharded sub-keys or aggregate writes before storage; both choices move cost to reads, ordering, rollups or approximation.