<?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]]></title><description><![CDATA[System Design Interview Roadmap - Step by step process that will make you comfortable, familiar & then expert. Preparing for a system design interview, probably at a FAANG-tier company, probably at L4–L6. That's exactly who this newsletter.]]></description><link>https://systemdr.systemdrd.com</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</title><link>https://systemdr.systemdrd.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 15 Sep 2026 05:55:05 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[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"><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"><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"><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"><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"><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"><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"><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"><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[Model Registry & Versioning: Managing the Lifecycle of ML Models]]></title><description><![CDATA[A model registry sounds like a fancy word for a spreadsheet, and for the first six months at most companies, that&#8217;s exactly what it is.]]></description><link>https://systemdr.systemdrd.com/p/model-registry-and-versioning-managing</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/model-registry-and-versioning-managing</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sat, 12 Sep 2026 10:48:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_V5P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc916ab33-fc17-4bc7-9777-71ff3386831a_883x551.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A model registry sounds like a fancy word for a spreadsheet, and for the first six months at most companies, that&#8217;s exactly what it is. A shared folder full of <code>model_v2_final_ACTUAL.pkl</code> files, a Slack thread deciding which one is live, and one engineer who happens to remember which checkpoint got rolled back in March. It works until the day it doesn&#8217;t &#8212; usually right after someone promotes the wrong artifact to production at 2 a.m. and spends four hours figuring out which of nine near-identical <code>.pt</code> files is the one currently serving traffic.</p><p><em>(Knowledge cutoff note: registry tooling in this space &#8212; MLflow, Vertex AI Model Registry, SageMaker Model Registry &#8212; moves fast. Version numbers and feature sets below reflect general architecture, not a specific release; check current docs before treating any tool-specific detail as current.)</em></p><h2>What a Registry Actually Does</h2><p>A model registry is a system of record for trained models: it tracks every version of every model, the metadata that describes it (framework, training data hash, evaluation metrics, who trained it and when), and &#8212; the part people underestimate &#8212; its current lifecycle stage. Stages are typically something like <code>None &#8594; Staging &#8594; Production &#8594; Archived</code>, and the registry enforces transitions between them rather than just labeling them.</p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/model-registry-and-versioning-managing">
              Read more
          </a>
      </p>
   ]]></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"><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"><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"><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"><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"><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"><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"><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"><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[Feature Stores Explained: Storing and Serving ML Features in Real-Time]]></title><description><![CDATA[Section 9: AI & LLM Infrastructure]]></description><link>https://systemdr.systemdrd.com/p/feature-stores-explained-storing</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/feature-stores-explained-storing</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Fri, 04 Sep 2026 08:30:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!MtgH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The Problem Nobody Talks About in ML Courses</h2><blockquote><p>You train a model offline. It performs brilliantly on test data. You deploy it. A week later, predictions drift &#8212; not because the model is wrong, but because the feature <code>user_purchase_count_last_30d</code> computed during training used a batch job that runs at 2 AM, while the production API computes the same feature on-the-fly using a different SQL query on a slightly different dataset. Same name. Different logic. Silent divergence.</p></blockquote><p>This is <strong>training-serving skew</strong>, and it&#8217;s responsible for more production ML failures than model architecture ever will be. Feature stores exist to eliminate it &#8212; and that&#8217;s just the first problem they solve.</p><div><hr></div><h2>Core Concept: What a Feature Store Actually Is</h2><p>A feature store is a data system purpose-built for one job: computing, storing, and serving ML features consistently across training and inference. It sits between your raw data sources and your models, acting as a shared registry and serving layer.</p><p>The architecture splits into three planes:</p><p><strong>1. The Feature Registry (Metadata Layer)</strong> Every feature has a definition &#8212; the transformation logic, data source, owner, freshness requirement, and schema. The registry stores these definitions as code (not documentation). Tools like Feast use Python-defined <code>FeatureView</code> objects that describe how to compute a feature from a data source. Tecton adds a scheduling engine on top, treating features like managed pipelines rather than raw definitions.</p><p><strong>2. The Offline Store (Historical Data)</strong> Training needs point-in-time correct data &#8212; the feature value as it existed <em>at the moment of the label</em>, not today&#8217;s value. This is harder than it sounds. If you&#8217;re predicting loan default at <code>t=0</code>, <code>account_balance</code> must reflect the value at <code>t=0</code>, not the current balance. Offline stores (typically Hive, BigQuery, Redshift, or Parquet on S3) store timestamped feature snapshots and support <strong>point-in-time joins</strong> &#8212; a specialized merge that avoids future data leakage.</p><p><strong>3. The Online Store (Low-Latency Serving)</strong> Inference requires sub-10ms lookups. Batch snapshots are materialized into a key-value store (Redis, DynamoDB, Cassandra) and served via a gRPC or REST endpoint. The key is always an entity ID (<code>user_id</code>, <code>order_id</code>) and the value is the latest pre-computed feature vector.</p><p>The pipeline connecting offline to online is the <strong>materialization job</strong> &#8212; a scheduled or streaming process that reads from your data warehouse and writes current feature values to the online store. Feast supports batch materialization via Spark. Tecton adds native streaming materialization via Kafka/Flink, enabling features with freshness measured in seconds rather than hours.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MtgH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MtgH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MtgH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png" width="1456" height="938" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:938,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2166695,&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.substack.com/i/192192252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.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_!MtgH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!MtgH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52e867d4-ca80-47f9-97d2-c9d5eed86fb5_4950x3190.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"><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"><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"><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"><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></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/feature-stores-explained-storing">
              Read more
          </a>
      </p>
   ]]></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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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[Building an AI Agent Framework: Memory, Tools, and Planning Modules]]></title><description><![CDATA[The Dispatch Problem]]></description><link>https://systemdr.systemdrd.com/p/building-an-ai-agent-framework-memory</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/building-an-ai-agent-framework-memory</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Fri, 21 Aug 2026 08:30:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!W4LA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The Dispatch Problem</h2><p>A customer support system at a fintech startup gets this message: <em>&#8220;My transfer failed yesterday, can you check the status and also tell me if my tier qualifies for waived fees?&#8221;</em></p><blockquote><p>A dumb LLM call answers one question and halts. A well-built agent understands this requires two tool calls (transaction lookup, account tier check), sequencing them based on partial results, remembering context from earlier in the conversation, and producing a single coherent reply.</p></blockquote><blockquote><p>The difference between these two outcomes is not the model &#8212; it&#8217;s the <strong>agent framework</strong> wrapped around it. Understanding how memory, tools, and planning modules fit together is the foundational skill for anyone building production AI systems in 2025 and beyond.</p></blockquote><div><hr></div><h2>Core Concept: The Three-Module Architecture</h2><p>An agent framework is a runtime loop that connects an LLM to the outside world through three distinct subsystems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W4LA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W4LA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 424w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 848w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 1272w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W4LA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png" width="1456" height="948" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:948,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3297881,&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.substack.com/i/191959350?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.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_!W4LA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 424w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 848w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.png 1272w, https://substackcdn.com/image/fetch/$s_!W4LA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc638801-c706-476f-a873-b97cff2e8d79_4730x3080.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"><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"><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"><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"><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></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/building-an-ai-agent-framework-memory">
              Read more
          </a>
      </p>
   ]]></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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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[Semantic Search vs. Keyword Search: System Design Trade-offs]]></title><description><![CDATA[Introduction]]></description><link>https://systemdr.systemdrd.com/p/semantic-search-vs-keyword-search</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/semantic-search-vs-keyword-search</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Fri, 14 Aug 2026 08:30:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!b4Px!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2><blockquote><p>A user types &#8220;something comfortable for standing all day in a hospital.&#8221; Your keyword index scans every product title and description for those exact tokens. Nothing meaningful surfaces. Your competitor, running a vector search pipeline, returns slip-resistant nursing clogs, anti-fatigue mats, and compression socks &#8212; none of which share a single word with the query. That gap &#8212; between what people type and what they mean &#8212; is the architectural problem at the center of this article, and the reason the two approaches have completely different infrastructure profiles.</p></blockquote><div><hr></div><h2>Keyword Search: Inverted Indexes and BM25</h2><p>Keyword search is built on the inverted index. For every unique term in your corpus, the index stores a posting list: the sorted set of document IDs containing that term, annotated with position and frequency metadata. At query time, the engine tokenizes the query, retrieves each term&#8217;s posting list, and scores matching documents using BM25 &#8212; a probabilistic ranking function derived from TF-IDF with two improvements: term frequency saturation and document length normalization.</p><p>The BM25 score for a document <em>D</em> against query <em>Q</em> is:</p><pre><code><code>score(D,Q) = &#931; IDF(qi) &#183; [f(qi,D) &#183; (k1+1)] / [f(qi,D) + k1&#183;(1 &#8722; b + b&#183;|D|/avgdl)]
</code></code></pre><p>The parameter <code>k1</code> (default 1.2&#8211;2.0) controls how fast additional term occurrences stop adding relevance. The parameter <code>b</code> (default 0.75) penalizes long documents to prevent them from dominating purely by volume. These defaults work across most corpora without tuning.</p><blockquote><p>Latency is predictable: O(log n) for the term lookup, linear in posting list size for scoring. Elasticsearch handles 10,000+ QPS on commodity hardware with p99 latency under 10ms for standard full-text workloads. The index is compact, deterministic, and easy to debug &#8212; you can reconstruct exactly why a document ranked where it did.</p></blockquote><p>The hard limit is vocabulary mismatch. &#8220;Cardiac event&#8221; and &#8220;heart attack&#8221; are clinically synonymous but share zero tokens. &#8220;Python&#8221; is a language or a reptile. &#8220;Memory leak&#8221; and &#8220;heap overflow&#8221; describe overlapping problems. The index doesn&#8217;t model meaning, only token co-occurrence.</p><h2>Semantic Search: Embeddings and ANN Retrieval</h2><blockquote><p>Semantic search encodes both documents and queries into dense vectors using transformer-based embedding models &#8212; typically producing 384- to 1536-dimensional float32 vectors. The model maps semantically similar text to nearby points in vector space, measured by cosine similarity. If the embedding model has learned that &#8220;heart attack&#8221; and &#8220;myocardial infarction&#8221; are synonymous, their vectors cluster together regardless of surface form.</p></blockquote><p>The index structure is fundamentally different. Instead of an inverted posting list, you need an Approximate Nearest Neighbor (ANN) index. HNSW &#8212; Hierarchical Navigable Small World &#8212; is the dominant structure in production. It organizes vectors as a multi-layer proximity graph: coarse layers for fast long-range navigation, fine layers for precise local search. Query time navigates from coarse to fine, achieving O(log n) amortized complexity with recall configurable via the <code>ef</code> parameter.</p><blockquote><p>The end-to-end pipeline: documents are chunked &#8594; encoded by the embedding model &#8594; stored in the vector index. Queries are encoded at query time before retrieval. Embedding latency is 5&#8211;15ms for compact models like <code>all-MiniLM-L6-v2</code> and 30&#8211;80ms for larger 7B-parameter models. HNSW search adds 5&#8211;30ms depending on index size and <code>ef</code>. Total query time: 10&#8211;50ms typical, vs keyword&#8217;s 1&#8211;10ms.</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_!b4Px!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b4Px!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 424w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 848w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 1272w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b4Px!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png" width="1456" height="950" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:950,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1366706,&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.substack.com/i/191957893?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.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_!b4Px!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 424w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 848w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.png 1272w, https://substackcdn.com/image/fetch/$s_!b4Px!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd93b4b4d-75a6-4221-bc44-de1de0767ee9_5060x3300.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"><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"><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"><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"><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></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/semantic-search-vs-keyword-search">
              Read more
          </a>
      </p>
   ]]></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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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"><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[ GPU Scheduling & Utilization: How Kubernetes Manages AI Hardware Resources]]></title><description><![CDATA[Introduction]]></description><link>https://systemdr.systemdrd.com/p/gpu-scheduling-and-utilization-how</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/gpu-scheduling-and-utilization-how</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Fri, 07 Aug 2026 08:31:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gCAZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2><blockquote><p>A training job lands in your cluster. It requests 4 GPUs. Your cluster has 8 GPUs across 4 nodes &#8212; 2 per node. The job sits <code>Pending</code> for 11 minutes before the scheduler finds a fit. Meanwhile, a researcher watching a progress bar assumes their cloud bill is accumulating. It is. The cluster is doing nothing useful. This is not a capacity problem. It is a scheduling problem, and it is more common than most platform teams admit.</p></blockquote><h2>How Kubernetes Sees a GPU</h2><p>Kubernetes has no native GPU awareness. The kernel does. The gap is bridged by a device plugin &#8212; a DaemonSet running on each node that advertises resources to the kubelet using a gRPC interface. NVIDIA&#8217;s device plugin, for instance, registers <code>nvidia.com/gpu</code> as an extended resource and tells the kubelet exactly how many are available.</p><blockquote><p>When a pod requests <code>nvidia.com/gpu: 2</code>, the scheduler treats this resource identically to how it treats CPU or memory: as an integer that must be satisfied on a single node. The GPU is not a shared resource in the default model. A GPU requested by one pod is exclusively allocated to it until the pod terminates. This matters enormously for utilization math.</p></blockquote><p>The scheduler&#8217;s default behavior is bin-packing when <code>LeastAllocated</code> priority is off, or spreading when it&#8217;s on. For GPU workloads, bin-packing tends to produce better utilization &#8212; it concentrates GPU jobs onto fewer nodes, leaving entire GPU nodes free for large multi-GPU jobs rather than leaving each node half-occupied and unusable.</p><h3>What Happens at Allocation</h3><ol><li><p>The scheduler scores candidate nodes using configured priority functions.</p></li><li><p>A node passes if its free <code>nvidia.com/gpu</code> count is &#8805; the pod&#8217;s request.</p></li><li><p>The kubelet on the winning node calls the device plugin&#8217;s <code>Allocate()</code> RPC.</p></li><li><p>The device plugin returns a set of environment variables (<code>CUDA_VISIBLE_DEVICES</code>) and optional mounts.</p></li><li><p>The container runtime injects these into the container, making specific GPU indices visible.</p></li></ol><p>The pod never directly names a GPU. It gets whatever the plugin assigns. This is by design &#8212; the plugin handles NUMA affinity, topology constraints, and MIG configuration below the Kubernetes layer.</p><h3>MIG and Time-Slicing Change the Unit of Allocation</h3><blockquote><p>On NVIDIA A100 and H100 GPUs, Multi-Instance GPU (MIG) partitions a physical GPU into isolated instances with dedicated memory and compute slices. A100 80GB can yield up to 7 MIG instances (<code>1g.10gb</code> profile), each behaving like an independent smaller GPU. The device plugin can advertise these as <code>nvidia.com/mig-1g.10gb</code> resources. A pod requesting one instance gets guaranteed isolation &#8212; no memory bandwidth contention with other tenants on the same card.</p></blockquote><p>Time-slicing is the alternative for GPUs that don&#8217;t support MIG (or when you need more than 7 partitions). The plugin oversubscribes the GPU, advertising N logical GPUs where N = physical &#215; replicas. Multiple pods get <code>CUDA_VISIBLE_DEVICES</code> pointing at the same physical device. There is no memory isolation. If your LLM inference pod OOMs, it takes every co-located pod with it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gCAZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gCAZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gCAZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png" width="1456" height="938" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:938,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2206960,&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.substack.com/i/191556830?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.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_!gCAZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!gCAZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f521f22-6664-4048-9c00-b2a04526968e_4950x3190.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"><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"><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"><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"><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></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/gpu-scheduling-and-utilization-how">
              Read more
          </a>
      </p>
   ]]></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><item><title><![CDATA[Why Strong Engineers Fail the Design Round]]></title><description><![CDATA[The system design interview round has a failure rate that surprises most engineers when they first encounter it.]]></description><link>https://systemdr.systemdrd.com/p/why-strong-engineers-fail-the-design</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/why-strong-engineers-fail-the-design</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Sun, 02 Aug 2026 03:30:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!MHid!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>The system design interview round has a failure rate that surprises most engineers when they first encounter it. Strong engineers &#8212; people who are genuinely good at their jobs, who have built real systems, who know distributed systems concepts &#8212; fail this round at a rate that doesn&#8217;t correlate with their actual technical competence.</p></blockquote><p>After reading enough post-mortems, the failure pattern is consistent. It&#8217;s almost never the technical content.</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>Failure mode 1: designing instead of scoping</strong></p><p>The question is &#8220;design Twitter.&#8221; The candidate starts designing Twitter. The entire Twitter.</p><p>Fifty minutes is not enough time to design a system with the surface area of Twitter. Everyone who attempts to design all of it produces a shallow sketch of everything. The interviewer wanted a deep design of one or two components. The candidate gave a shallow design of twelve.</p><p>The fix is the first five minutes of the interview. Use them to scope explicitly: &#8220;There are several interesting subsystems here. For this interview, I&#8217;m going to focus on the timeline and the fan-out architecture. I&#8217;ll acknowledge notifications, search, and ads exist but won&#8217;t design them &#8212; does that work for you?&#8221;</p><p>Most interviewers say yes. If they don&#8217;t, they redirect you to what they actually want to probe. Either way you&#8217;ve avoided spending 45 minutes designing the wrong thing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MHid!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MHid!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 424w, https://substackcdn.com/image/fetch/$s_!MHid!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 848w, https://substackcdn.com/image/fetch/$s_!MHid!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 1272w, https://substackcdn.com/image/fetch/$s_!MHid!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MHid!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png" width="1456" height="777" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:777,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:994302,&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/198938474?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.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_!MHid!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 424w, https://substackcdn.com/image/fetch/$s_!MHid!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 848w, https://substackcdn.com/image/fetch/$s_!MHid!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.png 1272w, https://substackcdn.com/image/fetch/$s_!MHid!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210c7de0-e005-4b83-9be2-79382f579fd3_4950x2640.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"><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"><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"><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"><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>Failure mode 2: communicating at the wrong level</strong></p><p>&#8220;I&#8217;d use a database for user data and a cache for performance.&#8221;</p><p>This sentence tells an interviewer almost nothing. Which database? Which cache? What&#8217;s being cached? Why? What&#8217;s the eviction strategy? What happens on cache miss?</p><p>The problem isn&#8217;t that the candidate doesn&#8217;t know the answers. They often do. The problem is they&#8217;re communicating at the level of &#8220;I&#8217;ve heard of these technologies&#8221; rather than &#8220;I understand the trade-offs.&#8221;</p><p>The fix is the three-sentence pattern: the decision, the reason, and the condition under which you&#8217;d change your mind. &#8220;I&#8217;d use Redis for the timeline cache with LRU eviction and a 24-hour TTL. The hot read pattern is point lookups by user_id, and Redis&#8217;s sub-millisecond gets absorb the read load that would otherwise hit Postgres on every feed request. If the working set grows beyond 20% of total DAU being simultaneously active, I&#8217;d evaluate a tiered cache.&#8221;</p><p>That&#8217;s the same knowledge communicated at the right level.</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>Failure mode 3: treating the interviewer as an adversary</strong></p><p>The design round is not an oral exam. The interviewer is not trying to catch you out.</p><p>Candidates who treat it like an exam defend their choices when challenged, interpret probing questions as criticism, and become less flexible as the round goes on. The interviewer asks &#8220;what if the scale was 10&#215; what you assumed?&#8221; and the candidate hears &#8220;your estimation was wrong&#8221; and gets defensive.</p><p>The more useful interpretation: the interviewer is helping you get to the interesting part of the question. When they push back, follow their lead. &#8220;Good point &#8212; at 10&#215; scale, the component that breaks first is the Postgres write path. Let me address that.&#8221;</p><p><strong>Failure mode 4: running out of time before the deep dive</strong></p><p>The deep dive &#8212; the hard distributed systems problem at the center of the question &#8212; is where the round is decided. It&#8217;s where L5 candidates separate from L4, and where L6 candidates separate from L5.</p><p>It&#8217;s also the section that gets cut when time runs out.</p><p>The fix is self-enforcing time checkpoints. Minute 10: API must be drafted, scope locked. Minute 20: schema and key flows sketched. Minute 35: deep dive in progress. Minute 48: trade-offs and failure modes underway.</p><p>If you&#8217;re at minute 25 with no architecture on the board, the correct move is to stop wherever you are, skip to the architecture, and do it roughly. A rough architecture with a deep dive is more valuable than a complete schema with no architecture.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y9fW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y9fW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 424w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 848w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 1272w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y9fW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png" width="624" height="222" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:518,&quot;width&quot;:1456,&quot;resizeWidth&quot;:624,&quot;bytes&quot;:619638,&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/198938474?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.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_!Y9fW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 424w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 848w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 1272w, https://substackcdn.com/image/fetch/$s_!Y9fW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1a7035e-2bc6-4da7-9671-9dd303d2d267_4950x1760.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><strong>The pattern</strong></p><p>All four failure modes are communication problems, not knowledge problems.</p><p>If you&#8217;ve done the technical prep and you&#8217;re still not passing, the problem is almost certainly one of these four. The fix is not more reading. It&#8217;s a timed mock interview with someone who will score you specifically on scope management, communication depth, interviewer collaboration, and time allocation.</p><p>Knowledge gets you to the room. Communication gets you the offer.</p><div><hr></div><p><strong>CTA:</strong> If you recognise one of these four failure modes in your own prep &#8212; reply and tell me which one. I answer every reply and if you describe your specific situation I&#8217;ll point you to the right resource. </p><p><br><strong>Subscription link</strong></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 Quesstions </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[Fine-Tuning Pipelines: Designing the Architecture for Custom Model Training]]></title><description><![CDATA[Introduction]]></description><link>https://systemdr.systemdrd.com/p/fine-tuning-pipelines-designing-the</link><guid isPermaLink="false">https://systemdr.systemdrd.com/p/fine-tuning-pipelines-designing-the</guid><dc:creator><![CDATA[System Design Roadmap]]></dc:creator><pubDate>Fri, 31 Jul 2026 08:30:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!NDQp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2><blockquote><p>A base model is a hypothesis. A fine-tuned model is a product. The gap between those two things isn&#8217;t mathematical &#8212; it&#8217;s operational. Teams that treat fine-tuning as &#8220;run a script in a notebook&#8221; eventually hit a wall: reproducibility breaks, models regress silently, datasets drift, and nobody can explain which checkpoint shipped to production last Tuesday. Designing a fine-tuning pipeline is fundamentally a distributed systems problem wearing an ML hat.</p></blockquote><div><hr></div><h2>Core Concept: The Fine-Tuning Pipeline</h2><blockquote><p>Fine-tuning adapts a pre-trained foundation model to a specific task by continuing training on a curated domain dataset. The challenge isn&#8217;t the gradient math &#8212; it&#8217;s orchestrating the data, compute, validation, and versioning layers into a system that behaves correctly under failure, scales without bottlenecks, and produces artifacts you can actually trust.</p></blockquote><p>A production fine-tuning pipeline has five distinct stages that must be independently restartable and observable.</p><p><strong>Stage 1 &#8212; Data Ingestion &amp; Versioning</strong> Raw training data arrives from object storage (S3, GCS), annotation pipelines, or RLHF feedback systems. Before anything trains, every dataset version must be fingerprinted. Tools like DVC or Delta Lake provide immutable dataset snapshots. The failure pattern here: teams that skip versioning can&#8217;t answer &#8220;what data produced this model?&#8221; six months later &#8212; which kills audit trails and compliance.</p><p><strong>Stage 2 &#8212; Preprocessing &amp; Tokenization</strong> Raw text gets cleaned, filtered for quality (perplexity filtering, dedup via MinHash LSH), and tokenized into packed sequences. This stage runs on CPU-heavy workers (separate from GPU training nodes) and produces binary shard files. A common mistake: running tokenization inside the training loop wastes GPU cycles on CPU-bound work and creates non-deterministic throughput under variable data shapes.</p><p><strong>Stage 3 &#8212; Training Job Orchestration</strong> The training job itself is submitted to a job scheduler (Ray, Slurm, Kubernetes Job API) with explicit resource requests. Key decisions here: gradient checkpointing to trade compute for memory, mixed-precision (bf16/fp16) to reduce VRAM pressure, and gradient accumulation to simulate large batch sizes across limited hardware. For distributed runs, you choose between data parallelism (each node holds the full model), tensor parallelism (model sharded across nodes), or pipeline parallelism (model layers split across stages). Each has distinct failure modes &#8212; pipeline parallelism, for instance, introduces pipeline bubbles that reduce GPU utilization.</p><p><strong>Stage 4 &#8212; Checkpoint Management</strong> Training jobs die. GPU nodes preempt. Cloud spot instances evict. Checkpoints must be written to durable storage at regular intervals and the pipeline must resume from the latest valid checkpoint without human intervention. A subtlety: corrupted checkpoints (written during a crash) need detection logic. Write to a temp path, validate, then atomic rename.</p><p><strong>Stage 5 &#8212; Evaluation, Registry &amp; Promotion</strong> After training completes, the model runs against a frozen eval harness &#8212; benchmark tasks that don&#8217;t change between runs, covering both target task performance and regression tests for general capabilities. Models that pass thresholds get registered in a model registry (MLflow, Weights &amp; Biases Registry, or custom) with full lineage metadata: dataset version, hyperparameters, hardware config, eval scores. Promotion to staging or production requires explicit human approval or automated A/B gate logic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NDQp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NDQp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NDQp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png" width="1456" height="938" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:938,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2859002,&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.substack.com/i/191362442?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.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_!NDQp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 424w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 848w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.png 1272w, https://substackcdn.com/image/fetch/$s_!NDQp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92b1ca2c-356a-4c2d-8e27-b11d494b999a_4950x3190.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"><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"><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"><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"><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></p>
      <p>
          <a href="https://systemdr.systemdrd.com/p/fine-tuning-pipelines-designing-the">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>