</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 11: Doors Left Unlocked - Follow-up Feature Evolution

Executive Summary: The interviewer stops attacking and starts asking for features. Each one gets the same three questions: is it a firework or a flag, which earlier decision does it flip (if any), and which door did we leave unlocked for it? Custom reactions and engagement reports slot into paths we already built. Auto-lower on speaking and Q&A upvotes add a new writer and new state behind the same owner. Reactions in the recording is the one feature that truly flips a decision, and chat-message reactions is the one you must refuse to put on this pipe at all.

"Nice. It ships, and product has a backlog. Walk me through how your design absorbs these." One weak candidate finds every feature needs a rewrite (the design was brittle). Another says "I already built for that" (the scope was padded). The strong answer: each feature arrives through a door deliberately left unlocked, and you can name the door. Section 1's sorting question does most of the work: can we lose this, or must we keep it?

Follow-up features routed by physics: custom reactions and recorded reactions go to the lossy event path, recorded reactions also to a durable tee at the owner, auto-lower and Q and A upvotes go to the ordered state path, both paths feed the engagement report via rollups and the HandEvent log, and chat-message reactions go to the chat service instead

Feature One: Custom Reactions and a Bigger Emoji Set

"Marketing wants tenant-branded reactions and skin tones." Pure firework, so it stays on the event path. One data shape changes: the owner's accumulator from Section 5 holds counts[5], a fixed array. It becomes a small map keyed by reaction code, and the frame carries counts: {code: n}.

The risk is the frame, not the pipe. Today a reaction.burst frame is ≤ 300 B: 5 counts plus up to 10 sender IDs. A naive map grows with the emoji catalog, so we cap distinct types per frame at the top 8 by count and fold the long tail into the client's counter bubble. The rejected alternative, sending every code that appeared, is harmless in a 5-person meeting and wasteful at 4 frames/s × 1,000 recipients. Flip trigger: if one specific emoji must never be dropped (a formal "acknowledged," say), it has stopped being a firework and belongs on the state path.

Door left unlocked: The coalescing stage never cared how many types exist, and the token bucket counts reactions, not kinds.

Quick check before moving on:

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.