<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[System Design Interview Roadmap: System Design Walkthrough]]></title><description><![CDATA[52 paid walkthroughs are named with the company that asks them.
Walkthroughs of actual questions asked at named companies (Design TikTok's For You feed at Meta, Design Uber dispatch at Uber, etc.) with the trade-off discussions interviewers probe]]></description><link>https://systemdr.systemdrd.com/s/system-design-walkthrough</link><image><url>https://substackcdn.com/image/fetch/$s_!_3Z_!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd573e1-44ca-4a06-be42-264560574975_500x500.png</url><title>System Design Interview Roadmap: System Design Walkthrough</title><link>https://systemdr.systemdrd.com/s/system-design-walkthrough</link></image><generator>Substack</generator><lastBuildDate>Sun, 11 Oct 2026 17:48:00 GMT</lastBuildDate><atom:link href="https://systemdr.systemdrd.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[SystemDR Inc]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[systemdr@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[systemdr@substack.com]]></itunes:email><itunes:name><![CDATA[System Design Roadmap]]></itunes:name></itunes:owner><itunes:author><![CDATA[System Design Roadmap]]></itunes:author><googleplay:owner><![CDATA[systemdr@substack.com]]></googleplay:owner><googleplay:email><![CDATA[systemdr@substack.com]]></googleplay:email><googleplay:author><![CDATA[System Design Roadmap]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Handling Questions You Haven't Seen]]></title><description><![CDATA[You will get a question you haven&#8217;t drilled. This is guaranteed. The point of the question bank is pattern recognition, not memorization.]]></description><link>https://systemdr.systemdrd.com/p/handling-questions-you-havent-seen</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/handling-questions-you-havent-seen</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 11 Oct 2026 03:31:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!covP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The recovery process &#8212; four steps:</h2><h4>Step 1: Buy 90 seconds with clarifying questions. </h4><p>You don&#8217;t need to know the answer before you ask the questions. &#8220;Let me make sure I understand the scope &#8212; are we designing for real-time delivery or batch? How many users at peak?&#8221; You&#8217;re not stalling &#8212; you&#8217;re genuinely narrowing the problem while your brain maps the question to the nearest archetype.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthrough</span></a></p><h4>Step 2: Name the archetype out loud. </h4><p>&#8220;This sounds like it has the same core tension as a feed fanout system &#8212; lots of writes amplifying into lots of reads, with a latency constraint.&#8221; If you&#8217;re right, the interviewer will nod. If you&#8217;re wrong, they&#8217;ll redirect. Either way, you&#8217;ve signaled you have a framework.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h4>Step 3: Run the 6-step framework on the archetype, not the specific question. </h4><p>If you&#8217;ve identified it as a &#8220;real-time messaging&#8221; problem, run the messaging framework &#8212; WebSocket, delivery semantics, offline handling &#8212; and adapt the names to fit the new question.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!covP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!covP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 424w, https://substackcdn.com/image/fetch/$s_!covP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 848w, https://substackcdn.com/image/fetch/$s_!covP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 1272w, https://substackcdn.com/image/fetch/$s_!covP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!covP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png" width="1456" height="841" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:841,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:703567,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/219216301?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!covP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 424w, https://substackcdn.com/image/fetch/$s_!covP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 848w, https://substackcdn.com/image/fetch/$s_!covP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 1272w, https://substackcdn.com/image/fetch/$s_!covP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbed6012-a9ac-42ae-93e0-44ae39717879_3600x2080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Step 4: Go deep on the hard part, not the familiar parts. </h4><p>If you&#8217;ve never seen the question before, the interviewer knows it. They&#8217;re not expecting a polished answer. They&#8217;re watching whether you can reason under uncertainty. Go to the hardest distributed systems problem in the question and show that you can think through it, even imperfectly.</p><p><strong>What not to do:</strong> Don&#8217;t say &#8220;I haven&#8217;t seen this question before.&#8221; It signals that you were expecting to pattern-match, not think. Even if the question is new, treat it as a normal design round and work through it.</p><div><hr></div><p><strong>CTA:</strong> The cohort curriculum is built around recovering when the question is unfamiliar &#8212; clarifying the scope, identifying the right system archetype, applying a proven framework, and going deep on the hardest distributed-systems trade-off instead of relying on pattern-matching.</p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p><strong>Want the full picture?</strong> </p><p>The premium lessons include advanced insights, practical exercises, and comprehensive walkthroughs.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design Reddit’s Front Page — Walkthrough ]]></title><description><![CDATA[The probe]]></description><link>https://systemdr.systemdrd.com/p/design-reddits-front-page-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-reddits-front-page-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 06 Oct 2026 03:30:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Tuyt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bef3213-1942-44fa-a40d-7738bc4045e5_4750x4750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The probe</h2><blockquote><p>Reddit&#8217;s front page is community-aggregated content ranked by the &#8220;hot&#8221; algorithm. The interesting system design question is: how do you maintain a ranked list across thousands of subreddits with millions of concurrent voters, without recomputing the full ranking on every vote?</p></blockquote><h2>The Hot Algorithm</h2><div class="callout-block" data-callout="true"><p>Reddit&#8217;s hot score for a post: score = log10(max(abs(ups - downs), 1)) + sign(ups - downs) * seconds_since_epoch / 45000</p></div><p>This decays old posts naturally without a cron job &#8212; the time term shrinks the relative contribution of votes as a post ages. An hour-old post needs 10&#215; more upvotes to rank above a brand-new post.</p><h2>Architecture</h2><p>- <strong>Vote events: </strong></p><p>User upvotes &#8594; Kafka &#8594; vote aggregation worker &#8594; update posts.score in the posts table</p><p>- <strong>Front page: </strong></p><p>Precomputed per-subreddit sorted lists in Redis ZSETs, score = hot algorithm value. On vote: re-score the post and ZADD with new score. Front page read = ZREVRANGE /r/all 0 24 &#8212; O(log N)</p><p>- <strong>The r/all problem: </strong></p><p>r/all aggregates top posts from all subreddits. At peak, millions of posts compete. Maintain a separate ZSET for r/all, updated when any subreddit post&#8217;s score enters the top-1000 of its subreddit</p><p>- <strong>New posts: </strong></p><p>Use a separate new ZSET per subreddit sorted by created_at. New tab = ZREVRANGE on this set. No algorithm needed.</p><p>- <strong>Award/controversy: </strong></p><p>Track controversiality score (high upvotes AND high downvotes) in a separate sorted set for the controversial sort</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><div><hr></div>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-reddits-front-page-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Hardest Question in the Question Bank]]></title><description><![CDATA[Of the 52 questions in the system design bank, one comes up in cohort feedback more than any other.]]></description><link>https://systemdr.systemdrd.com/p/the-hardest-question-in-the-question</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/the-hardest-question-in-the-question</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 04 Oct 2026 03:30:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!QfD7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Of the 52 questions in the system design bank, one comes up in cohort feedback more than any other. Members write more questions about it, get more wrong, and learn more from getting it wrong.</p><p>It&#8217;s the Google Docs question. Design a real-time collaborative editor.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Here&#8217;s why it&#8217;s the hardest &#8212; and why that makes it the most valuable one to understand deeply even if you never get asked it directly.</p><h3><strong>Why it&#8217;s different from every other question</strong></h3><p>Most system design questions have a &#8220;store data, serve data&#8221; structure underneath. Messages are stored and delivered. Files are stored and synced. Videos are stored and streamed. The interesting problems are about doing these operations reliably at scale.</p><p>Collaborative editing is different. The problem isn&#8217;t storage or delivery. It&#8217;s <em>merging</em> &#8212; two users type simultaneously into the same document, and both changes must survive in a consistent order on both clients, in real time, without either user&#8217;s edits being lost.</p><p>This is a fundamentally different problem. Storage and delivery can be solved with good distributed systems primitives. Merging concurrent edits requires a different class of solution: Operational Transformation or CRDTs.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthrough</span></a></p><h3><strong>The naive approaches fail interestingly</strong></h3><p>Most candidates start with one of two intuitions.</p><p>The first: &#8220;the server is the source of truth &#8212; last write wins.&#8221; This silently destroys data. User A types &#8220;Hello&#8221; and user B types &#8220;World&#8221; simultaneously. Whichever write arrives at the server last overwrites the first. One user loses their edit invisibly. Not acceptable.</p><p>The second: &#8220;the server merges conflicting writes.&#8221; This sounds right until you try to implement it. What does &#8220;merge&#8221; mean for concurrent text edits? If A inserts a character at position 5 and B deletes a character at position 3 simultaneously, what&#8217;s the correct merged result? The positions have shifted. The server cannot naively apply both operations in sequence.</p><p>This is where OT comes in.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QfD7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QfD7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 424w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 848w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 1272w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QfD7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png" width="682" height="482.9271978021978" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1031,&quot;width&quot;:1456,&quot;resizeWidth&quot;:682,&quot;bytes&quot;:1161420,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/217794108?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QfD7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 424w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 848w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 1272w, https://substackcdn.com/image/fetch/$s_!QfD7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21654ae3-b968-408d-b625-24be8fcf7156_4800x3400.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>What Operational Transformation actually does</strong></h3><p>Each edit is represented as an operation: <code>insert(position, character)</code> or <code>delete(position)</code>. When two operations are generated concurrently &#8212; before either user has seen the other&#8217;s edit &#8212; they must be <em>transformed</em> against each other before both can be applied.</p><p>The classic example: document is &#8220;Hello.&#8221; User A inserts &#8220; World&#8221; at position 5. User B simultaneously inserts &#8220;!&#8221; at position 5.</p><p>After A&#8217;s operation, position 5 has shifted &#8212; &#8220;!&#8221; should now be inserted at position 11. The transform function adjusts B&#8217;s operation before applying it. Result: &#8220;Hello World!&#8221;</p><p>The server maintains a history of all operations. When it receives an operation, it transforms that operation against all operations the client hasn&#8217;t yet seen, then broadcasts the transformed version to all clients. The document converges to the same state on all clients.</p><h3><strong>Why this matters for questions you will get asked</strong></h3><p>Understanding OT deeply unlocks several adjacent concepts:</p><p><em>The operation log as a data model.</em> An OT-based system stores operations, not document state. The document is the result of replaying all operations from the beginning. This is event sourcing &#8212; the same pattern used in payment ledgers, audit trails, and any system where history matters more than current state.</p><p><em>The difference between mutable and immutable data models.</em> Most system design candidates default to mutable state (update the row when something changes). The operation log is immutable &#8212; you only ever append. Understanding why immutable append-only logs are often better than mutable state is one of the higher-order concepts in distributed systems.</p><p><em>CRDTs as an alternative.</em> Conflict-free Replicated Data Types solve the same merging problem differently &#8212; by designing data structures where all operations commute (can be applied in any order and produce the same result). Notion uses CRDTs. Google Docs uses OT. Both work.</p><p>If you understand one of these deeply, you understand a design principle that appears in message delivery systems, distributed databases, version control systems, and collaborative tools.</p><p>The Google Docs question is hard because it requires understanding a class of problem &#8212; concurrent state merging &#8212; that doesn&#8217;t appear in most backend engineering work. But once you understand it, you see it everywhere.</p><p>The full walkthrough is in the Vault under Real-Time Messaging. The drill card is the most complex card in the set. Both are there when you&#8217;re ready to go deep.</p><div><hr></div><p><strong>CTA</strong>: The cohort curriculum is built around closing exactly these three gaps &#8212; state merging, immutable operation logs, and real-time OT mechanics</p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p><strong>The deeper concepts start where this lesson ends.</strong> </p><p>Explore the premium content for advanced techniques and system-level thinking.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design an API Gateway — Walkthrough]]></title><description><![CDATA[Archetype: Infrastructure & Platform &#183; Asked at: AWS, Kong, Google Apigee]]></description><link>https://systemdr.systemdrd.com/p/design-an-api-gateway-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-an-api-gateway-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 29 Sep 2026 03:30:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!D5qe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84a1a46d-5c7d-427c-9f46-98af2858ff1f_5000x2600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>The API gateway is a cross-cutting infrastructure component that every FAANG-tier system uses. The question tests whether you understand authentication, rate limiting, routing, and load balancing as composable middleware layers &#8212; and what the operational challenges are when this component is in the critical path of every API call.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- What features: auth, rate limiting, routing, load balancing, caching, request transformation, observability?</span></p><p><span>- Scale: 1M req/sec aggregate across all upstream services</span></p><p><span>- Multi-tenant (different customers, different routing rules) or single-tenant? - SLO: gateway latency overhead &lt; 5ms p99 (adds &lt; 5ms to every request)</span></p><h2><span>Step 2 &#8212; Architecture</span></h2><p><strong><span>The middleware chain (executed in order for every request):</span></strong></p><p><span>1. </span><strong><span>TLS termination </span></strong><span>&#8212; decrypt HTTPS at the gateway; upstream services communicate in plaintext within the datacenter</span></p><p><span>2. </span><strong><span>Authentication </span></strong><span>&#8212; validate API key or JWT token. Token validation: symmetric JWT (verify signature with shared secret, ~0.5ms) or asymmetric (fetch public key from auth service &#8212; cache aggressively, 24h TTL)</span></p><p><span>3. </span><strong><span>Rate limiting </span></strong><span>&#8212; per API key, per endpoint, sliding window counter in Redis (see Rate Limiter walkthrough)</span></p><p><span>4. </span><strong><span>Request routing </span></strong><span>&#8212; match URL pattern to upstream service. Stored in a routing table (Redis or in-memory hash map, updated via config push)</span></p><p><span>5. </span><strong><span>Load balancing </span></strong><span>&#8212; pick a healthy upstream instance (round-robin, least-connections, or consistent hash for sticky sessions)</span></p><p><span>6. </span><strong><span>Request forwarding </span></strong><span>&#8212; proxy the request to the upstream; handle upstream timeout and retry</span></p><p><span>7. </span><strong><span>Response transformation </span></strong><span>&#8212; add CORS headers, strip internal headers, compress response</span></p><p><span>8. </span><strong><span>Observability </span></strong><span>&#8212; emit request log, latency metric, status code metric to monitoring pipeline</span></p><p><strong><span>Configuration plane: </span></strong><span>Routing rules, rate limits, auth policies are stored in a config database (etcd or Postgres) and pushed to gateway instances via pub-sub. Gateways cache config in-memory; config staleness of 30 seconds is acceptable.</span></p><p><strong><span>Health checking: </span></strong><span>Gateway maintains a health map of all upstream instances. Active health checks (HTTP probe every 5s) + passive health checks (circuit breaker on error rate). Unhealthy instances removed from the load balancing pool.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-an-api-gateway-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[India Engineers Targeting FAANG: What's Different and What Isn't]]></title><description><![CDATA[The system design interview is the same interview in Bangalore as it is in San Francisco.]]></description><link>https://systemdr.systemdrd.com/p/india-engineers-targeting-faang-whats</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/india-engineers-targeting-faang-whats</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 27 Sep 2026 03:30:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jw9P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The system design interview is the same interview in Bangalore as it is in San Francisco. The questions, the rubric, the archetypes &#8212; identical. An L5 system design answer in India is an L5 system design answer anywhere.</p><p>But the path to the interview room, the logistics surrounding it, and the context after an offer are different in ways that matter. Here&#8217;s what actually differs.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jw9P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jw9P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 424w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 848w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 1272w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jw9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png" width="1456" height="874" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:874,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2495160,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/216841786?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jw9P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 424w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 848w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 1272w, https://substackcdn.com/image/fetch/$s_!jw9P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb743259e-452a-4881-85ef-a75d5b6732ef_4000x2400.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>What&#8217;s genuinely different</strong></h3><p><em>The remote-first hiring pipeline.</em> Most FAANG-tier companies now conduct all interviews remotely. This is an advantage for India-based engineers &#8212; you&#8217;re no longer at a geographic disadvantage for the initial loop. The downside: time zones. A loop with a US-based company typically means some interviews between 7:30 PM and midnight IST. This is worth planning around &#8212; don&#8217;t schedule a round at midnight if you have a critical work deadline the next morning.</p><p><em>Level calibration.</em> A &#8220;Senior Engineer&#8221; at a well-regarded Indian tech company (Flipkart, Meesho, Swiggy, Juspay) maps to L4&#8211;L5 at Google/Meta depending on tenure and scope. An &#8220;architect&#8221; or &#8220;lead&#8221; at a larger Indian IT firm (Infosys, Wipro, TCS) typically maps to L4. This isn&#8217;t a judgment &#8212; it&#8217;s a calibration issue. Know your actual level going into the interview, not just your title.</p><p><em>The PPP pricing reality.</em> FAANG-tier base salaries for India-based roles are significantly lower than their US equivalents &#8212; typically &#8377;40L&#8211;&#8377;1.2Cr TC for L4&#8211;L6, versus $200K&#8211;$600K TC in the US for equivalent levels. This is expected and not negotiable in the same way US offers are. The negotiating leverage for India-based roles is typically in joining bonus and ESOP vesting schedules, not base.</p><p><em>Visa and relocation.</em> If you&#8217;re targeting a US relocation, the current H-1B backlog for Indian nationals is 10&#8211;15 years. This is a real constraint. Some engineers time their loop specifically to target companies with large India offices or a clear path to a Canada/Singapore transfer as an intermediate step. Worth being explicit about your relocation preferences early in the recruiter conversation, not after the offer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V8H8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V8H8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 424w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 848w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 1272w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V8H8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png" width="654" height="424.9203296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:946,&quot;width&quot;:1456,&quot;resizeWidth&quot;:654,&quot;bytes&quot;:1138253,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/216841786?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V8H8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 424w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 848w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 1272w, https://substackcdn.com/image/fetch/$s_!V8H8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096c43f3-d3e0-4681-8031-a599fbcc3372_4000x2600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>What isn&#8217;t different</strong></h3><p><em>The technical bar.</em> Identical. The system design questions are the same. The rubric is the same. The expected depth for L5 in Bangalore is the expected depth for L5 in Seattle.</p><p><em>The preparation path.</em> Identical. Cold drills, walkthroughs, mock interviews with peers. The prep that works in the US works in India. This newsletter covers both.</p><p><em>The failure modes.</em> Identical. Scoping too broadly, communicating at the wrong level, not handling failure modes &#8212; the same mistakes fail the round everywhere.</p><p><em>The timeline pressure.</em> Identical. Most engineers underestimate how long a loop takes. Initial screen, technical screen, onsite loop, offer, negotiation, background check &#8212; 6&#8211;12 weeks is typical. Plan accordingly.</p><h3><strong>One practical difference in preparation</strong></h3><p>The pool of practice partners in India is large but unevenly distributed. Engineers at Flipkart, Meesho, PhonePe, Razorpay, and similar companies have usually seen these interviews and can give calibrated mock feedback. Engineers at service companies may not have. Be deliberate about who you practice with &#8212; the value of a mock is entirely in the quality of the feedback.</p><p>The Discord has a regional channel specifically for India-based members. The <code>#india</code> channel is where timezone coordination, India-specific company intel, and INR pricing questions go. Post there if you&#8217;re looking for mock partners in IST.</p><h3><strong>The INR pricing</strong></h3><p>This newsletter&#8217;s paid content is available at &#8377;399/month or &#8377;2,999/year. The Vault is &#8377;9,999. The Cohort is &#8377;49,999. These are PPP-adjusted prices &#8212; the same content, different checkout link. Email with subject &#8220;INR pricing&#8221; and I&#8217;ll send the local currency link.</p><p>The technical content is identical regardless of which pricing you use.</p><div><hr></div><p><strong>CTA:</strong><span> The cohort curriculum is built around closing exactly these three gaps &#8212; each module targets one of them directly.</span></p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><p><strong>The free lesson gives you the overview.</strong> </p><p>The premium version shows you exactly how to apply it step by step</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design a Metrics Monitoring System (Datadog) — Walkthrough]]></title><description><![CDATA[Archetype: Infrastructure & Platform &#183; Asked at: Datadog, Google (Monarch), Meta (ODS)]]></description><link>https://systemdr.systemdrd.com/p/design-a-metrics-monitoring-system</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-a-metrics-monitoring-system</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 22 Sep 2026 03:30:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IXAG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>Time-series data at massive scale. The interesting problem is write throughput (millions of metrics per second from thousands of servers) vs query throughput (interactive dashboards needing sub-second response over months of data). These two requirements pull the architecture in opposite directions &#8212; you optimize writes by sequential append, you optimize range queries by pre-aggregation.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- What types of data: metrics (numeric time-series), logs (text events), traces (distributed request spans)? Scope to metrics.</span></p><p><span>- Ingestion rate: 1M metrics/sec (single large deployment)</span></p><p><span>- Query SLO: dashboard queries over last 24h should return in &lt; 2 seconds - Retention: 15-second resolution for 24h, 1-minute resolution for 30 days, 1-hour resolution for 2 years</span></p><p><span>- Alerting required? (Yes &#8212; threshold-based and anomaly-detection alerts)</span></p><h2><span>Step 2 &#8212; Estimate</span></h2><p><span>- 1M metrics/sec &#215; 8 bytes/datapoint = 8 MB/sec write throughput</span></p><p><span>- At 15-second resolution: 1M &#215; 4 datapoints/min &#215; 60min &#215; 24h = 5.8B datapoints/day - At 8 bytes/point: 46 GB/day raw. Over 30 days: 1.4 TB</span></p><p><span>- With rollup (15s &#8594; 1min &#8594; 1h): ~50GB/month per compression tier</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; Data Model</span></h2><p><strong><span>Time-series storage: </span></strong><span>Each metric is identified by a </span><strong><span>metric name + tag set </span></strong><span>(e.g., cpu.usage{host=web-01, region=us-east}). Stored as:</span></p><p><span>- Metric metadata: metric_id &#8594; {name, tags, retention_policy}</span></p><p><span>- Datapoints: (metric_id, timestamp) &#8594; value &#8212; ordered by timestamp, stored in a write-optimized time-series DB (InfluxDB, Prometheus TSDB, or custom LSM-tree)</span></p><p><strong><span>Rollup tables: </span></strong><span>Three separate tables &#8212; raw (15s resolution), hourly (pre-aggregated to 1-minute), daily (pre-aggregated to 1-hour). Background jobs roll raw data up periodically, dropping the raw data after the retention window.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IXAG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IXAG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 424w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 848w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 1272w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IXAG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png" width="628" height="518.8763736263736" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1203,&quot;width&quot;:1456,&quot;resizeWidth&quot;:628,&quot;bytes&quot;:4486907,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/214112046?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IXAG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 424w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 848w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 1272w, https://substackcdn.com/image/fetch/$s_!IXAG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6b05f3-aa06-4d80-810f-944a8f5020be_5750x4750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote></blockquote><div class="callout-block" data-callout="true"><p><span>Preparing for a distributed systems interview?</span><br><span>&#8594;</span><a href="https://systemdrd.com/ebooks/sdcourse-distributed-systems-interview">Download the free Interview Pack</a><br><span>&#8594; </span><a href="https://systemdr.systemdrd.com/subscribe">Subscribe</a><span> now to access source code repository - 200 + coding lessons</span></p></div>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-a-metrics-monitoring-system">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Message Queues: Kafka vs SQS vs Task Queue]]></title><description><![CDATA[Three technologies for moving work between services.]]></description><link>https://systemdr.systemdrd.com/p/message-queues-kafka-vs-sqs-vs-task</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/message-queues-kafka-vs-sqs-vs-task</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 20 Sep 2026 03:30:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AWQw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Three technologies for moving work between services. Frequently confused. Used interchangeably in interview answers. Rarely the same answer in production.</p><p>Here&#8217;s how to tell them apart and when to reach for each one.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>What they have in common</strong></p><blockquote><p>All three decouple producers from consumers. Instead of Service A calling Service B directly, A puts a message somewhere and B reads it when it&#8217;s ready. This makes A and B independently scalable, independently deployable, and independently failure-tolerant.</p></blockquote><p>The decoupling is the shared property. Everything else differs.</p><h3><strong>Kafka: streaming and fan-out</strong></h3><p>Kafka is a distributed log. Producers append messages to topics. Consumers read from topics at their own pace. Messages are retained for a configurable period (days or weeks), regardless of whether anyone has read them.</p><h3>The key properties that distinguish Kafka:</h3><p><em>Replay.</em> A consumer can re-read old messages. If you deploy a new service and need to process all historical events, Kafka lets you rewind to the beginning. SQS and task queues don&#8217;t.</p><p><em>Fan-out.</em> Multiple independent consumer groups can read the same topic simultaneously. Each group maintains its own offset. Service A and Service B can both consume the same stream of events without interfering with each other. SQS and task queues don&#8217;t support this natively.</p><p><em>Ordering.</em> Messages within a partition are strictly ordered. If order matters &#8212; event sourcing, audit logs, ledger updates &#8212; Kafka preserves it.</p><p>Use Kafka when: you have multiple consumers that need to read the same events, you need replay capability, you&#8217;re building a streaming pipeline where order matters, or you need to decouple high-throughput event producers from slower consumers.</p><p>Don&#8217;t use Kafka when: you need guaranteed exactly-once delivery of individual work items to exactly one worker, or when you have a small team that can&#8217;t operationally support a Kafka cluster.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthroughs&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthroughs</span></a></p><h3><strong>SQS: simple at-least-once work distribution</strong></h3><p>SQS is a managed queue. A producer enqueues a message. A consumer polls, processes, and deletes it. The message is invisible to other consumers during processing (the visibility timeout). If the consumer crashes, the message reappears.</p><h4>The key properties:</h4><p><em>Simplicity.</em> Fully managed by AWS. No cluster to operate. You pay per message.</p><p><em>At-least-once delivery.</em> Each message is delivered to at least one consumer. Duplicates are possible (rare but possible). Your consumer must be idempotent.</p><p><em>One consumer per message.</em> Each message is processed by exactly one consumer group. No fan-out. If you need multiple services to process the same message, you need SNS in front of SQS (one topic, multiple queues).</p><p>Use SQS when: you need a simple, reliable queue for distributing work to a pool of workers, you&#8217;re on AWS, and you don&#8217;t need replay or fan-out.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AWQw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AWQw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 424w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 848w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 1272w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AWQw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png" width="652" height="508.7032967032967" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1136,&quot;width&quot;:1456,&quot;resizeWidth&quot;:652,&quot;bytes&quot;:908726,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/213817200?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AWQw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 424w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 848w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 1272w, https://substackcdn.com/image/fetch/$s_!AWQw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e3ce558-fc5b-4983-8a64-c4f3883e5103_4000x3120.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Task queues (Celery, Redis Queue, Postgres FOR UPDATE SKIP LOCKED)</strong></h3><p>Task queues are purpose-built for job execution. A task has a type, a payload, a status, a retry count, and a deadline. Workers claim tasks atomically, process them, and mark them complete. Failed tasks retry with backoff.</p><p>The key properties:</p><p><em>Task lifecycle management.</em> Task queues track the status of individual work items. You can query &#8220;which tasks are in progress right now&#8221; or &#8220;which tasks have failed more than 3 times.&#8221; Kafka and SQS don&#8217;t natively track per-item status.</p><p><em>Retry with backoff.</em> If a task fails, it&#8217;s retried after an exponential delay. Dead-letter queuing for tasks that fail past the max retry count. This is the production pattern for background job processing.</p><p><em>Priority.</em> Tasks can have priority levels. High-priority tasks jump the queue. Standard queues don&#8217;t support this natively.</p><p>Use a task queue when: you&#8217;re running background jobs (email sending, image processing, report generation), you need per-task status visibility, you need retry with backoff, or you need priority queuing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5mvz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5mvz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 424w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 848w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 1272w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5mvz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png" width="660" height="541.2362637362637" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:660,&quot;bytes&quot;:993658,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/213817200?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5mvz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 424w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 848w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 1272w, https://substackcdn.com/image/fetch/$s_!5mvz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36e1c70c-ce82-4017-b008-f620f6bcc2c9_4000x3280.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>The interview decision</strong></h3><p>In a system design interview, the choice should follow from the requirement:</p><p>Need multiple services to react to the same events? &#8594; Kafka<br>Need to offload work from a web request to a background process? &#8594; SQS or task queue<br>Need to build a streaming analytics pipeline? &#8594; Kafka<br>Need to retry failed jobs with backoff and track their status? &#8594; Task queue<br>Need a managed, simple work queue with no infra overhead? &#8594; SQS<br>Need replay capability for new consumers or debugging? &#8594; Kafka</p><p>The mistake to avoid: defaulting to Kafka for everything. Kafka is operationally heavy (unless you&#8217;re using Confluent Cloud or a managed service). For a small-scale job queue, Postgres with <code>FOR UPDATE SKIP LOCKED</code> is simpler, cheaper, and perfectly adequate up to millions of jobs per day.</p><p>State your choice, name the alternative you&#8217;re not using, and explain why. That&#8217;s the format for any technology decision in this category.</p><blockquote><p><strong>CTA:</strong> The full walkthroughs go beyond knowing what Kafka, SQS, or task queues are. They show you how to make the decision in an interview &#8212; what requirement should drive the choice, which alternative to rule out, and how to explain the tradeoff like a Senior vs Staff engineer.</p></blockquote><p>If you found this valuable, the full library includes 52 walkthroughs, bonus lessons, exercises, and detailed interview breakdowns.</p><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong><span>Access all 52 Questions </span><a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design a Web Crawler — Walkthrough]]></title><description><![CDATA[Archetype: Search & Ranking &#183; Asked at: Google, Bing, Common Crawl]]></description><link>https://systemdr.systemdrd.com/p/design-a-web-crawler-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-a-web-crawler-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 15 Sep 2026 03:31:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!neAR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>The web crawler question tests distributed systems breadth: politeness (don&#8217;t hammer a single server), deduplication (don&#8217;t re-crawl the same URL twice), scheduling (recrawl priority), and parsing at scale. The interesting distributed systems problem is managing a frontier of billions of URLs across a cluster of crawlers without duplication.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><div class="callout-block" data-callout="true"><p><span>- Target scale: crawl the whole web (~50B pages) or a specific domain subset? - Recrawl frequency: how often to revisit pages? (Dynamic pages: hourly. Static: weekly.) - What to extract: HTML only, or also images, PDFs, structured data?</span></p><p><span>- Politeness: respect robots.txt? Rate limit per domain?</span></p><p><span>- SLO: crawl 1B pages within 24 hours (requires ~12K pages/sec)</span></p></div><h2><span>Step 2 &#8212; Estimate</span></h2><div class="callout-block" data-callout="true"><p><span>- 50B pages &#215; 500KB average = 25 PB total web</span></p><p><span>- Crawl rate needed: 1B pages/day = ~12K pages/sec</span></p><p><span>- 12K pages/sec &#215; 500KB = 6 GB/sec download bandwidth &#8212; requires hundreds of crawler nodes</span></p><p><span>- URL frontier size: 50B URLs &#215; 50 bytes/URL = 2.5 TB &#8212; too large for RAM, needs disk-backed priority queue</span></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; Key Components</span></h2><p><strong><span>URL Frontier: </span></strong><span>A distributed priority queue of URLs to crawl. Priority based on: page importance (PageRank estimate), content freshness, recrawl deadline. Implemented as a two-level structure: an in-memory heap of high-priority URLs, backed by a disk-based queue (Kafka or a custom LSM-tree store) for the full frontier.</span></p><p><strong><span>Deduplication: </span></strong><span>Before adding a URL to the frontier, check if it&#8217;s already been crawled. Use a Bloom filter (fast, probabilistic, O(1) membership check) to catch already-seen URLs. False positives acceptable (skip a valid URL) but false negatives not (avoid re-crawling). Secondary deduplication: content hash of the fetched page to detect mirror pages.</span></p><p><strong><span>Politeness policy: </span></strong><span>Per-domain rate limiting. Maintain a domain_last_crawled map. Enforce minimum interval between requests to the same domain (e.g., 1 request/sec per domain). Respect robots.txt &#8212; fetch and cache per domain on first visit.</span></p><p><strong><span>DNS pre-resolution: </span></strong><span>DNS lookup adds latency to every fetch. Pre-resolve and cache DNS for all domains in the frontier. TTL-matched to DNS record TTL.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!neAR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!neAR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 424w, https://substackcdn.com/image/fetch/$s_!neAR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 848w, https://substackcdn.com/image/fetch/$s_!neAR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 1272w, https://substackcdn.com/image/fetch/$s_!neAR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!neAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png" width="604" height="495.3131868131868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:604,&quot;bytes&quot;:4959326,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/213660781?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!neAR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 424w, https://substackcdn.com/image/fetch/$s_!neAR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 848w, https://substackcdn.com/image/fetch/$s_!neAR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 1272w, https://substackcdn.com/image/fetch/$s_!neAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1c434c6-106d-4b84-a4b3-12c83015274d_5000x4100.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote></blockquote><div class="callout-block" data-callout="true"><p><span>Preparing for a distributed systems interview?</span><br><span>&#8594;</span><a href="https://systemdrd.com/ebooks/sdcourse-distributed-systems-interview">Download the free Interview Pack</a><br><span>&#8594; </span><a href="https://systemdr.systemdrd.com/subscribe">Subscribe</a><span> now to access source code repository - 200 + coding lessons</span></p></div>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-a-web-crawler-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Silent Step 7 — the move that turns Hire into Strong Hire ]]></title><description><![CDATA[After the trade-offs section, before the interviewer wraps up, there is a 2-minute move that upgrades a Hire to a Strong Hire more reliably than anything else:]]></description><link>https://systemdr.systemdrd.com/p/the-silent-step-7-the-move-that-turns</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/the-silent-step-7-the-move-that-turns</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 13 Sep 2026 03:30:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!s_VM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After the trade-offs section, before the interviewer wraps up, there is a 2-minute move that upgrades a Hire to a Strong Hire more reliably than anything else:</p><p>Name two failure modes you haven&#8217;t fixed and the conditions under which you&#8217;d revisit the design.</p><p>Not generic failure modes. Specific ones from your design.</p><p>&#8220;The two things I&#8217;d revisit: first, if the celebrity threshold for switching from fanout-on-write to fanout-on-read turns out to be lower than 1M followers in practice &#8212; I&#8217;d tune it based on actual write amplification metrics after the first week in production. Second, if the change_log grows faster than anticipated &#8212; I&#8217;d add a compaction job earlier than the 30-day window I assumed.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s_VM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s_VM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 424w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 848w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 1272w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s_VM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png" width="1456" height="940" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:940,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2102278,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/213240118?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s_VM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 424w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 848w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 1272w, https://substackcdn.com/image/fetch/$s_!s_VM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19adda10-1569-4bbb-a7f2-42816633d834_3840x2480.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>This demonstrates:</p><p>1. You understand your design is an approximation, not a solution.</p><p>2. You&#8217;ve already thought about the monitoring signals that would tell you it&#8217;s failing.</p><p>3. You know how to respond when it fails.</p><p>That&#8217;s the entire difference between a candidate who has read about systems and a candidate who has been on-call for them.</p><p><strong>This is just the beginning.</strong> The premium content includes practical projects, frameworks, and deeper technical insights.</p><p><strong>CTA:</strong> The Question Vault is organized by company and archetype, so you can focus your prep where it matters. Each drill card shows the specific questions, patterns, and probes to prioritize for your target company. All 52 walkthroughs are in the Vault.</p><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe Now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe?"><span>Subscribe Now</span></a></p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong>Access all 52 Questions <a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div>]]></content:encoded></item><item><title><![CDATA[Design a Payment Fraud Detection System]]></title><description><![CDATA[Archetype: Money Movement &#183; Asked at: Stripe, Visa, PayPal, Robinhood]]></description><link>https://systemdr.systemdrd.com/p/design-a-payment-fraud-detection</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-a-payment-fraud-detection</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 08 Sep 2026 03:30:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jS8I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d6d187-0e6a-499f-823f-1f7e6bff973b_5000x4800.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>Unlike most system design questions, fraud detection has two hard constraints that conflict: latency (fraud checks must complete in &lt; 100ms inline with the payment flow) and accuracy (false positives block legitimate transactions &#8212; costly; false negatives allow fraud &#8212; also costly). The architecture must serve both.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- Inline (synchronous, blocks payment) or async (payment proceeds, flag for review later)? - Correct answer: both. Hard blocks for obvious fraud, async review for suspicious. - What signals are available: card data, user history, device fingerprint, IP, merchant category?</span></p><p><span>- False positive tolerance: rejecting 1% of legitimate transactions costs real revenue - Target: catch &gt; 99% of fraud while blocking &lt; 0.1% of legitimate transactions</span></p><h2><span>Step 2 &#8212; Data Model</span></h2><div class="callout-block" data-callout="true"><p><span>- </span><strong><span>transactions</span></strong><span>: tx_id, user_id, card_id, merchant_id, amount, country, device_fingerprint, ip, timestamp</span></p><p><span>- </span><strong><span>user_risk_profile</span></strong><span>: user_id, 30-day spend velocity, typical merchant categories, typical geographies, last_known_device, updated_at</span></p><p><span>- </span><strong><span>card_risk_signals</span></strong><span>: card_id, is_reported_stolen, chargebacks_30d, countries_used_7d - </span><strong><span>merchant_risk</span></strong><span>: merchant_id, fraud_rate_30d, category, country</span></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get a Access to Github Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get a Access to Github Repo</span></a></p><h2><span>Step 3 &#8212; Architecture (two-layer)</span></h2><p><strong><span>Layer 1 &#8212; Inline rules engine (&lt; 10ms): </span></strong><span>Hard rules that block obviously fraudulent transactions:</span></p><div class="callout-block" data-callout="true"><p><span>- Card reported stolen &#8594; hard block</span></p><p><span>- Transaction country &#8800; any of user&#8217;s last 5 countries AND amount &gt; $500 &#8594; block - 5 failed auth attempts in last 60 seconds &#8594; block</span></p><p><span>- Amount &gt; 10&#215; user&#8217;s average transaction &#8594; flag for step-up auth</span></p></div><p><span>Implemented as: rules stored in Redis (fast read), evaluated in-memory per transaction. No ML &#8212; pure boolean rules. Fast enough to be fully synchronous.</span></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-a-payment-fraud-detection">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Most-Asked Question at Each FAANG]]></title><description><![CDATA[After building the 52-question bank, I went back and tagged each question by which company most commonly asks it and at what frequency.]]></description><link>https://systemdr.systemdrd.com/p/the-most-asked-question-at-each-faang</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/the-most-asked-question-at-each-faang</guid><dc:creator><![CDATA[AI Roadmap]]></dc:creator><pubDate>Sun, 06 Sep 2026 03:31:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!I0sH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>After building the 52-question bank, I went back and tagged each question by which company most commonly asks it and at what frequency. The pattern is clearer than I expected.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I0sH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I0sH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 424w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 848w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!I0sH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1162471,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/210992874?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!I0sH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 424w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 848w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!I0sH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0123f38d-ada5-4e60-b2d6-d2abc78af30a_5120x2880.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here&#8217;s what it shows &#8212; and what it means for your prep if you have a specific company in your loop.</p><h3><strong>Amazon</strong></h3><p>The most-asked question at Amazon is a variant of marketplace matching or recommendation. Design the product search system. Design the recommendation engine. Design the shopping cart and inventory reservation.</p><p>The probe Amazon reaches for most consistently: what happens at scale? The interviewers are looking for whether you&#8217;ve thought about the system failing under load, not just the happy path. Estimation with consequences is weighted heavily at Amazon because of the Well-Architected Framework culture internally.</p><p>If you have an Amazon loop: prioritize Uber Dispatch (geospatial matching), Amazon Product Search, and the Distributed Task Queue. The infrastructure archetype is also heavily represented at Amazon &#8212; URL shortener, API gateway, rate limiter.</p><h3><strong>Google</strong></h3><p>Google asks the hardest technical questions in the bank. The most-asked questions are in the search and infrastructure archetypes: web crawler, search autocomplete/typeahead, Google Docs (collaborative editing), distributed file systems.</p><p>The probe Google reaches for: can you go deep on the hard distributed systems problem? Google interviewers typically don&#8217;t probe breadth &#8212; they probe depth on one component until you hit the edge of your knowledge.</p><p>If you have a Google loop: prioritize the hardest question in each archetype (CRDT/OT for collaborative editing, consistent hashing for caches and sharding, bloom filters for crawlers). You won&#8217;t need to cover 10 questions in depth &#8212; you need to be able to go very deep on whichever question they ask.</p><h3><strong>Meta</strong></h3><p>Meta asks social feed questions at a much higher rate than other companies, which makes sense given the products: Facebook feed, Instagram feed, Stories, Reels. The fan-out architecture in all its variants is the most commonly asked pattern.</p><p>The probe Meta reaches for: the celebrity problem and how you handle it. Large-account fan-out is a real operational challenge at Meta&#8217;s scale, and every interviewer there has direct experience with the tradeoffs.</p><p>If you have a Meta loop: be extremely solid on Twitter Timeline (the canonical fanout question), Instagram Feed (adds ML ranking on top), TikTok-style recommendation (adds ANN search), and WhatsApp/Messenger (their messaging infrastructure).</p><h3><strong>Stripe</strong></h3><p>Stripe&#8217;s questions are almost all in the money movement archetype. Payments, fraud detection, ledger design, rate limiting for their API.</p><p>The probe Stripe reaches for: correctness under failure. Idempotency, double-entry ledger design, exactly-once-or-at-least-once semantics, what happens when a webhook fails and retries. Stripe engineers have to think hard about these problems in their actual work, and the interview reflects that.</p><p>If you have a Stripe loop: be very solid on Stripe Payments (especially idempotency keys), payment fraud detection, and distributed rate limiting.</p><h3><strong>Apple</strong></h3><p>Apple asks a lot of file sync and storage questions &#8212; makes sense given iCloud. Also streaming media (Apple Music, Apple TV+) and messaging (iMessage).</p><p>If you have an Apple loop: prioritize Dropbox/Google Drive, iCloud Photos, Spotify Audio Streaming (same patterns as Apple Music), and WhatsApp (same core as iMessage).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1BXX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1BXX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 424w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 848w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1BXX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:998520,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/210992874?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1BXX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 424w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 848w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 1272w, https://substackcdn.com/image/fetch/$s_!1BXX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55921093-7545-47d3-bfa4-8fa382abf609_5120x2880.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>The pattern across all companies</strong></h3><p>Every company clusters around the products they actually build. The hardest preparation mistake is treating all 52 questions as equally likely.</p><p>If you have a specific company in your loop and 3 weeks to prepare, the most efficient path is: identify the 2&#8211;3 archetypes most relevant to that company, go deep on those archetypes, and do one solid drill per archetype. Then use the remaining time for your weakest archetype as a hedge.</p><p>Breadth matters less than targeted depth at this stage of prep.</p><p><strong>CTA:</strong> The Question Vault is organized by company and archetype, so you can focus your prep where it matters. Each drill card shows the specific questions, patterns, and probes to prioritize for your target company. All 52 walkthroughs are in the Vault.</p><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><p><strong>Ready to level up?</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe?"><span>Subscribe now</span></a></p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong>Access all 52 Questions <a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div>]]></content:encoded></item><item><title><![CDATA[Notification Service — Model Answer ]]></title><description><![CDATA[Week 1 Take-Home: Reference solution released in Week 2]]></description><link>https://systemdr.systemdrd.com/p/notification-service-model-answer</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/notification-service-model-answer</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 01 Sep 2026 03:30:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Ml-9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f5fcc36-9bcd-49de-9c44-1c515e8b7aed_5000x3400.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><span>Week 1 Take-Home: Reference solution released in Week 2</span></p><p><strong><span>How to use this: </span></strong><span>Read your own submission first. Score it against the rubric. Then read this. Find the specific gap. That gap is what you drill this week. Don&#8217;t read this before submitting your own answer &#8212; the cold attempt is the point.</span></p><p><span>The question (recap)</span></p><blockquote><p><span>Design a notification service. Users have devices; events generate notifications; notifications need to be delivered via push, email, SMS, or in-app depending on user preferences. Failures should retry. The system handles 100M users and 10M notifications per hour at peak.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>Before drawing anything, three questions matter most:</span></p><p><strong><span>1. What triggers a notification? </span></strong><span>Internal events (new message, order shipped, payment received) vs external events (third-party webhooks). The answer shapes the ingestion layer &#8212; do producers call an API, or does the service subscribe to an internal event bus?</span></p><p><strong><span>2. What delivery channels? </span></strong><span>Push (APNs/FCM), email (SendGrid/SES), SMS (Twilio), in-app (WebSocket). Each has different latency tolerance and reliability guarantees. Push notifications: best-effort, can drop. Emails: must deliver, queued. SMS: must deliver, expensive. In-app: only when the user is connected.</span></p><p><strong><span>3. What are the SLOs per channel? </span></strong><span>Push notifications should fire within 5 seconds of the triggering event. Emails within 30 seconds. SMS within 60 seconds. In-app real-time (&lt; 1 second). These numbers drive the queue and worker design.</span></p><h2><span>Step 2 &#8212; Estimate</span></h2><p><span>- 100M users, 10M notifications/hour peak = ~2,800 notifications/sec</span></p><p><span>- Channel distribution (typical): 70% push, 20% email, 8% in-app, 2% SMS - Push: 2,000/sec. Email: 560/sec. In-app: 224/sec. SMS: 56/sec</span></p><p><span>- Notification record size: ~500 bytes (user_id, channel, template, payload, status) - Storage: 10M/hour &#215; 24h &#215; 30d &#215; 500 bytes &#8776; 3.6 TB/month of notification history - User preferences: 100M users &#215; 200 bytes per preference record &#8776; 20 GB &#8212; fits in a single replicated RDBMS</span></p><p><span>The 70/20/8/2 channel split drives the worker pool sizing. Push workers handle 70% of the load and need the most horizontal scale.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; API Design</span></h2><div class="callout-block" data-callout="true"><p><span>POST /v1/notifications/send</span></p><p><span>Body: {</span></p><p><span>user_id: string, // or user_ids[] for bulk</span></p><p><span>template_id: string, // references a pre-defined template</span></p><p><span>payload: { key: value }, // template variables</span></p><p><span>priority: &#8220;high&#8221; | &#8220;normal&#8221; | &#8220;low&#8221;,</span></p><p><span>dedup_key: string, // optional &#8212; prevent duplicate notifications</span></p><p><span>send_at: epoch_ms, // optional &#8212; scheduled delivery</span></p><p><span>}</span></p><p><span>Response: { notification_id, status: &#8220;queued&#8221; }</span></p><p><span>GET /v1/notifications/:notification_id/status</span></p><p><span>Response: { notification_id, channel, status, delivered_at, attempts }</span></p><p><span>PUT /v1/users/:user_id/preferences</span></p><p><span>Body: {</span></p><p><span>push_enabled: bool,</span></p><p><span>email_enabled: bool,</span></p><p><span>sms_enabled: bool,</span></p><p><span>quiet_hours: { start: &#8220;22:00&#8221;, end: &#8220;08:00&#8221;, timezone: &#8220;Asia/Kolkata&#8221; },</span></p><p><span>channel_overrides: { &#8220;order_shipped&#8221;: [&#8221;email&#8221;], &#8220;message&#8221;: [&#8221;push&#8221;, &#8220;in_app&#8221;] } }</span></p></div><p><strong><span>The dedup_key </span></strong><span>is the idempotency mechanism. If a producer calls /send twice for the same logical event (retry after a timeout), the duplicate is detected by dedup_key and the second call returns the original notification_id without re-queuing. Same pattern as Stripe&#8217;s idempotency key.</span></p><p><strong><span>The template_id </span></strong><span>separates content from delivery. Producers don&#8217;t write notification text &#8212; they reference a pre-defined template and pass variables. This allows marketing/product teams to update notification copy without engineering deploys, and enables A/B testing of notification content independently of the delivery system.</span></p><h2><span>Step 4 &#8212; Data Model</span></h2><p><span>notifications table</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!chQB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!chQB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 424w, https://substackcdn.com/image/fetch/$s_!chQB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 848w, https://substackcdn.com/image/fetch/$s_!chQB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 1272w, https://substackcdn.com/image/fetch/$s_!chQB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!chQB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png" width="612" height="456.5345971563981" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:787,&quot;width&quot;:1055,&quot;resizeWidth&quot;:612,&quot;bytes&quot;:63646,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/209902867?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!chQB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 424w, https://substackcdn.com/image/fetch/$s_!chQB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 848w, https://substackcdn.com/image/fetch/$s_!chQB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 1272w, https://substackcdn.com/image/fetch/$s_!chQB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ae69b7-62f8-44dd-9266-9f5bbf43b62e_1055x787.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p><span>user_preferences table</span></p><p><span>user_id (PK), push_enabled, email_enabled, sms_enabled,</span></p><p><span>quiet_hours_start, quiet_hours_end, timezone, channel_overrides (JSONB)</span></p><p><span>notification_templates table</span></p><p><span>template_id (PK), name, channel, subject (email), body_template,</span></p><p><span>variables_schema (JSONB), created_at, updated_at</span></p><p><span>device_tokens table</span></p><p><span>user_id (INDEXED), device_id, platform (ios/android/web),</span></p><p><span>token (FCM or APNs token), last_active_at, is_active</span></p></div><p><span>One user has many device tokens. When sending push, the service fetches all active tokens for the user and sends to each. If a token comes back as invalid (APNs/FCM returns &#8220;unregistered&#8221;), mark is_active = false immediately.</span></p><div class="callout-block" data-callout="true"><p><span>Preparing for a distributed systems interview?</span><br><span>&#8594;</span><a href="https://systemdrd.com/ebooks/sdcourse-distributed-systems-interview">Download the free Interview Pack</a><br><span>&#8594; </span><a href="https://systemdr.systemdrd.com/subscribe">Subscribe</a><span> now to access source code repository - 200 + coding lessons</span></p></div>
      <p>
          <a href="https://systemdr.systemdrd.com/p/notification-service-model-answer">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Prepare for L6 When You're Currently L5]]></title><description><![CDATA[Most advice about levelling up from L5 to L6 sounds like this: go broader, go deeper, show more impact, lead across teams.]]></description><link>https://systemdr.systemdrd.com/p/how-to-prepare-for-l6-when-youre</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/how-to-prepare-for-l6-when-youre</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 30 Aug 2026 03:30:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1AhG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>Most advice about levelling up from L5 to L6 sounds like this: go broader, go deeper, show more impact, lead across teams.</p><p>All of this is true. None of it tells you what to do differently on Tuesday morning.</p><p>This post is the concrete version. What L6 actually adds in a system design interview, what experience you need before the interview will show it, and what to do in the next 90 days if you&#8217;re targeting L6 and currently at L5.</p></blockquote><h3><strong>First: understand what L6 is actually assessing</strong></h3><p>The L5 interview asks: can you design a system that works?</p><p>The L6 interview asks: can you design a system that works, that you could operate at 3 AM when it&#8217;s failing, and that a team of 10 engineers could build and maintain without constant guidance from you?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Those are different questions. The first is technical correctness. The second is operational maturity plus organizational awareness. Preparing for L6 without understanding this distinction means you&#8217;ll produce an excellent L5 answer and wonder why it didn&#8217;t land.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthrough</span></a></p><h3><strong>The three things L6 adds in the room</strong></h3><p>I&#8217;ve written about Senior vs Staff breakdowns in the paid walkthroughs, but let me be explicit here about what the additions actually are.</p><p><em>SLOs with monitoring signals.</em> An L5 says &#8220;I&#8217;d target p99 &lt; 100ms.&#8221; An L6 says &#8220;I&#8217;d target p99 &lt; 100ms, and the signal I&#8217;d alert on is cache hit ratio dropping below 90% &#8212; that&#8217;s the leading indicator that Postgres load is about to spike. By the time the latency exceeds 100ms it&#8217;s already a problem, but the cache hit ratio tells me it&#8217;s about to be a problem while I still have time to act.&#8221;</p><p>That addition &#8212; the leading indicator, not just the threshold &#8212; takes 20 seconds to say and is the clearest operational maturity signal in a system design interview. L5 candidates almost never include it without being asked. L6 candidates include it naturally because they&#8217;ve been on-call and learned, usually painfully, that the metric you alert on is not the metric you care about.</p><p><em>The revisit condition.</em> An L5 says &#8220;I&#8217;d partition by user_id because the hot read pattern is per-user.&#8221; An L6 says all of that and then adds: &#8220;The failure mode here is hot partitions if one user has disproportionate data volume. I&#8217;d monitor partition size variance in the first week and set up automatic re-partitioning if any shard exceeds 3&#215; the average. That number is a starting hypothesis &#8212; I&#8217;d tune it based on actual data.&#8221;</p><p>The revisit condition shows that you&#8217;ve designed systems that later needed to be changed, and that you build in the instrumentation to know when to change them. This is genuinely hard to fake if you haven&#8217;t done it. It&#8217;s not a vocabulary signal &#8212; it&#8217;s an experience signal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1AhG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1AhG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 424w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 848w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 1272w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1AhG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png" width="576" height="324" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:576,&quot;bytes&quot;:841247,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/209905913?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1AhG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 424w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 848w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 1272w, https://substackcdn.com/image/fetch/$s_!1AhG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfaadcfa-12c8-4190-b575-15c2bd2cdc7f_4800x2700.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Organizational implications.</em> This is the most L6-specific addition and the one most candidates skip entirely. After designing a payment notification system: &#8220;One thing I&#8217;d flag: this architecture creates a dependency between the payments team and the notifications team at the API contract level. If the notifications schema changes, payments has to coordinate. I&#8217;d define the notification contract as a stable interface owned by a platform team so that each product team can deploy independently.&#8221;</p><p>This sentence is completely invisible to an L5 candidate because L5 engineers generally work within one team and haven&#8217;t felt the cost of cross-team coupling. L6 engineers have &#8212; they&#8217;ve been the person blocked for two weeks because another team changed a shared interface without warning. That experience makes the organizational implication feel obvious to name.</p><h3><strong>What experience you need before the interview will show it</strong></h3><p>Here&#8217;s the uncomfortable truth: if you&#8217;ve spent your entire L5 tenure as an individual contributor on a single product team, building new features, the L6 interview will be hard regardless of how much you study.</p><p>L6 evidence is experiential. The monitoring signal addition requires having been on-call and learned what you actually alert on vs what you care about. The revisit condition requires having designed something that later broke in production and had to be changed. The organizational implication requires having felt the friction of cross-team coupling firsthand.</p><p>The 90 days before a targeted L6 loop should not just be interview prep. It should be deliberate experience accumulation:</p><p><strong>Get on-call rotation, if you&#8217;re not already.</strong> Even 4 weeks of on-call for a production service will teach you more about operational maturity than any amount of walkthrough reading. You&#8217;ll learn what the leading indicators are, what the lagging indicators are, and what it feels like to have the wrong alert fire at 2 AM. That experience will show in the interview automatically.</p><p><strong>Own a cross-team project, however small.</strong> Propose a shared API, a platform improvement, or a migration that affects two teams. Go through the coordination overhead. Feel the friction of interface ownership. When the interview asks about organizational implications you&#8217;ll have something real to draw on.</p><p><strong>Write one design doc that gets scrutinized.</strong> Not a quick proposal &#8212; a full design doc reviewed by engineers senior to you who push back on your decisions. The experience of defending architectural choices against experienced criticism is directly transferable to the interview room.</p><h3><strong>The 90-day interview prep plan for L6</strong></h3><p>Given the above, the split should be different from an L5 prep plan.</p><p>Weeks 1&#8211;4: Get the experience if you don&#8217;t have it. See above. No amount of interview prep replaces the operational instincts that on-call builds.</p><p>Weeks 5&#8211;8: Drill specifically on L6 signals. For every question you drill, force yourself to add three things after the architecture: the monitoring signal for the most critical component, the revisit condition for the riskiest design decision, and the organizational implication of the biggest architectural boundary you introduced. These three additions are almost mechanical once you know to look for them.</p><p>Weeks 9&#8211;10: Two mock interviews. Ask the mock interviewer to specifically probe the L6 signals: &#8220;What would you alert on?&#8221; &#8220;What would make you reconsider this architecture?&#8221; &#8220;What does this mean for team autonomy?&#8221; If you can answer those three probes naturally in a mock, you&#8217;ll answer them naturally in the real interview.</p><p>Weeks 11&#8211;12: Consolidation. Same plan as any loop prep &#8212; drill cards, framework cheatsheet, one cold drill per day. Target the archetypes most relevant to your company.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8jyt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8jyt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 424w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 848w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 1272w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8jyt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png" width="562" height="351.25" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:910,&quot;width&quot;:1456,&quot;resizeWidth&quot;:562,&quot;bytes&quot;:1061495,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/209905913?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8jyt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 424w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 848w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 1272w, https://substackcdn.com/image/fetch/$s_!8jyt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22c9a80e-5656-4ae7-920a-ac99e87694f0_4800x3000.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>What to do if your current role isn&#8217;t giving you L6 experience</strong></h3><p>Some engineers are targeting L6 at a new company because their current role doesn&#8217;t have the scope to build that experience. That&#8217;s a legitimate situation and worth being honest about.</p><p>The interview prep in that case should lean more heavily on vicarious experience: read incident post-mortems from engineering blogs (Cloudflare, Stripe, Datadog, and PagerDuty all publish detailed post-mortems). Read design documents from open source projects. Follow engineering blogs from companies operating at the scale of your target company.</p><p>The monitoring signal and revisit condition habits can be built by asking &#8220;what would tell me this design is failing?&#8221; after every drill, even if you&#8217;ve never been on-call. It&#8217;s not the same as lived experience, but it builds the reflex of thinking that way.</p><p>The organizational implication is harder to simulate. The closest substitute is: for every architectural boundary you draw in a design (this service vs that service, this team&#8217;s responsibility vs that team&#8217;s), explicitly name who owns the interface, what happens if either side changes it, and whether there&#8217;s a better way to isolate the two.</p><p><strong>The question worth asking yourself</strong></p><blockquote><p>Before you start interview prep, sit with this for a few minutes: in the last six months, have you made architectural decisions that affected engineers outside your immediate team? Have you been woken up at 2 AM by a broken system and had to diagnose it? Have you owned an interface that another team depended on?</p></blockquote><p>If yes to two or three: you probably have the experiential foundation and the interview prep is about learning to articulate it explicitly.</p><p>If no: the 90 days before your loop are more valuable spent accumulating those experiences than reading walkthroughs. The interview is a test of whether you think like an L6 engineer. That thinking comes from doing L6-level work, even briefly, more than from any amount of preparation.</p><p>The walkthroughs tell you what to say. The experience gives you something true to say.</p><div><hr></div><blockquote><p><strong>CTA:</strong> The Senior vs Staff section in every paid walkthrough breaks down exactly what L6 adds for that specific question &#8212; not in the abstract, but with the exact phrases and decisions that separate Hire from Strong Hire at that level. </p></blockquote><p><strong>If you found this valuable,</strong> the full content library includes bonus lessons, exercises, and detailed breakdowns.</p><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong><span>Access all 52 Questions </span><a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design TikTok For You Feed — Walkthrough ]]></title><description><![CDATA[The probe]]></description><link>https://systemdr.systemdrd.com/p/design-tiktok-for-you-feed-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-tiktok-for-you-feed-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 25 Aug 2026 03:30:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!d6yW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eeb2afb-78f9-4787-a6ca-1266542bf51b_6000x4500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>The FYF is not a follow-graph feed &#8212; it&#8217;s a recommendation feed. The candidate pool is &#8220;every video ever uploaded&#8221; filtered by ML, not &#8220;videos from accounts you follow.&#8221; Same fan-out and ranking architecture as Twitter Timeline, but the candidate generation layer is completely different.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- Follow-graph feed or pure recommendation? (FYF = recommendation &#8212; no follow required)</span></p><p><span>- Short video only (&#8804;60s) or mixed? This drives storage and encoding decisions - Real-time engagement signals (likes, shares, completion rate) must feed back into ranking within minutes &#8212; how fresh?</span></p><p><span>- DAU? (TikTok: ~1B DAU globally)</span></p><p><span>- SLO: next video must load in &lt; 500ms &#8212; the &#8220;infinite scroll&#8221; UX depends on it</span></p><h2><span>Step 2 &#8212; Estimate</span></h2><p><span>- 1B DAU &#215; 40 videos watched/day = 40B video plays/day = ~463K plays/sec - Each user needs a pre-fetched queue of 10&#8211;20 recommended videos to enable instant scroll</span></p><p><span>- Candidate generation per user: rank top 500 from a pool of billions &#8594; return top 20 - Engagement events (play, like, share, skip): ~5 events per video = 200B events/day = 2.3M events/sec feeding the ranking model</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; API Design</span></h2><div class="callout-block" data-callout="true"><p><span>GET /v1/feed/foryou</span></p><p><span>Query: cursor, limit (default 10), device_type</span></p><p><span>Response: { videos: [{video_id, cdn_url, creator, caption, music}], next_cursor, prefetch_next_10: [urls] }</span></p><p><span>POST /v1/engagement</span></p><p><span>Body: { video_id, event_type: &#8220;play&#8221;|&#8221;like&#8221;|&#8221;share&#8221;|&#8221;skip&#8221;|&#8221;complete&#8221;, watch_duration_ms }</span></p></div><p><span>The prefetch_next_10 in the response is the key design signal &#8212; the client pre-fetches the next 10 videos while the user watches the current one, achieving the illusion of instant load.</span></p><h2><span>Step 4 &#8212; Data Model</span></h2><p><span>- </span><strong><span>videos </span></strong><span>table: video_id, creator_id, s3_key, duration_ms, transcript, embedding (vector), tags[], upload_at</span></p><p><span>- </span><strong><span>engagement_events </span></strong><span>(Kafka &#8594; time-series store): user_id, video_id, event_type, watch_pct, timestamp</span></p><p><span>- </span><strong><span>user_interest_profile</span></strong><span>: user_id, topic_vectors[], creator_affinity[], updated_at &#8212; updated continuously from engagement stream</span></p><p><span>- </span><strong><span>video_recommendation_cache </span></strong><span>(Redis): user_id &#8594; [ordered list of 50 pre-ranked video_ids, TTL=10min]</span></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-tiktok-for-you-feed-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[SQL vs NoSQL: How to Choose Without Hedging]]></title><description><![CDATA[&#8220;It depends on the use case.&#8221;]]></description><link>https://systemdr.systemdrd.com/p/sql-vs-nosql-how-to-choose-without</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/sql-vs-nosql-how-to-choose-without</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 23 Aug 2026 03:30:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!aBdb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#8220;It depends on the use case.&#8221;</p><p>This phrase ends more system design answers than any other. It sounds thoughtful. It signals nuance. And it is the single most effective way to tell an interviewer you don&#8217;t know how to make a decision.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Every technology choice depends on the use case. That&#8217;s not an answer &#8212; it&#8217;s a preamble. The answer is what it depends <em>on</em>, and how you decide.</p><p>Here&#8217;s the decision framework for choosing between relational and non-relational storage that works in an interview setting.</p><p><strong>Step 1: Write down your two hottest queries</strong></p><p>Before naming any storage technology, write down the two or three queries the system will run most frequently. Specifically: what are the inputs, what are the outputs, and what constraints do they have?</p><p>&#8220;Give me all messages for user X, ordered by time&#8221; &#8212; this is a range query on a partition key. Wide-column store handles this well.</p><p>&#8220;Give me all orders for account X with status=pending, joined to the product table&#8221; &#8212; this has a join. Relational database handles this better.</p><p>&#8220;Give me the 10 nearest restaurants within 5km of this coordinate&#8221; &#8212; this is a spatial query. PostGIS or a geohash index.</p><p>The storage decision follows from the query. The query never follows from the storage decision.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aBdb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aBdb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 424w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 848w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aBdb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png" width="1456" height="910" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:910,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:843008,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198945504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aBdb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 424w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 848w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!aBdb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c96550-e499-4eaf-8335-75300c695a90_4400x2750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Payments Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Payments Walkthrough</span></a></p><p><strong>Step 2: Apply the decision rules</strong></p><p>Use a relational database when:</p><ul><li><p>Your data is structured and schema is stable</p></li><li><p>You need ACID transactions across multiple rows or tables</p></li><li><p>Your queries involve joins, aggregations, or complex filtering</p></li><li><p>Your write volume is under roughly 5&#8211;10K writes per second per node</p></li><li><p>Your total data per table is under roughly 100M rows before sharding gets painful</p></li></ul><p>Use a wide-column store (Cassandra, HBase) when:</p><ul><li><p>You need high write throughput (100K+ writes per second)</p></li><li><p>Your queries are predictable and partition-key-based &#8212; no joins, no ad-hoc filtering</p></li><li><p>Your data is naturally time-ordered (events, messages, metrics)</p></li><li><p>You need built-in TTL on rows (messages that expire, session data)</p></li></ul><p>Use a key-value store (Redis, DynamoDB) when:</p><ul><li><p>Your reads are pure point lookups by a single key</p></li><li><p>You need sub-millisecond latency</p></li><li><p>You&#8217;re storing simple values or small objects</p></li><li><p>You need atomic counters or sorted sets</p></li></ul><p>Use object storage (S3) when:</p><ul><li><p>You&#8217;re storing large binary objects (files, images, video, backups)</p></li><li><p>You need very high read throughput via CDN</p></li><li><p>Latency of 50&#8211;200ms per request is acceptable</p></li></ul><p><strong>Step 3: Name the anti-pattern you&#8217;re avoiding</strong></p><p>The most powerful version of a storage decision isn&#8217;t &#8220;I&#8217;d use Cassandra.&#8221; It&#8217;s &#8220;I&#8217;d use Cassandra instead of Postgres here because the write volume &#8212; 50,000 events per second &#8212; will exceed what a single Postgres instance can handle, and the queries are all partition-key-based so I don&#8217;t need the join capability I&#8217;d be giving up.&#8221;</p><p>The comparison forces you to show you considered the alternative. The reason forces you to show you understand the trade-off.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6P6a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6P6a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 424w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 848w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6P6a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png" width="1456" height="910" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:910,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:843986,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198945504?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6P6a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 424w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 848w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!6P6a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53eff2cc-6409-4619-8ab9-a104b73f9c9f_4400x2750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>The one rule that overrides everything</strong></p><p>If you need a multi-row ACID transaction &#8212; an operation where either all rows change or none do &#8212; you need a relational database or a relational-compatible distributed database (CockroachDB, Spanner). No amount of Cassandra tuning gives you true ACID across multiple partition keys.</p><p>Payment systems almost always need ACID. Account balances must be updated atomically. Inventory reservation must be atomic. Order creation and payment capture must be atomic.</p><p>&#8220;I&#8217;d use Cassandra for the payment ledger&#8221; is a common answer that fails almost every payment system design question. The interviewer will ask &#8220;what happens if the debit succeeds but the credit fails?&#8221; and there is no good answer with Cassandra.</p><p>Know what you&#8217;re trading away before you trade it.</p><div><hr></div><p><strong>CTA:</strong> The Stripe Payments walkthrough goes deep on exactly this decision &#8212; why the ledger needs ACID, how double-entry accounting makes the atomicity requirement explicit, and what happens at the infrastructure level when you enforce it. Paid post #2. </p><p><strong>Interested in mastering this topic?</strong></p><p>Unlock premium content with deeper explanations and real implementation patterns.</p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong><span>Access all 52 Questions </span><a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design Airbnb Booking System — Walkthrough]]></title><description><![CDATA[The probe]]></description><link>https://systemdr.systemdrd.com/p/design-airbnb-booking-system-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-airbnb-booking-system-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 18 Aug 2026 03:30:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0GhB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab4b5bf-7b59-42d6-9b17-9f0a5791910b_4750x4500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>The inventory reservation problem. A listing is available on specific dates, and two users trying to book the same listing for overlapping dates cannot both succeed. The hard problem: prevent double-booking without making the availability check and reservation a single-threaded bottleneck.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- Single room per listing (Airbnb) or multiple rooms (hotel)?</span></p><p><span>- Search: by location + date range + filters?</span></p><p><span>- Booking flow: instant book (reserve immediately) or request-to-book (host approves)? - How to handle the &#8220;someone else just booked it&#8221; race condition?</span></p><h2><span>Step 2 &#8212; Data Model</span></h2><p><span>listings: listing_id, host_id, title, location, price_per_night, instant_book (bool) availability: listing_id, date, status (available/blocked/reserved), booking_id (nullable) PRIMARY KEY: (listing_id, date) &#8212; one row per listing per night</span></p><p><span>bookings: booking_id, listing_id, guest_id, check_in, check_out, status</span></p><p><span>(pending/confirmed/cancelled),</span></p><p><span>total_price, idempotency_key, created_at</span></p><p><span>The availability table with one row per listing per night is the key data model decision. Date range availability check = SELECT COUNT(*) FROM availability WHERE listing_id=X AND date BETWEEN check_in AND check_out AND status=&#8217;available&#8217;. If count = (check_out - check_in) in days, all nights are available.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; Reservation flow (preventing double booking) BEGIN;</span></h2><p><span>-- Check all nights available and lock them</span></p><div class="callout-block" data-callout="true"><p><span>SELECT COUNT(*) FROM availability</span></p><p><span>WHERE listing_id=:lid AND date BETWEEN :check_in AND :check_out</span></p><p><span>AND status=&#8217;available&#8217;</span></p><p><span>FOR UPDATE; -- locks these rows</span></p><p><span>-- If count != nights_requested: ROLLBACK (someone else has them)</span></p><p><span>-- Reserve all nights atomically</span></p><p><span>UPDATE availability SET status=&#8217;reserved&#8217;, booking_id=:booking_id</span></p><p><span>WHERE listing_id=:lid AND date BETWEEN :check_in AND :check_out; -- Create booking record</span></p><p><span>INSERT INTO bookings VALUES (:booking_id, ...);</span></p><p><span>COMMIT;</span></p></div><p><span>The FOR UPDATE lock on the availability rows means only one transaction can proceed for any given listing+date combination. The second concurrent booking attempt blocks, then fails the count check when it finally runs.</span></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-airbnb-booking-system-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[ The Time Management Problem]]></title><description><![CDATA[The most common reason technically strong candidates get a &#8220;Hire&#8221; instead of &#8220;Strong Hire&#8221; is not technical depth.]]></description><link>https://systemdr.systemdrd.com/p/the-time-management-problem</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/the-time-management-problem</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 16 Aug 2026 03:30:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!LHuN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>The most common reason technically strong candidates get a &#8220;Hire&#8221; instead of &#8220;Strong Hire&#8221; is not technical depth. It&#8217;s running out of time before demonstrating it.</p><p>The deep dive section &#8212; the hard distributed systems problem at the center of the question &#8212; is where L5 separates from L4, and where L6 separates from L5. It&#8217;s also the section that gets cut when the interview runs short. You spent 20 minutes on estimation and API design and now you have 10 minutes left for the architecture and zero for the deep dive.</p></blockquote><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The fix is specific time checkpoints that you self-enforce in the room. Not approximate &#8212; specific.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LHuN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LHuN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 424w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 848w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LHuN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png" width="1456" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:766,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:932803,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198941510?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LHuN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 424w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 848w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 1272w, https://substackcdn.com/image/fetch/$s_!LHuN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F699b89b4-7c22-4380-a297-6d1a94bc4016_5225x2750.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>The 50-minute allocation</strong></p><p>Here is the allocation that consistently produces complete answers with time for depth:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8fty!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8fty!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 424w, https://substackcdn.com/image/fetch/$s_!8fty!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 848w, https://substackcdn.com/image/fetch/$s_!8fty!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 1272w, https://substackcdn.com/image/fetch/$s_!8fty!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8fty!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png" width="932" height="466" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:466,&quot;width&quot;:932,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:50877,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198941510?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8fty!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 424w, https://substackcdn.com/image/fetch/$s_!8fty!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 848w, https://substackcdn.com/image/fetch/$s_!8fty!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 1272w, https://substackcdn.com/image/fetch/$s_!8fty!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bb8ffe-c62d-4d06-bb65-351cae591e0f_932x466.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Total: 45&#8211;47 minutes, leaving a 3&#8211;5 minute buffer.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthrough</span></a></p><p><strong>The checkpoints to self-enforce</strong></p><p><strong>Minute 10:</strong> API must be drafted and scope must be locked. If you&#8217;re still asking clarifying questions at minute 10, you&#8217;ve spent your estimation time and you&#8217;ll have to compress the data model.</p><p><strong>Minute 22:</strong> Schema and key flows should be on the board. At this point you should have: at least two tables sketched with primary keys and indexes, and at least one paragraph of the architecture explained. If you&#8217;re still on API design at minute 22, move immediately.</p><p><strong>Minute 35:</strong> The deep dive must be in progress. Not about to start &#8212; actually underway. If you&#8217;re at minute 35 with only the high-level architecture sketched and no deep dive started, you have a problem. Stop the high-level walkthrough and pivot to the deep dive now. An incomplete high-level architecture plus a solid deep dive is worth more than a complete architecture with no deep dive.</p><p><strong>Minute 48:</strong> Trade-offs and failure modes should be underway. If you&#8217;re still deep-diving at minute 48, spend the last two minutes naming the top three things that break in your current design and what you&#8217;d do about them. Even naming them without a full answer is better than silence.</p><p><strong>The discipline required</strong></p><p>The hardest part of time management is stopping something that&#8217;s going well to move on.</p><p>You&#8217;re mid-explanation of the data model. It&#8217;s going well. You understand this part. The interviewer is nodding. You want to finish the thought.</p><p>Move anyway. The next section matters more than this one continued.</p><p>The data model section&#8217;s job is to demonstrate that you can design appropriate schemas with the right indexes and sharding strategy. Once that&#8217;s demonstrated &#8212; once you&#8217;ve covered the main table, the partition key, and at least one non-obvious design decision &#8212; the section is done. More detail doesn&#8217;t add signal; it steals time from sections where signal is still available.</p><p><strong>What to do when you fall behind</strong></p><p>If you realize you&#8217;re behind the checkpoints, the correct response is compression, not panic.</p><p>For the architecture: &#8220;Let me give you the key components and the main flows rather than a complete walkthrough.&#8221; Five minutes instead of ten. Names the components, traces one read path and one write path, stops.</p><p>For the data model: &#8220;The critical table here is the messages table &#8212; let me focus on that one rather than all five tables.&#8221; Two minutes instead of seven. Names the partition key, names the TTL strategy, stops.</p><p>For the API: &#8220;Three endpoints &#8212; the core create, read, and webhook. Let me sketch those quickly.&#8221; Two minutes. Moves on.</p><p>Compression is always better than omission. A compressed section signals that you know what you&#8217;re doing and are managing time deliberately. An omitted section is a missing signal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iQt3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iQt3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 424w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 848w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 1272w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iQt3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png" width="1456" height="828" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:828,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:951838,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198941510?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iQt3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 424w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 848w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 1272w, https://substackcdn.com/image/fetch/$s_!iQt3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5cf00de-809b-4aa5-adcd-3df5cc3a005b_5225x2970.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>The permission to be incomplete</strong></p><p>Most engineers feel they should finish each section before moving to the next. This intuition works in normal engineering work. In a timed interview, it&#8217;s wrong.</p><p>The interview is scored as a whole, not section by section. A round with complete clarification, estimation, API, data model, architecture, deep dive, and trade-offs &#8212; each at 70% coverage &#8212; scores better than a round with perfect clarification, estimation, and API at 100% coverage with no deep dive.</p><p>The deep dive is the section with the highest score differential. It&#8217;s where the round is decided. Everything before it is the setup. Don&#8217;t let the setup consume so much time that the payoff never arrives.</p><div><hr></div><p><strong>CTA:</strong> The drill cards have a time-box bar at the bottom of every card &#8212; the exact minute allocation for that specific question, weighted toward where the probe lands. All 37 are in the Vault.</p><blockquote><p><strong>Curious how this works in real systems?</strong> </p></blockquote><p>The paid lessons cover scalability, optimization, and real-world engineering patterns.</p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><div class="callout-block" data-callout="true"><p>The Question Vault has all 52 walkthroughs organized by archetype &#8212; so you can see the pattern across questions, not just the surface answer.</p><p><strong><span>Access all 52 Questions </span><a href="https://systemdrd.com/ebooks/52-faang-questions-drillcards-cheatsheets/">here</a></strong></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design Instagram Feed Ranking — Walkthrough ]]></title><description><![CDATA[The probe]]></description><link>https://systemdr.systemdrd.com/p/design-instagram-feed-ranking-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-instagram-feed-ranking-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 11 Aug 2026 03:31:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!j2sC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>Same fan-out architecture as Twitter Timeline, but the ranking model is more complex &#8212; Instagram ranks not just by recency but by predicted engagement (like, comment, share probability) for each specific user-post pair. The probe is the ranking pipeline and how features are assembled at query time without violating the 500ms SLO.</span></p></blockquote><p><span>Architecture delta from Twitter Timeline</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j2sC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j2sC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 424w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 848w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 1272w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j2sC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png" width="572" height="541.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1379,&quot;width&quot;:1456,&quot;resizeWidth&quot;:572,&quot;bytes&quot;:1387727,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/208037471?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j2sC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 424w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 848w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 1272w, https://substackcdn.com/image/fetch/$s_!j2sC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84d5a979-b8a5-4709-9540-b6efd2c75657_4750x4500.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-instagram-feed-ranking-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Three Gaps I See in Almost Every Cohort Assignment]]></title><description><![CDATA[After reading hundreds of system design assignments from cohort members, three gaps show up so consistently that I now watch for them specifically in every submission.]]></description><link>https://systemdr.systemdrd.com/p/three-gaps-i-see-in-almost-every</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/three-gaps-i-see-in-almost-every</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 09 Aug 2026 03:30:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Yi0V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After reading hundreds of system design assignments from cohort members, three gaps show up so consistently that I now watch for them specifically in every submission.</p><p>They&#8217;re not exotic. They&#8217;re not about knowing obscure algorithms. They&#8217;re about the difference between an answer that sounds right and an answer that demonstrates you understand what you&#8217;re designing.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>Gap 1: Numbers that don&#8217;t drive anything</strong></p><p>Most cohort members can estimate. They get DAU, they calculate requests per second, they calculate storage. The numbers are usually in the right order of magnitude.</p><p>Then the next section of their answer proceeds as if the numbers never existed.</p><p>&#8220;We&#8217;ll have approximately 50,000 writes per second&#8221; followed by &#8220;I&#8217;d store user data in a Postgres database.&#8221; No mention of whether Postgres handles 50,000 writes per second. No acknowledgment that this number might matter for the technology choice.</p><p>The numbers should be the <em>reason</em> for the architectural decisions. Not a box checked before the real answer begins.</p><p>The fix is simple: after every estimation number, add one sentence starting with &#8220;this means.&#8221; 50,000 writes per second &#8212; this means a single Postgres instance will be the bottleneck; I&#8217;ll need to either shard or move to a write-optimized store like Cassandra. Now the number is doing work.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yi0V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yi0V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 424w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 848w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 1272w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yi0V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png" width="506" height="328.760989010989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:946,&quot;width&quot;:1456,&quot;resizeWidth&quot;:506,&quot;bytes&quot;:892744,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198938714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yi0V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 424w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 848w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 1272w, https://substackcdn.com/image/fetch/$s_!Yi0V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba98adf2-a6b2-488c-8a50-d25f6f2118ba_4400x2860.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Gap 2: The happy path only</strong></p><p>Most cohort submissions design a system that works when everything goes right. The API is called, the database responds, the message is delivered. The walkthrough is coherent.</p><p>Then nothing goes wrong. There are no failure modes. There&#8217;s no offline user, no database timeout, no cache failure, no duplicate message delivery.</p><p>The simplest version of this is in the messaging question: a candidate designs the delivery path for an online user but never addresses what happens when the recipient is offline. The question literally asks about this. The omission is not subtle.</p><p>The fix is one explicit section at the end of every design: &#8220;three things that break.&#8221; Name them, name the conditions, and describe how you detect and handle each. Even if the answer is &#8220;we&#8217;d accept degraded behavior and alert on it&#8221; &#8212; that&#8217;s a real answer.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Subscribe for Question Walkthrough&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Subscribe for Question Walkthrough</span></a></p><p><strong>Gap 3: Decisions without reasons</strong></p><p>&#8220;I&#8217;d use Kafka for the event stream.&#8221;</p><p>Why Kafka? This sentence appears in dozens of submissions every cohort. Sometimes Kafka is the right answer. Sometimes a simple SQS queue would be better. Sometimes a database table with <code>FOR UPDATE SKIP LOCKED</code> is better. The choice depends entirely on the requirements.</p><p>When you state a technology choice without a reason, you&#8217;re signaling that you know the word, not the trade-off. The interviewer probes exactly here. &#8220;Why Kafka over something simpler?&#8221; is one of the most common follow-up questions in design interviews.</p><p>The fix is to never name a technology without one of these two phrases following it: &#8220;because&#8221; or &#8220;instead of.&#8221;</p><p>&#8220;I&#8217;d use Kafka because the producers and consumers have different throughput &#8212; decoupling them lets each scale independently.&#8221; Now the choice has a reason.</p><p>&#8220;I&#8217;d use Redis instead of Memcached because we need persistence and sorted sets for the leaderboard.&#8221; Now the choice has a comparison.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wWkT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wWkT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 424w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 848w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 1272w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wWkT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png" width="582" height="349.3598901098901" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:874,&quot;width&quot;:1456,&quot;resizeWidth&quot;:582,&quot;bytes&quot;:651115,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://systemdr.systemdrd.com/i/198938714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wWkT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 424w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 848w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 1272w, https://substackcdn.com/image/fetch/$s_!wWkT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12921f23-23f7-4b35-843c-72df75f18203_4400x2640.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Why these gaps matter more than knowledge gaps</strong></p><p>The three things above &#8212; numbers with consequences, failure modes, and reasoned decisions &#8212; are what experienced engineers do automatically when they design systems. Not because they&#8217;re trying to impress anyone. Because they&#8217;ve been on-call for systems that failed when the failure mode wasn&#8217;t anticipated, and they&#8217;ve had to defend technology choices to skeptical colleagues.</p><p>The interview is asking: does this person think like someone who has built and operated real systems?</p><p>The three gaps signal no, even when the technical knowledge is there.</p><p>If your answers have all three gaps, the fix is not more studying. It&#8217;s one mock interview where you discipline yourself to add &#8220;this means,&#8221; &#8220;three things that break,&#8221; and &#8220;instead of&#8221; to every section of your answer.</p><div><hr></div><p><strong>CTA:</strong> The cohort curriculum is built around closing exactly these three gaps &#8212; each module targets one of them directly. </p><h2><strong>Subscription link</strong></h2><p><a href="https://systemdr.systemdrd.com/subscribe">https://systemdr.systemdrd.com/subscribe</a></p><p>&#8212;Sumedh</p><p><strong>Curious how this works in real systems?</strong></p><p>The paid lessons cover scalability, optimization, and real-world engineering patterns.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">System Design Interview Roadmap is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design Slack — Walkthrough ]]></title><description><![CDATA[The probe]]></description><link>https://systemdr.systemdrd.com/p/design-slack-walkthrough</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/design-slack-walkthrough</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Tue, 04 Aug 2026 03:31:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hqd_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4ac38f6-a849-45c7-b1df-4e607a1b1d10_6000x4500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><span>The probe</span></h2><blockquote><p><span>Slack is WhatsApp + channels + threads + search. </span></p><p><span>The messaging core is identical to WhatsApp (WebSocket, Cassandra, delivery semantics). The probes unique to Slack: channel message fan-out (a channel with 10,000 members means one message = 10,000 deliveries), message threading (replies live in a separate namespace from channel messages), and full-text search over message history.</span></p></blockquote><h2><span>Step 1 &#8212; Clarify</span></h2><p><span>- Direct messages only, or channels + DMs + threads? (Scope to channels + DMs) - Search over message history? (Yes &#8212; search is a major Slack differentiator) - Max members per channel? (Slack allows ~10K for standard, unlimited for Enterprise Grid)</span></p><p><span>- File sharing? (Yes &#8212; same object storage pattern as WhatsApp media) - SLO: message delivery &lt; 200ms p99 within same workspace</span></p><h2><span>Step 2 &#8212; Estimate</span></h2><p><span>- 20M DAU &#215; 200 messages/day = 4B messages/day = ~46K messages/sec - Average channel size: 50 members &#8594; fan-out 50 deliveries per message - Large channels (10K members): 1 message = 10K WebSocket pushes - Message retention: Slack keeps all history (unlimited on paid plans) &#8594; ~500 bytes/msg &#215; 4B msgs/day &#215; 365 days = ~730 TB/year</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://systemdr.systemdrd.com/subscribe&quot;,&quot;text&quot;:&quot;Get Access to GitHub Repo&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://systemdr.systemdrd.com/subscribe"><span>Get Access to GitHub Repo</span></a></p><h2><span>Step 3 &#8212; API Design</span></h2><p><span>WebSocket: wss://slack.com/connect (per workspace per device)</span></p><div class="callout-block" data-callout="true"><p><span>POST /v1/messages</span></p><p><span>Body: { channel_id, text, thread_ts (optional &#8212; reply), blocks[], files[] }</span></p><p><span>Idempotency-Key: header</span></p><p><span>Response: { ts (message timestamp, also its ID), channel_id }</span></p><p><span>GET /v1/channels/:channel_id/messages</span></p><p><span>Query: cursor, limit, oldest, latest (time range)</span></p><p><span>Response: { messages[], has_more, next_cursor }</span></p><p><span>POST /v1/search</span></p><p><span>Body: { query, channel_ids[], from_user, date_range }</span></p><p><span>Response: { messages: [{ts, channel_id, text, permalink}], total }</span></p></div><p><span>ts (timestamp) is Slack&#8217;s actual message ID &#8212; a Unix timestamp with microsecond precision, unique per channel.</span></p><h2><span>Step 4 &#8212; Data Model</span></h2><p><span>- </span><strong><span>messages </span></strong><span>(Cassandra): PARTITION BY channel_id, CLUSTER BY ts DESC &#8212; identical pattern to WhatsApp but scoped to channel</span></p><p><span>- </span><strong><span>threads</span></strong><span>: thread_ts (FK to parent message ts), reply messages in same table with thread_ts as additional cluster key</span></p><p><span>- </span><strong><span>channel_members</span></strong><span>: channel_id, user_id, joined_at &#8212; indexed both ways (channel&#8594;members for fan-out, user&#8594;channels for sidebar)</span></p><p><span>- </span><strong><span>search_index </span></strong><span>(Elasticsearch): message ts, channel_id, text, user_id, timestamp &#8212; updated async via Kafka consumer</span></p><p><span>- </span><strong><span>unread_counts </span></strong><span>(Redis): user_id:channel_id &#8594; {unread_count, last_read_ts} &#8212; updated on every message and read event</span></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/design-slack-walkthrough">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>