<?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[The System Design Newsletter]]></title><description><![CDATA[Download my best playbooks on newsletter signup for free]]></description><link>https://newsletter.systemdesign.one</link><image><url>https://substackcdn.com/image/fetch/$s_!W5r-!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1c8067a-95bb-416b-9114-e0b9fb8821d4_256x256.png</url><title>The System Design Newsletter</title><link>https://newsletter.systemdesign.one</link></image><generator>Substack</generator><lastBuildDate>Mon, 02 Nov 2026 08:56:06 GMT</lastBuildDate><atom:link href="https://newsletter.systemdesign.one/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Neo Kim]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[systemdesignone@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[systemdesignone@substack.com]]></itunes:email><itunes:name><![CDATA[Neo Kim]]></itunes:name></itunes:owner><itunes:author><![CDATA[Neo Kim]]></itunes:author><googleplay:owner><![CDATA[systemdesignone@substack.com]]></googleplay:owner><googleplay:email><![CDATA[systemdesignone@substack.com]]></googleplay:email><googleplay:author><![CDATA[Neo Kim]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How to Cut Your Claude Code Token Usage]]></title><description><![CDATA[#198: Part 5 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-token-usage</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-token-usage</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sat, 31 Oct 2026 16:00:47 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3008c11a-7223-4c72-b555-490d7d392173_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my AI engineering playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-token-usage/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Every Claude session starts with context:</span></p><ul><li><p>conversation,</p></li><li><p><span>your prompts,</span></p></li><li><p>your CLAUDE.md,</p></li><li><p>instructions added by the Anthropic team,</p></li><li><p><span>and everything Claude knows about the task.</span></p></li></ul><p><span>But Claude has a &#8220;limit&#8221;&#8230;</span></p><p><span>Every file you paste, every tool you connect, and every long conversation you keep alive uses part of that limit.</span></p><p><span>So if your context is draining quickly, the simplest &amp; best option is to start a new conversation instead of waiting for Claude to compact everything.</span></p><p><span>In this newsletter, we&#8217;ll cover habits that help you use Claude&#8217;s context more efficiently &amp; wisely.</span></p><p><span>To do that, we won&#8217;t just follow practical tips.</span></p><p><span>(We&#8217;ll also test different approaches &amp; compare the results side by side.)</span></p><p><span>Let&#8217;s get started!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><a href="https://psxid.figma.com/neo_agent">If you have multiple interests, please take advantage of AI agents</a></h2><p>Software engineers were encouraged to specialize for years.</p><p>Backend. Frontend. Infrastructure.</p><p>But AI agents are making it easier to explore disciplines outside your expertise.</p><p>So how do you actually use them in a real-world workflow?</p><p>I focus on backend engineering, but recently wanted to try full-stack development for a personal project. I needed a consistent design system, polished screens, and all the UI states a frontend needs.</p><p>So I used <strong><a href="https://psxid.figma.com/neo_agent">Figma agent</a></strong> to help review and refine my existing designs.</p><p>I started with my design context and ran the <strong><a href="https://www.figma.com/community/skill/60839/ui-state-expander">/ui-state-expander skill</a></strong> to identify missing loading, empty, error, and interaction states.</p><p>The result was a workflow I could use to move from existing designs toward implementation:</p><ol><li><p>Start with an existing design</p></li><li><p>Give Figma agent your design context</p></li><li><p>Expand missing UI states</p></li><li><p>Review the generated output</p></li><li><p>Refine the designs directly in Figma</p></li><li><p>Build the frontend</p></li></ol><p>I still reviewed the output and made the design decisions myself.</p><p>The agent helped me work through parts of the process where I had less experience. If you&#8217;re a software engineer interested in exploring full-stack development, I recommend you give it a try:</p><p><strong><a href="https://psxid.figma.com/neo_agent"><mark data-color="#ffff00" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Try Figma Agent Today &#187;</mark></a></strong></p><p><em>(Thanks to <a href="https://psxid.figma.com/neo_agent">Figma</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>The budget most engineers blow in an hour.</strong> What quietly drains your context window, and how fast your daily and weekly limits go with it.</p></li><li><p><strong>The signal that a conversation is past saving.</strong> When to close it, and the one prompt to run first so nothing important gets lost.</p></li><li><p><strong>A project memory that lives outside the chat.</strong> Nested CLAUDE.md files, Auto Memory, and path-scoped rules, so the conversation itself stays disposable.</p></li><li><p><strong>A setup that gets smarter every week.</strong> The correction, rule, skill loop, and what happens when the setup meant to save tokens becomes the thing spending them.</p></li><li><p><strong>A real audit of a real project.</strong> An actual token bill, a 5-step cleanup, a token-saving skill tested head to head &amp; five skills worth installing.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></em></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></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Context window is a budget</span></h2><p><span>The context window is Claude&#8217;s working memory.</span></p><p><span>It holds your instructions, files, &amp; entire conversation&#8230; and every model has a &#8220;</span><em><span>fixed&#8221;</span></em><span> size&#8230;</span></p><ul><li><p><span>Opus 5 carries a 1M context on the Max plan,</span></p></li><li><p><span>Fable 5 draws down your usage faster than the older models.</span></p></li></ul><p><span>So the window &amp; your limits are connected.</span></p><p><span>Claude has daily &amp; weekly limits, and some models spend them quicker than others.</span></p><p><span>This is why management matters&#8230;!</span></p><p><span>If you fill the window with noise, your limit drops early, and you sit there waiting for the reset instead of working.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Token saving habits that compound</span></h2><p><span>If you repeat a job in every conversation, put it in a </span><code>CLAUDE.md</code></p><p><em><span>Here is why:</span></em></p><p><span>Even a 1M window fills up, and when it does, Claude compacts the conversation on its own. Compacting is a summary, and summaries drop details. So the instructions you typed at the start may not survive into the rest of the conversation.</span></p><p><span>But a good </span><code>CLAUDE.md</code><span> never gets compacted away, because Claude reads it fresh from disk every session.</span></p><p><span>Plus, do not stretch one conversation forever. The bigger it grows, the more each compact costs, and those compacts eat into the same limit you wanted to save.</span></p><p><span>A new conversation is the </span><em><span>cheapest</span></em><span> fix&#8230;and here is the signal for when to switch:</span></p><p><span>When Claude starts compacting every few messages, or the answers begin forgetting rules you gave an hour ago, the conversation is past saving. Each compact now eats your limit while dropping details, so closing it costs less than keeping it alive.</span></p><p><span>But you do not want to lose what the old one knows, so ask this before you close:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;06363aa6-d0d0-4f46-b71d-64b1c9492ba1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Summarize this conversation in 5 sentences.
But first, ask me 5 questions to make sure the things I care about end up in the summary.</code></pre></div><p><span>Then paste the summary into the new conversation &amp; you continue where you left off at a fraction of the cost.</span></p><p><span>These three commands help you manage the window without leaving it:</span></p><ul><li><p><code>/clear</code><span> resets the context to zero.</span></p></li><li><p><code>/compact</code><span> condenses the conversation, and you steer it with an instruction like </span><code>/compact</code><span> focus on the code changes.</span></p></li><li><p><code>/context</code><strong><span> </span></strong><span>shows what is sitting in your window right now, so you see the problem before it costs you.</span></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Grow your project in MD files, not in the chat</span></h2><p><span>A big project inside one chat gets heavy.</span></p><p><span>Some users hold onto the conversation because valuable information lives there, and they are afraid to lose it.</span></p><p><span>The better way is a folder &amp; an </span><code>MD</code><span> file.</span></p><p><span>Add a folder to the conversation, and then use this:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;c199807f-36d9-47be-95fb-243edf8190ef&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Create a CLAUDE.md for this project.

Make sure to include the decisions we made in this conversation
and the rules I gave you.</code></pre></div><p><span>Now the knowledge lives in the file instead of the chat.</span></p><p><span>Every time you open this project, the saved context comes with it, and the conversation itself stays disposable.</span></p><p><span>You could even switch models/tools, and the work survives because the files are the project.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Memory at scale</span></h2><p><span>Let&#8217;s say your project is big, with tens of folders.</span></p><p><span>A nested </span><code>CLAUDE.md</code><span> system is a good road here.</span></p><p><span>Your main </span><code>CLAUDE.md</code><span> stays short &amp; it says something like this:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;3e4ef337-fbb4-4baf-909a-734b6c051538&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">This project has 10 folders.
Each folder holds its own CLAUDE.md explaining it.
Read the nested file only when you work inside that folder.</code></pre></div><p><span>And each folder carries its own </span><code>CLAUDE.md</code><span> with the details.</span></p><p><span>The gain is double&#8230;</span></p><p><span>In a normal conversation, the nested files stay unread, so your context stays light &amp; the session runs longer.</span></p><p><span>And when you need the details, one prompt like</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;808d43fb-a544-42e9-95f8-c05f122cd236&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Check this folder and read its CLAUDE.md</code></pre></div><p><span>&#8230;loads only the part you asked for.</span></p><p><span>You save time &amp; tokens with the same move.</span></p><p><span>Two more layers work alongside your files:</span></p><p><span>Claude keeps its own notes with Auto Memory, saving what it learned from your corrections per project, and </span><code>/memory</code><span> opens them for editing. So the memory system runs both ways: </span><em><span>you write instructions, and Claude records what it learns.</span></em></p><p><span>And for larger projects, &#8220;rules&#8221; split the load further&#8230;</span></p><p><span>A rule is a small MD file under </span><code>.claude/rules/</code><span>, one topic per file, and it could carry a &#8220;paths&#8221; field limiting it to matching files. So your API conventions load only when Claude touches the API folder, and they cost nothing on the frontend days.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Compound engineering</span></h2><p><span>Every correction you make is worth money, but only if you write it down.</span></p><p><span>Claude makes a mistake, you fix it once, and then you turn the fix into a rule in your </span><code>CLAUDE.md</code><span> or a skill.</span></p><p><span>The next session starts smarter, and the mistake never comes back.</span></p><p><span>I run my entire setup this way. When a correction repeats twice, it becomes a rule.</span></p><p><span>When a workflow repeats twice, it becomes a skill.</span></p><p><span>So the system compounds, and the setup I have today is the sum of every mistake Claude made this year.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale, and running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Skills that reduce tokens</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-token-usage">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Everyone is a scalability expert till traffic spikes]]></title><description><![CDATA[#197: Part 1 - Break into scalability]]></description><link>https://newsletter.systemdesign.one/p/scalability-patterns-system-design</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/scalability-patterns-system-design</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 29 Oct 2026 15:22:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/743de268-886c-4762-9fff-171235a92fc0_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Subscribe today &amp; never miss a letter from me again!</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/scalability-patterns-system-design/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Once upon a time, there lived a junior software engineer named Michiko.</p><p>She worked for a tech company named Hooli.</p><p>Although she was bright, she never got promoted.</p><p>So she was sad &amp; frustrated&#8230;</p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CkeI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 424w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 848w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 1272w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CkeI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif" width="420" height="220.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:1200,&quot;resizeWidth&quot;:420,&quot;bytes&quot;:213872,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/222503287?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CkeI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 424w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 848w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 1272w, https://substackcdn.com/image/fetch/$s_!CkeI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bc8de4b-01cc-4bd7-9be6-7e7a19f88cdf_1200x630.gif 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></div></figure></div><p>Until one day, she had the idea to apply for a new job.</p><p>And the interviewer asked her 1 simple question:</p><p><em>&#8220;How to effectively scale a system?&#8221;</em></p><p>But she couldn&#8217;t answer it &amp; failed the interview in 5 minutes.</p><p>So she went home &amp; studied it to fill the knowledge gap.</p><p>Onward.</p><div><hr></div><div class="callout-block" data-callout="true"><h2><a href="https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1">Mermaid diagrams are the floor</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8piF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 424w, https://substackcdn.com/image/fetch/$s_!8piF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 848w, https://substackcdn.com/image/fetch/$s_!8piF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!8piF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8piF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1202568,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:&quot;https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/222466719?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8piF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 424w, https://substackcdn.com/image/fetch/$s_!8piF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 848w, https://substackcdn.com/image/fetch/$s_!8piF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 1272w, https://substackcdn.com/image/fetch/$s_!8piF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbed88e8-d685-4a85-8795-4805c8781f1a_1200x628.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Your coding agent can already paste a Mermaid chart into a PR description.</p><p>You still read every file to learn what it does to your system.</p><p><strong><a href="https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1">PR Lens</a></strong> draws each pull request as a live architecture canvas, right in your pull request. Press play and it walks you through the change, one step at a time.</p><p>On every PR, you see:</p><ul><li><p><strong>What changed</strong>, marked on the parts of the system it touches</p></li><li><p><strong>What else it reaches</strong>, including services the diff never names</p></li><li><p><strong>How a request moves</strong> through the system now</p></li><li><p><strong>What could break</strong>, flagged before you merge</p></li></ul><p>2,200+ GitHub stars and 45,000+ pull requests drawn.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1&quot;,&quot;text&quot;:&quot;Add it to your repo&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1"><span>Add it to your repo</span></a></p><p>(Thanks to <a href="https://prlens.dev/?utm_source=neokim&amp;utm_medium=newsletter&amp;utm_campaign=ad1">Coldtea</a> for partnering on this newsletter.)</p></div><div><hr></div><h1><strong>Scalability Patterns in System Design</strong></h1><p>Michiko failed the interview, so you don&#8217;t have to.</p><p>And here are 11 must-know scalability techniques for you to ace job interviews:</p><h2><strong>1. Vertical scaling</strong></h2><blockquote><p>Vertical scaling gives one machine more power by adding CPU, memory, and/or faster disks.</p></blockquote><p>The app stays the same, but the machine it runs on gets more powerful... Or you move the app to a larger instance.</p><p>i.e., you do NOT need to rewrite any code. And vertical scaling is probably the quickest way to handle extra load.</p><p>It works well for monoliths &amp; older systems built to run on a <em>single</em> machine.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!52IU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!52IU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!52IU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!52IU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!52IU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!52IU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!52IU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!52IU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!52IU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!52IU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd14a851c-a3f6-4686-bdc6-fcf1451f0cf7_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yet larger machines cost more &amp; all machines have limits.</p><p>Plus, if your app relies on a single server, a failure could take the entire app down.</p><p>So scale up when you need more capacity quickly. Then consider horizontal scaling before one machine becomes your system&#8217;s biggest bottleneck.</p><h2><strong>2. Horizontal scaling</strong></h2><blockquote><p>Horizontal scaling (scaling out) adds more machines to share the load.</p></blockquote><p>You run several copies of the app &amp; distribute traffic across them using a load balancer.</p><p>i.e., you add machines as traffic grows &amp; remove them when demand drops.</p><p>It works well for applications with high/unpredictable traffic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9CMu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9CMu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!9CMu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!9CMu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!9CMu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff58eb42b-b594-4ff3-8608-2b9c5b5cd6af_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yet adding machines creates new challenges:</p><p>You need load balancing, coordination between instances &amp; keep shared data consistent.</p><p>Horizontal scaling improves &#8220;availability&#8221; with redundant instances. But if your app stores user sessions locally, requests routed to different instances could lose access to session data.</p><p>So before you scale out, you need to decide where your application stores its state.</p><p>And that&#8217;s why you&#8217;d need stateless services...</p><h2><strong>3. Stateless services</strong></h2><blockquote><p>A stateless service does NOT store client session state between requests.</p></blockquote><p>Every request provides information the server needs - auth token or session ID.</p><p>Plus, you don&#8217;t store session data on <em>one</em> server&#8230; instead, you keep it in a shared database, a cache like Redis, or use a signed token like a JSON Web Token (<strong>JWT</strong>).</p><p>i.e., any server could handle a request without relying on the previous one.</p><p>This makes it easier to add, remove, or replace servers as traffic patterns change.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EqH6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EqH6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!EqH6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!EqH6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EqH6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc03129c5-06ad-44c8-80f5-f8eedb60fc81_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yet the state still needs to live somewhere.</p><p>And an external database/cache adds infrastructure, network latency &amp; an extra dependency to manage. Plus, relying on sticky sessions to keep users tied to one server reduces flexibility when servers fail or traffic changes.</p><p>So keep session state outside individual app instances when possible. Also, design operations to be &#8220;idempotent&#8221;.</p><p>With stateless services, you could scale individual instances more easily.</p><p>But what if those services depend heavily on each other&#8230;</p><p>That&#8217;s where you&#8217;d need loose coupling...</p><h2><strong>4. Loose coupling</strong></h2><blockquote><p>Loose coupling = each component depends on others as little as possible.</p></blockquote><p>A change in one component could force you to update several others in a &#8220;tightly coupled&#8221; system.</p><p>Plus, if one service becomes slow/fails, the problem could spread to other services that depend on it.</p><p>Loose coupling reduces these dependencies by letting components communicate through well-defined interfaces - APIs/messages. So each component knows what to expect from others without understanding their internal implementation.</p><p>This makes it easier to update, deploy, and/or scale components independently.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IAId!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IAId!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!IAId!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!IAId!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!IAId!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!IAId!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IAId!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!IAId!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!IAId!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!IAId!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24938952-55ba-4353-b9ae-83a8c2b49515_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yet loose coupling introduces extra complexity:</p><p>Requests could travel across many services,,, thus making it HARD to trace &amp; debug failures. Also,splitting a system into many tiny services increases communication overhead &amp; coordination costs.</p><p>So use loose coupling when components need to evolve independently - microservices &amp; big apps.</p><p>And to organize these components into clear, manageable parts, you need modular architecture&#8230;</p><h2><strong>5. Modular architecture</strong></h2><blockquote><p>Modular architecture divides a system into separate modules, with each responsible for a specific function.</p></blockquote><p>You divide the app into modules for authentication, orders, payments, notifications, and so on.</p><p>i.e., each module has a clear responsibility &amp; communicates with others through defined interfaces.</p><p>The goal is to group functionality that belongs together &amp; keep dependencies between modules <em>minimal</em>. This follows the principle of <em>separation of concerns</em>: each module focuses on one part of the system.</p><p>So you update/test payment module without changing the authentication module.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1jF0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1jF0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!1jF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1jF0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1jF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07fe0343-6d45-4cc3-8c61-7cc018bbe55d_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Yet choosing the &#8220;wrong module boundaries&#8221; creates unnecessary dependencies.</p><p>Plus, splitting an app into many modules makes the codebase hard to manage. Also, modules within the same app still share resources &amp; failure risks.</p><p>So modularity alone does NOT guarantee independent scaling or failure isolation.</p><p>It works well for large applications, modular monoliths &amp; microservice architectures!</p><p>But if these modules need to communicate without waiting for each other&#8230;you&#8217;d need event-driven architecture&#8230;</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Subscribe now and be the first to know about my new letters &amp; updates:</span></p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2><strong>6. Event-driven architecture</strong></h2><blockquote><p>Event-driven architecture allows services to communicate by publishing &amp; reacting to events.</p></blockquote><p>A service publishes an event to a message broker instead of calling other services directly.</p><p>Imagine a user places an order on an e-commerce website:</p><p>The <code>order</code> service publishes an <code>OrderPlaced</code> event&#8230; Then other services consume it independently:</p><ul><li><p><code>Inventory</code> service reserves ordered items,</p></li><li><p><code>Payment</code> service initiates payment processing,</p></li><li><p><code>Notification</code> service sends an order confirmation when required steps succeed.</p></li></ul><p><code>Order</code> service does NOT wait for each consumer to finish processing the event.</p><p>i.e., a slow consumer does NOT block others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CCw1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CCw1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 424w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 848w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 1272w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CCw1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png" width="1456" height="799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:799,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CCw1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 424w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 848w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 1272w, https://substackcdn.com/image/fetch/$s_!CCw1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb151ec27-bd16-43d9-8beb-0634f5f6c723_1693x929.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This approach works well for workflows when many services need to react to the same event.</p><p>Yet event-driven systems create new problems:</p><p>Events could arrive late, out of order, or more than once. Plus, different services could temporarily hold different versions of the same data. This is called <em>eventual consistency</em>.</p><p>So you need idempotent consumers, reliable event delivery &amp; a way to handle failed operations.</p><p>Event-driven architecture helps services scale independently &amp; reduces synchronous dependencies.</p><p>But when you need to organize these services without creating a central bottleneck, you&#8217;ve got to &#8220;avoid&#8221; <em>centralized resources</em>&#8230;</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/scalability-patterns-system-design?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Like what you read? Share it with your friends &amp; leave a comment!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/scalability-patterns-system-design?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/scalability-patterns-system-design?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h2><strong>7. Shared-nothing architecture</strong></h2><blockquote><p>Shared-nothing architecture gives each node its own compute, memory &amp; storage <em>without</em> relying on shared resources for processing.</p></blockquote><p>There are several ways to achieve this:</p>
      <p>
          <a href="https://newsletter.systemdesign.one/p/scalability-patterns-system-design">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[GitOps Deep Dive: How ArgoCD Works]]></title><description><![CDATA[#196: Part 5 - DevOps Mastermind]]></description><link>https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 26 Oct 2026 11:46:34 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c4e4bfbb-e1aa-4e6c-8da2-21b587328d42_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my AI engineering playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>The CI/CD pipeline changed how we deploy software.</p><p>It made deployments faster, repeatable, and automated. But once a deployment finishes, the pipeline has no idea what happens inside the cluster afterward.</p><p>Someone could edit a Deployment with <code>kubectl</code>, apply a hotfix during an incident, or update a resource manually. Those changes bypass Git and the pipeline.</p><p>As manual changes increase, the cluster slowly drifts from what gets stored in Git.</p><p>At some point, production no longer matches the configuration everyone believes is running. When an issue appears, it becomes difficult to see what changed... Also it becomes difficult to know who changed it or whether the running state still matches the last reviewed configuration.</p><p>GitOps solves this by making Git the source of truth for the cluster&#8230;not just another step in the deployment process&#8230;</p><p>An agent continuously compares the live cluster with the desired state stored in Git and reconciles any differences. If someone changes a resource outside Git, ArgoCD detects the drift and brings the cluster back to the expected state.</p><p>The CI pipeline still builds, tests, and publishes the application<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>.</p><p>But instead of deploying directly to Kubernetes, it updates Git. ArgoCD then handles the deployment and keeps the cluster aligned with the repository.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop rewriting your agent&#8217;s code</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wgp1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.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;:560005,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/221150475?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!wgp1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1456w" sizes="auto, 100vw" loading="lazy" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Right now, you&#8217;re your agent&#8217;s context engine. You write the rules files, maintain the skills, and paste in the Slack thread it missed.</p><p>But hand-curated context goes stale. And when there are conflicting answers, your agent can&#8217;t tell which is right. You pay for it in higher token bills and longer reviews.</p><p><a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join us live on Oct 28 (FREE)</a> to see:</p><ul><li><p>The 8-levels of AI maturity and where teams get stuck</p></li><li><p>How a context engine curates context and resolves conflicts before your agent writes a line of code</p></li><li><p>Live demo: token savings in the same coding task, and use cases beyond code gen</p></li></ul><p>Bonus: 2 open source tools you can use today.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://x.com/twtayaan">Ayaan</a></strong> as a guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://x.com/twtayaan" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GCV8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 424w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 848w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://x.com/twtayaan&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GCV8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 424w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 848w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>He&#8217;s a <strong>Certified Kubernetes Administrator (CKA)</strong> who writes about Kubernetes, cloud infrastructure, and cloud-native systems. He builds in public and shares practical tips, projects, and lessons learned along the way.</p><p>Check out his work &amp; socials:</p><ul><li><p><a href="https://x.com/twtayaan">Twitter</a></p></li><li><p><a href="https://github.com/Ayaan49">Github</a></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what&#8217;s inside:</em></p><ul><li><p><strong>Your deployment succeeds. Then production starts drifting.</strong> How manual Kubernetes changes create configuration drift, why traditional CI/CD pipelines miss them, and how GitOps keeps your cluster aligned with Git.</p></li><li><p><strong>Your CI pipeline no longer needs the keys to Kubernetes.</strong> How ArgoCD&#8217;s pull-based model changes deployments, where credentials live, and what happens when a system gets compromised.</p></li><li><p><strong>ArgoCD runs a reconciliation loop behind the scenes.</strong> How its core components detect changes, compare desired and live states, and use sync policies, self-healing, and hooks to control deployments.</p></li><li><p><strong>One template, hundreds of applications.</strong> How ApplicationSets manage deployments across clusters, why repository structure matters, and how Git commits promote releases from development to production.</p></li><li><p><strong>GitOps gets harder when you reach production.</strong> How to manage secrets, access control, monitoring, progressive delivery, and disaster recovery, plus the tradeoffs you need to understand before adopting it.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>What Is GitOps</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qnwa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qnwa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!qnwa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qnwa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qnwa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e32c002-ec05-4f5c-93fc-77123fcb091f_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>GitOps<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> is an operating model where a Git repository is the single source of truth for everything running in your infrastructure.</p><p>Every change to your application or cluster configuration happens through a Git commit. It gets reviewed, approved, and merged through the same process as application code.</p><p>i.e., changes are not applied directly to the cluster outside Git.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>GitOps Principles</h2><p>The OpenGitOps<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> working group at CNCF<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> defined four principles to distinguish GitOps from a traditional deployment pipeline.</p><p>Let&#8217;s dive in!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UJ_X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UJ_X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 424w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 848w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!UJ_X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png" width="1254" height="1254" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1254,&quot;width&quot;:1254,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UJ_X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 424w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 848w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!UJ_X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41493a3b-e759-4caa-8a0c-245baeb564d0_1254x1254.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>1. Declarative</h3><p>In a declarative system, you describe what you want, not how to get there.</p><p>Instead of writing a script with steps like &#8220;<em>create this deployment, then scale it to three replicas, then expose it on port 80,&#8221; </em>you write a YAML file describing the end state. The system figures out how to make it happen.</p><p>Kubernetes is declarative by nature.</p><p>Helm charts<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>, Kustomize<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> overlays, and raw YAML manifests all follow the same model.</p><p>This matters for GitOps because a declarative system supports storage, versioning, and comparison. Unlike a sequence of commands, two YAML files allow you to see exactly what changed.</p><h3>2. Versioned and Immutable</h3><p>Every change to the desired state is a Git commit.</p><p>And Git commits do not change&#8230;</p><p>This gives you a complete, tamper-evident history of everything your cluster has ever been asked to run. Who requested the change, who approved it, when it got merged, and exactly what it modified. The audit trail becomes part of the deployment workflow, not a separate system.</p><p>Rollback is also a natural consequence of this principle. Reverting to a previous state means reverting a commit.</p><h3>3. Pulled Automatically</h3><p>This principle changes who is responsible for applying changes.</p><p>Instead of an external CI/CD pipeline pushing updates into Kubernetes, an agent inside the cluster pulls the desired state from Git&#8230; It then applies the changes.</p><p>The security implications of this shift are significant, and they get their own section shortly.</p><h3>4. Continuously Reconciled</h3><p>The previous three principles describe how state gets defined and delivered.</p><p>This one describes what happens after:</p><p>Continuous reconciliation means repeatedly comparing the live cluster state with the desired state in Git. These comparisons detect changes introduced by a manual edit, an autoscaler, or a partial update. The configured sync policy determines whether ArgoCD reports the difference or corrects it automatically.</p><p>To understand why GitOps works differently, we first need to compare it with the deployment model most people already use&#8230;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>CD Without GitOps vs CD With GitOps</h2><p>With the four principles in place, the difference between traditional CD &amp; GitOps is easier to see.</p><p>It is not just a philosophical shift. The two models produce different security properties and failure modes.</p><p>They also provide different levels of visibility into what runs in production&#8230;</p><h3>How CD Worked Before GitOps</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dkQL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dkQL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dkQL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dkQL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dkQL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02669c3b-e3fd-49bf-8f76-cf1d6273f95d_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In a traditional push-based setup<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>, the CI/CD pipeline carries a release from source code to the Kubernetes cluster.</p><p>It runs tests, builds a container image, and pushes the image to a registry. The deployment stage then updates Kubernetes using a command such as <code>kubectl apply</code> or <code>helm upgrade</code>.</p><p>For example, releasing version 1.5 means the pipeline updates the Deployment to use the new image. Kubernetes then replaces the existing pods according to the configured rollout strategy.</p><p>The pipeline directly initiates the deployment. The deployment stage delivers the new configuration to the cluster.</p><h3>How CD Works With ArgoCD</h3><p>With ArgoCD<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>, the pipeline still tests the application, builds the image, and publishes it to a registry. It then updates the image reference in the configuration repository.</p><p>For the same version 1.5 release, the pipeline changes the image tag in a Kubernetes manifest, Helm values file, or Kustomize configuration. This change becomes a Git commit rather than a deployment command executed against the cluster.</p><p>ArgoCD detects the updated configuration and compares it with the live resources. With automated sync enabled, it applies the update. With manual sync, it waits for an operator to trigger synchronization. Kubernetes then performs the rollout.</p><p>i.e., Git becomes the handoff between the two systems.</p><p>CI produces the image and records the intended version. ArgoCD handles applying the configuration to Kubernetes.</p><p>This separation also changes where deployment credentials are needed, which brings us to the security boundary between push and pull.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Push vs Pull: Security Boundary</h2><p>The shift from push to pull is not just an architectural preference.</p><p>It changes where credentials live, how far a compromised system can reach, and the damage a supply chain attack can cause.</p><p>Now let&#8217;s compare the two approaches:</p><h3>Push-Based: Pipeline Holds the Keys</h3><p>In a push-based model, the CI pipeline needs direct access to the cluster to deploy anything.</p><p>i.e., cluster credentials live inside the CI system.</p><p>Anyone with sufficient access to the CI system or pipeline configuration could also gain access to those credentials. Every third-party action, plugin, or integration running inside the pipeline runs adjacent to them. And because pipelines are triggered by code changes, a compromised dependency runs in the pipeline. It runs in the same environment as your cluster credentials.</p><p>A compromised pipeline in this model is effectively a compromised cluster.</p><p>The attacker does not need to find a vulnerability in Kubernetes&#8230; They just need to get malicious code into the build process &amp; let the pipeline do the rest.</p><p>The blast radius is as wide as the credentials allow.</p><p>For most engineers, those credentials have broad permissions. Restricting them precisely is operationally painful. A compromised push-based pipeline often means cluster-admin access is in the wrong hands.</p><h3>Pull-Based: Cluster Holds the Keys</h3><p>In a pull-based model, the cluster reaches out to Git.</p><p>The CI system never touches the cluster.</p><p>ArgoCD runs inside the cluster with scoped RBAC<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a> (Role-Based Access Control) permissions. It pulls the desired state from Git and applies it. The CI pipeline updates the Git repository when a build succeeds, and its job ends there. No cluster credentials ever leave the cluster environment.</p><p>A compromised CI system in this model could modify Git.</p><p>But modifying Git only changes the desired state. It does not directly execute anything in the cluster. ArgoCD still has to pull the change and reconcile it with the cluster. Because every change goes through Git first, you get a reviewable, auditable record before it reaches production.</p><p>And the blast radius<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a> shrinks dramatically. A compromised pipeline becomes a much less dangerous event.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>ArgoCD Architecture</h2><p>Let&#8217;s look at how ArgoCD is built:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8FYf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8FYf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 424w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 848w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 1272w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8FYf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png" width="1456" height="799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:799,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8FYf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 424w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 848w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 1272w, https://substackcdn.com/image/fetch/$s_!8FYf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7509f69a-b288-4cc9-bf97-1fabdba1eb01_1692x929.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>ArgoCD is not an external service you call into.</p><p>It runs as Kubernetes workloads inside the cluster it manages, in the argocd namespace. This is <em>intentional</em>. The agent needs direct access to the Kubernetes API to reconcile state. Running inside the cluster provides the access &amp; keeps cluster credentials inside the cluster.</p><p>Here are 5 core components that work together to implement the GitOps reconciliation loop:</p><h3>1. API Server</h3><p>API Server is the entry point for everything human-facing in ArgoCD.</p><p>It exposes both gRPC<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a> &amp; REST APIs consumed by the ArgoCD UI, argocd CLI, and any external tools integrating with ArgoCD. Every user request, whether it comes from the UI, CLI, or an external integration, passes through the API Server.</p><p>Also it handles all authentication &amp; authorization.</p><p>Before any request reaches the rest of the system, the API Server verifies who is making it and whether they have permission.</p><h3>2. Repo Server</h3><p>The Repo Server does one thing: <em>render Kubernetes manifests from a Git repository</em>.</p><p>It clones the repository, reads the source, and generates the manifests ArgoCD will apply to the cluster. It supports plain YAML, Helm charts, Kustomize overlays, and Jsonnet<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a>. Whatever format your configuration lives in, the Repo Server handles the rendering.</p><p>It&#8217;s deliberately isolated from the Application Controller.</p><p>Rendering manifests requires running Helm, Kustomize &amp; Jsonnet. Those processes are often CPU-intensive and occasionally unstable. Keeping the Repo Server separate isolates render failures from the controller&#8217;s reconciliation loop.</p><h3>3. Application Controller</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ku33!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ku33!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 424w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 848w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ku33!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png" width="1254" height="1254" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1254,&quot;width&quot;:1254,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ku33!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 424w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 848w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 1272w, https://substackcdn.com/image/fetch/$s_!Ku33!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdccd3d21-822d-41a3-8aaf-eff0d0cdbe92_1254x1254.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The Application Controller is the heart of ArgoCD&#8230;It runs the reconciliation loop.</p><p>On every cycle, it gets the desired manifests from the Repo Server and the live cluster state from the Kubernetes API. Then it computes the diff between the two. Based on the application&#8217;s sync policy, it either alerts you to the difference or corrects it automatically.</p><p>The Application Controller runs as a StatefulSet.</p><p>(Scaling and sharding are covered later.)</p><h3>4. Redis</h3><p>Redis serves as a cache layer between Application Controller and Kubernetes API.</p><p>Without it, every UI load and every reconciliation cycle would need to query the Kubernetes API directly. At scale, this would generate unnecessary load on the Kubernetes API. Redis stores application state and cluster data so repeated reads hit the cache instead of the API.</p><p>It is worth being clear about what Redis is and is not in this context.</p><p>It is a cache, not a primary data store. ArgoCD does not depend on Redis for correctness. If Redis goes down, ArgoCD degrades gracefully. Performance suffers, but reconciliation continues.</p><h3>5. Notifications Controller</h3><p>Notifications Controller watches ArgoCD events &amp; route alerts to external systems.</p><p>When an application goes OutOfSync, a sync fails, or a health check degrades, the Notifications Controller sends an alert. It uses the destination you configured, such as Slack, email, PagerDuty, or a webhook. You define triggers and templates, and the controller handles the delivery.</p><p>In most production deployments, it gets installed alongside the rest of ArgoCD. It connects ArgoCD&#8217;s internal events with the people and systems responsible for responding to them.</p><p>Together, these components form ArgoCD's control plane...</p><p>Each component has a specific responsibility:</p><ul><li><p>API Server handles user requests.</p></li><li><p>Repo Server renders manifests.</p></li><li><p>Application Controller reconciles applications.</p></li><li><p>Redis caches data to reduce repeated API calls.</p></li><li><p>Notifications Controller reports important events.</p></li></ul><p>Together, these components keep the cluster aligned with the desired state in Git.</p><p>With the architecture covered, let&#8217;s see how these components work together during reconciliation&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>How ArgoCD Keeps Your Cluster in Sync</h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/how-argocd-works-gitops-kubernetes">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[11 Networking Concepts Explained in 11 Minutes]]></title><description><![CDATA[#195: Part 2 - Break Into Computer Networking]]></description><link>https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Fri, 23 Oct 2026 16:06:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/067daa95-a480-446b-b8f2-39b0005d6f6d_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my AI engineering playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Computer networking is an important part of ALL systems you&#8217;ll work on in your engineering career.</p><p>While junior developers may get by with writing code, senior engineers are valued for their ability to understand how systems communicate &amp; troubleshoot network problems.</p><blockquote><p><em>What happens when a network connection fails?</em></p><p><em>How does data travel between devices &amp; servers?</em></p><p><em>How do we diagnose slow connections, packet loss &amp; routing problems?</em></p></blockquote><p>These questions form the foundation of every reliable, high-performing system.</p><p>Onward.</p><div><hr></div><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop rewriting your agent&#8217;s code</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wgp1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.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;:560005,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/221150475?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.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_!wgp1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!wgp1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c47510d-48c8-4f8b-9093-e2c256c980f3_1600x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Right now, you&#8217;re your agent&#8217;s context engine. You write the rules files, maintain the skills, and paste in the Slack thread it missed.</p><p>But hand-curated context goes stale. And when there are conflicting answers, your agent can&#8217;t tell which is right. You pay for it in higher token bills and longer reviews.</p><p><a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join us live on Oct 28 (FREE)</a> to see:</p><ul><li><p>The 8-levels of AI maturity and where teams get stuck</p></li><li><p>How a context engine curates context and resolves conflicts before your agent writes a line of code</p></li><li><p>Live demo: token savings in the same coding task, and use cases beyond code gen</p></li></ul><p>Bonus: 2 open source tools you can use today.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-rewriting-your-agent-s-code-oct-28/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><div><hr></div><h1>Computer Networking Fundamentals</h1><p>Here are all the key concepts that you need to understand computer networking &amp; become a better engineer:</p><h2>1. Ethernet</h2><blockquote><p>Ethernet is a networking technology that connects devices within a Local Area Network (<strong>LAN</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>).</p></blockquote><p><em>How it works</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><em>:</em></p><ol><li><p><strong>Framing:</strong> The sender wraps an IP packet inside an Ethernet frame<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>.</p></li><li><p><strong>Addressing:</strong> Frame contains source &amp; destination Media Access Control (<strong>MAC</strong>) addresses.</p></li><li><p><strong>Transmission:</strong> The network interface sends the frame over a physical link.</p></li><li><p><strong>Switching:</strong> Network switches forward frames toward their destinations using MAC addresses.</p></li><li><p><strong>Error detection:</strong> The receiver checks the frame&#8217;s Frame Check Sequence (<strong>FCS</strong>) to detect transmission errors.</p></li></ol><p>Typical Ethernet speeds include 1 Gbps for desktops, 10 or 25 Gbps for servers, and 100+ Gbps for data center networks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T4i1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T4i1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!T4i1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T4i1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!T4i1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fca8beb0f-bcc2-4e24-a7d3-b15c13e7edaf_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine delivering packages between offices in the same building.</p><p>Each package carries the sender&#8217;s &amp; recipient&#8217;s room numbers. A mailroom reads the destination and forwards the package to the correct office.</p></div><h2>2. MAC address</h2><blockquote><p>A media access control (<strong>MAC</strong>) address<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> identifies a network card. They help devices communicate within a &#8220;local&#8221; network.</p></blockquote><p>Every card ships with a 48-bit address, written as six pairs of hexadecimal digits. The first half identifies the manufacturer, while the second half identifies the card.</p><p>IP addresses move packets between networks, and MAC addresses move frames within one network. A device learns its neighbor&#8217;s MAC address by broadcasting a question through the address resolution protocol<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> (<strong>ARP</strong>), and then caches that answer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fznl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fznl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fznl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fznl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fznl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fznl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fznl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!fznl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!fznl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!fznl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F93f7620a-d62a-418b-9c38-6551f1b8a45e_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Think of an IP address as a building&#8217;s street address and a MAC address as an apartment number.</p></div><h2>3. Network switch</h2><blockquote><p>A switch<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> forwards frames between devices on the &#8220;same&#8221; network, using their MAC addresses.</p></blockquote><p>A switch learns devices that are reachable through each port by reading the source MAC address of incoming frames. Then it stores these MAC address-to-port mappings in a <em>forwarding</em> <em>table.</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a></p><p><em>How it works:</em></p><ul><li><p><strong>Known destination:</strong> The switch forwards the frame through the port associated with the destination MAC address.</p></li><li><p><strong>Unknown destination:</strong> The switch floods the frame through all other ports in the same VLAN until it learns where the destination is located.</p></li></ul><p>A switch forwards Ethernet frames within a local network using MAC addresses, while a router forwards IP packets between networks using IP addresses.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Obzz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Obzz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Obzz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Obzz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Obzz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe68cf883-3fd3-40ee-a21e-e15c621f6a89_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine a mailroom in an office building:</p><p>The mailroom learns which office belongs to each employee &amp; delivers letters directly to the correct room. If it doesn&#8217;t know the destination, it sends copies to every office until it learns where the recipient is.</p></div><h2>4. Wi-Fi</h2><blockquote><p>Wi-Fi<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a> is a wireless networking technology that uses radio waves to transmit data between devices.</p></blockquote><p><em>How it works:</em></p><ul><li><p><strong>Wireless transmission:</strong> Devices send &amp; receive data using radio signals.</p></li><li><p><strong>Channel sharing:</strong> Devices use mechanisms such as Carrier Sense Multiple Access with Collision Avoidance<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a> (<strong>CSMA/CA</strong>) to reduce transmission collisions.</p></li><li><p><strong>Frequency bands:</strong> Wi-Fi operates on 2.4 GHz, 5 GHz, and 6 GHz bands.</p></li><li><p><strong>Signal strength:</strong> Devices adjust transmission rates based on signal quality &amp; interference.</p></li><li><p><strong>Retransmissions:</strong> Lost/corrupted frames require retransmission; thus reducing throughput.</p></li></ul><p>The 2.4 GHz band typically provides longer range but has less available capacity &amp; more interference.</p><p>The 5 GHz &amp; 6 GHz bands offer wider channels and potentially higher speeds, but their signals have shorter range &amp; weaker penetration through obstacles.</p><p>Also devices with poor signal quality transmit at lower data rates and consume more airtime. This reduces the capacity available to other devices sharing the channel.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nyeT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nyeT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!nyeT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nyeT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nyeT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff00e8d83-6a58-4322-b3d6-09dd0e854268_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine a room where people take turns speaking.</p><p>Everyone listens before talking to avoid interruptions. If someone far away speaks slowly, others have to wait longer to finish.</p></div><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h2>5. Static IP address</h2><blockquote><p>A static IP address is a &#8220;fixed&#8221; IP address assigned to a device or network interface.</p></blockquote><p>You configure it manually or reserve an address through Dynamic Host Configuration Protocol (<strong>DHCP</strong>).</p><p>A static IP<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a> typically remains the same across device reboots as long as its assignment remains valid. Servers, printers, routers &amp; other devices that need predictable network addresses use static IPs.</p><p>DNS records, firewall rules &amp; network configurations reference these stable addresses.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cIYo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cIYo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!cIYo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cIYo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!cIYo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6057ac7c-953e-49a3-85cf-308eda0a6203_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Think of it as a reserved parking space with your name on the sign.</p><p>The space stays assigned to you, whether you manage the reservation yourself or someone else manages it.</p></div><h2>6. DHCP</h2><blockquote><p>Dynamic Host Configuration Protocol (<strong>DHCP</strong>) automatically assigns IP addresses &amp; other network settings to devices when they join a network.</p></blockquote><p><em>How it works:</em></p><ol><li><p><strong>Discover:</strong> The device broadcasts a message to find available DHCP servers.</p></li><li><p><strong>Offer:</strong> A DHCP server offers an IP address &amp; network configuration.</p></li><li><p><strong>Request:</strong> The device requests the offered address.</p></li><li><p><strong>Acknowledge:</strong> Server confirms the assignment &amp; grants an IP address <em>lease</em>.</p></li></ol><p>(This process is called DORA.)</p><p>Plus, DHCP<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a> server provides a subnet mask, default gateway, and Domain Name System (<strong>DNS</strong>) servers.</p><p>Yet each IP address lease has a lifetime.</p><p>Devices typically renew leases before they expire. If a lease expires without renewal, the server reassigns the address to another device.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z8fp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z8fp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z8fp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z8fp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Z8fp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7d8ab01-f9ba-4387-988a-345d603cab48_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine checking into a hotel:</p><p>The receptionist assigns you a room number for your stay. When you check out, the room becomes available for another guest.</p></div><h2>7. Default gateway</h2><blockquote><p>A default gateway is a router that forwards traffic to destinations outside a device&#8217;s local network when &#8220;no&#8221; specific route exists.</p></blockquote><p><em>How it works:</em></p><ul><li><p><strong>Local destination:</strong> The device sends traffic directly to another device on the same subnet.</p></li><li><p><strong>Remote destination:</strong> The device forwards traffic to its default gateway.</p></li><li><p><strong>Packet forwarding:</strong> Gateway uses its routing table to forward the packet toward its destination.</p></li></ul><p>A laptop with IP address <code>192.168.1.10/24</code> might use <code>192.168.1.1</code> as its default gateway.</p><p>The gateway<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a> typically has an IP address on the same subnet,,, thus allowing the laptop to reach it directly.</p><p>An incorrect default gateway prevents a device from reaching &#8220;external&#8221; networks, even if local communication works.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QN5s!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QN5s!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QN5s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QN5s!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QN5s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa8257ee-c1b4-4716-9bcd-10b78b7d5683_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Think of a building with one main exit.</p><p>You move between rooms inside the building without leaving. To reach another building, you must use the main exit.</p></div><h2>8. Static route</h2><blockquote><p>A static route is a (manually) configured entry in a routing table that tells a router where to forward packets.</p></blockquote><p>You specify a destination IP range &amp; an outgoing network interface.</p><p><em>How it works:</em></p><ul><li><p><strong>Configure a route:</strong> Define a destination network, such as <code>10.0.2.0/24</code>.</p></li><li><p><strong>Specify the next hop:</strong> Point the route to another router, such as <code>192.168.1.1</code>.</p></li><li><p><strong>Forward packets:</strong> The router uses the route to forward matching traffic toward its destination.</p></li></ul><p>Yet static routes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a> do not automatically learn new network paths.</p><p>If a network path fails, the static route still remains configured. Some implementations detect failures &amp; deactivate/replace the route.</p><p>Static routes work well for cloud networking configurations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Sbj4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sbj4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sbj4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Sbj4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Sbj4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fa1eba5-be8c-4ace-99f0-d71726c2d0d3_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine a road sign directing drivers toward a specific town.</p><p>The sign stays in place even when the road closes, unless someone updates it or a traffic management system redirects drivers.</p></div><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Enter your email to join the inner circle and receive exclusive insights &amp; tips:</span></em></p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>9. OSPF</h2><blockquote><p>Open Shortest Path First (<strong>OSPF</strong>) is a dynamic routing protocol that lets routers automatically discover &amp; update routes within an Autonomous System (<strong>AS</strong>).</p></blockquote><p><em>How it works:</em></p><ol><li><p><strong>Discover neighbors:</strong> Routers exchange Hello packets to discover &amp; maintain neighboring routers.</p></li><li><p><strong>Share topology:</strong> Routers flood Link-State Advertisements<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a> (<strong>LSA</strong>s) to share network information within an OSPF area.</p></li><li><p><strong>Build a network map:</strong> Routers in the same area maintain a synchronized link-state database.</p></li><li><p><strong>Calculate routes:</strong> Each router uses Dijkstra&#8217;s Shortest Path First<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a> algorithm to calculate the lowest-cost paths.</p></li><li><p><strong>Adapt to failures:</strong> When a link fails, routers propagate updated information and recalculate affected routes.</p></li></ol><p>OSPF<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a> selects paths based on configurable interface costs.</p><p>Bandwidth influences these costs, but administrators could adjust them manually.</p><p>Plus, OSPF reroutes traffic after network failures. Convergence time depends on failure detection, topology size &amp; router configuration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sbTG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sbTG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!sbTG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sbTG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sbTG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb4e72a-e860-4583-b9bc-ee7bc6851442_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine every driver in a city using a shared road map.</p><p>When a road closes, the map updates, and each driver calculates a new route based on the available roads.</p></div><h2>10. ICMP</h2><blockquote><p>Internet Control Message Protocol (<strong>ICMP</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a>) carries network error messages &amp; diagnostic information. It helps devices identify problems such as unreachable destinations, expired packet lifetimes, and packets too large for a network link.</p></blockquote><p><em>How it works:</em></p><ul><li><p><strong>Destination unreachable:</strong> A router or destination host sends an ICMP message when it cannot deliver a packet.</p></li><li><p><strong>Time exceeded:</strong> A router sends an ICMP message when a packet&#8217;s Time to Live (<strong>TTL</strong>) or Hop Limit reaches zero.</p></li><li><p><strong>Packet too big:</strong> ICMP reports when a packet exceeds the supported Maximum Transmission Unit (<strong>MTU</strong>).</p></li><li><p><strong>Echo request and reply:</strong> Tools such as <code>ping</code> use ICMP to test whether a destination responds.</p></li></ul><p>Yet ICMP messages are NOT guaranteed to arrive&#8230;</p><p>Firewalls, rate limiting &amp; network conditions could block/drop them.</p><p>ICMP helps diagnose network problems but does not directly retransmit lost application data or repair failed connections.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BTLD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BTLD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!BTLD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BTLD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!BTLD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67f9616c-41c5-42c8-a674-aadc2a594352_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine sending a letter that cannot reach its destination&#8230;</p><p>The post office returns a notice explaining why delivery failed, such as an invalid address or an unavailable route.</p><p>The notice helps you identify the problem, but it does not deliver the original letter.</p></div><h2>11. Ping</h2><blockquote><p>Ping<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a> is a network diagnostic tool that tests whether a destination host responds &amp; measures round-trip time (<strong>RTT</strong>). It uses ICMP Echo Request &amp; Echo Reply messages.</p></blockquote><p><em>How it works:</em></p><ol><li><p><strong>Send request:</strong> Ping sends an ICMP Echo Request to the destination.</p></li><li><p><strong>Receive reply:</strong> If the destination responds, it sends an ICMP Echo Reply.</p></li><li><p><strong>Measure latency:</strong> Ping calculates time between sending request &amp; receiving reply.</p></li><li><p><strong>Track responses:</strong> Ping reports round-trip times &amp; percentage of requests without replies.</p></li></ol><p>Repeated tests help identify latency spikes, intermittent connectivity &amp; potential packet loss.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZYSY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZYSY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZYSY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZYSY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYSY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa530971d-9c2c-4966-b7f4-2f8bc2d3cc0d_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="callout-block" data-callout="true"><p>Imagine knocking on a door &amp; timing how long someone takes to answer.</p><p>A quick response suggests someone is available. A delayed response takes longer, while silence only means nobody answered.</p></div><div><hr></div><h2>Final Words</h2><p>Now you understand the basic networking concepts that help devices communicate, it&#8217;s time to explore how they work in real systems.</p><p>Look at the apps &amp; networks you use every day and think about what happens behind the scenes.</p><blockquote><p><em>What happens when a network link fails?</em></p><p><em>How does your laptop connect to the internet?</em></p><p><em>How do routers find the right path for packets?</em></p><p><em>How do engineers diagnose slow or failed connections?</em></p></blockquote><p>After understanding these concepts, start applying them in your own work.</p><p>Use tools like <code>ping</code>, <code>mtr</code>, and <code>tcpdump</code> to explore network behavior. Experiment with routing configurations and troubleshoot connectivity problems.</p><p>Remember, every experienced engineer started with the fundamentals. The more you practice, the easier it becomes to understand and troubleshoot complex networks.</p><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 27 October. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/computer-networking-fundamentals-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3>References</h3><ul><li><p>Google, <em>IPv6 Statistics</em>: <a href="https://www.google.com/intl/en/ipv6/statistics.html">https://www.google.com/intl/en/ipv6/statistics.html</a></p></li><li><p>Meta Engineering, <em>More details about the October 4 outage</em>: <a href="https://engineering.fb.com/2021/10/05/networking-traffic/outage-details/">https://engineering.fb.com/2021/10/05/networking-traffic/outage-details/</a></p></li><li><p>RFC 9293, <em>Transmission Control Protocol</em>: <a href="https://www.rfc-editor.org/rfc/rfc9293.html">https://www.rfc-editor.org/rfc/rfc9293.html</a></p></li><li><p>RFC 9000, <em>QUIC: A UDP-Based Multiplexed and Secure Transport</em>: <a href="https://www.rfc-editor.org/rfc/rfc9000.html">https://www.rfc-editor.org/rfc/rfc9000.html</a></p></li><li><p>RFC 9110, <em>HTTP Semantics</em>: <a href="https://www.rfc-editor.org/rfc/rfc9110.html">https://www.rfc-editor.org/rfc/rfc9110.html</a></p></li><li><p>RFC 9111, <em>HTTP Caching</em>: <a href="https://www.rfc-editor.org/rfc/rfc9111.html">https://www.rfc-editor.org/rfc/rfc9111.html</a></p></li><li><p>RFC 8446, <em>The Transport Layer Security Protocol Version 1.3</em>: <a href="https://www.rfc-editor.org/rfc/rfc8446.html">https://www.rfc-editor.org/rfc/rfc8446.html</a></p></li><li><p>RFC 1035, <em>Domain Names: Implementation and Specification</em>: <a href="https://www.rfc-editor.org/rfc/rfc1035.html">https://www.rfc-editor.org/rfc/rfc1035.html</a></p></li><li><p>RFC 4632, <em>Classless Inter-domain Routing</em>: <a href="https://www.rfc-editor.org/rfc/rfc4632.html">https://www.rfc-editor.org/rfc/rfc4632.html</a></p></li><li><p>RFC 4271, <em>A Border Gateway Protocol 4</em>: <a href="https://www.rfc-editor.org/rfc/rfc4271.html">https://www.rfc-editor.org/rfc/rfc4271.html</a></p></li><li><p>HTTP Archive, <em>Web Almanac 2025</em>: <a href="https://almanac.httparchive.org/en/2025/">https://almanac.httparchive.org/en/2025/</a></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>A network that connects devices within a limited geographic area, such as a home, office, or building, allowing them to communicate and share resources.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Use <code>ethtool</code> to inspect Ethernet link speed &amp; status.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>A data unit at the data link layer that carries a payload, such as an IP packet, along with source and destination MAC addresses and error-detection information across an Ethernet network.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Network switches use MAC addresses to forward Ethernet frames to the correct destination. Use <code>ip neigh</code> to inspect neighboring IP-to-MAC mappings and Wireshark to analyze ARP traffic.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>A network protocol that discovers the MAC address associated with a known IPv4 address on a local network.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>Network switches connect devices within local networks &amp; data centers.</p><p>They use MAC address tables to forward Ethernet frames efficiently, thus reducing unnecessary traffic. Use <code>bridge fdb</code> to inspect forwarding entries &amp; GNS3 to simulate switched networks.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Imagine a switch connecting 3 devices:</p><ol><li><p>Laptop A sends a frame through Port 1.</p></li><li><p>The switch reads the frame&#8217;s source MAC address (MAC A).</p></li><li><p>It records that MAC A is reachable through Port 1.</p></li><li><p>When Laptop B sends a frame through Port 2, the switch learns that MAC B is reachable through Port 2.</p></li><li><p>Later, when a frame arrives for MAC B, the switch forwards it through Port 2.</p></li></ol><p>The switch stores this information in a MAC address table, called the forwarding table.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>Wi-Fi performance affects application latency, throughput, and reliability, especially for mobile devices &amp; laptops.</p><p>Use <code>iperf3</code> to measure throughput and Wireshark in monitor mode to inspect wireless traffic.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA): A network access method used by Wi-Fi devices to listen for channel activity and reduce collisions by waiting before transmitting data.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>They help you:</p><ul><li><p>Access devices without tracking changing IP addresses.</p></li><li><p>Configure stable DNS records &amp; firewall allowlists.</p></li><li><p>Simplify network monitoring &amp; troubleshooting.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>DHCP simplifies IP address management &amp; reduces manual configuration errors.</p><p>Office networks use DHCP to auto-configure laptops, phones, and other devices. Cloud providers use DHCP-based mechanisms to deliver network settings to virtual machines.</p><p>Use ISC Kea to manage DHCP servers or your cloud provider&#8217;s built-in networking services.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>Default gateways allow servers, laptops &amp; other devices to communicate with external networks. An incorrect gateway configuration breaks internet access or communication between subnets.</p><p>Use <code>ip route</code> to inspect the default gateway and routing table.</p><p>For high availability, technologies such as Virtual Router Redundancy Protocol (<strong>VRRP</strong>) can provide a redundant default gateway.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>Static routes help control how traffic moves between subnets, cloud networks, and on-premises infrastructure.</p><p>Cloud route tables typically use manually configured routes to direct traffic through internet gateways, NAT gateways, or VPN connections.</p><p>Use <code>ip route add</code> or Terraform to configure routes.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>Link-State Advertisements (LSAs): Messages used by OSPF routers to share network topology information, including links and their costs, so routers can calculate the shortest paths.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><p>Dijkstra&#8217;s Shortest Path First (SPF) algorithm: A graph algorithm that calculates the lowest-cost paths from a source node to all other reachable nodes in a network.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>OSPF lets enterprise networks automatically adapt to topology changes without manually updating every router.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>ICMP helps engineers diagnose connectivity issues, routing failures, and MTU problems.</p><p>Use <code>ping</code> to test reachability, <code>traceroute</code> or <code>mtr</code> to investigate network paths, and <code>tcpdump</code> to inspect ICMP messages.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><p>Ping helps you investigate network reachability &amp; latency problems.</p><p>Use <code>ping</code> to check whether a destination responds and <code>mtr</code> to investigate latency and packet loss across network paths.</p><p>A successful ping does not guarantee that an application is working. A server could respond to ICMP while its HTTP service or database port remains unavailable.</p></div></div>]]></content:encoded></item><item><title><![CDATA[The 80/20 of AI Concepts]]></title><description><![CDATA[#194: A Practical Guide to 14 Advanced AI Concepts]]></description><link>https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 22 Oct 2026 14:03:02 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/47b08c4b-e403-4640-b3c7-cef2a116010e_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><h2><a href="https://inngest.link/jtH41MP">Build for the long run</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://inngest.link/jtH41MP" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OCoh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 424w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 848w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 1272w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OCoh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png" width="1456" height="705" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:705,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5778022,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214903444?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!OCoh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 424w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 848w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 1272w, https://substackcdn.com/image/fetch/$s_!OCoh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dfec45c-1e26-4436-9cea-7fa5dcf7a0c3_2190x1061.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Long-running agents need endurance.</p><p>They must endure waiting for users and weather tool failures. They must take each new jump in model intelligence in stride.</p><p>Inngest makes long-running agents durable, observable and improvable over time.</p><p><strong><a href="https://inngest.link/jtH41MP"><mark data-color="rgb(255, 255, 0)" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Build for the long run with Inngest &#187;</mark></a></strong></p><p><em>(Thanks to <a href="https://inngest.link/jtH41MP">Inngest</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>The 80/20 rule states that 80% of results come from 20% of actions.</p><p>It is the ONE rule you must obey &amp; this is the most important rule when it comes to learning something new.</p><p>Let me explain...</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TY-V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TY-V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 424w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 848w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 1272w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TY-V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif" width="728" height="382.2" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:1200,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:362861,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/221435962?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TY-V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 424w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 848w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 1272w, https://substackcdn.com/image/fetch/$s_!TY-V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82835cca-bc51-44d5-b354-c916f0689441_1200x630.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Imagine you want to fill a bottle with pebbles, sand &amp; water.</p><p>If you pour in the sand &amp; water first, you&#8217;ll struggle to fit the big pebbles.</p><p>But if you start with the pebbles, the sand <em>automagically</em> fills the gaps between them, and the water fills the remaining space.</p><p>i.e., do the 20% that makes the real difference (80%) first.</p><p>And this is why I&#8217;m writing these letters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> on AI engineering concepts for you.</p><p>I want you to win in the AI era by understanding the &#8220;fundamental&#8221; AI concepts.</p><p><em>Inside this newsletter, you&#8217;ll find:</em></p><ol start="35"><li><p>Mixture-of-Experts,</p></li><li><p>Large Language Model Serving &amp; Inference Engines,</p></li><li><p>Synthetic Data &amp; Self-Instruction,</p></li><li><p>LLM-as-a-Judge,</p></li><li><p>Direct Preference Optimization,</p></li><li><p>Knowledge Distillation,</p></li><li><p>Temperature &amp; Sampling,</p></li><li><p>Gradient Descent &amp; Optimization,</p></li><li><p>Backpropagation,</p></li><li><p>Loss Functions,</p></li><li><p>Generalization,</p></li><li><p>Scaling Laws,</p></li><li><p>AI Alignment,</p></li><li><p>AI Safety &amp; Guardrails.</p></li></ol><p>For each, we&#8217;ll cover:</p><ul><li><p>What it means &amp; how it works,</p></li><li><p>A real-world analogy where useful,</p></li><li><p>A common mistake to avoid,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my AI engineering playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>35. Mixture-of-Experts</strong></h2><blockquote><p>Mixture-of-Experts (<strong>MoE</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>) is a model design that uses a router to direct information to neural network components<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> called <em>experts</em>. Common sparse designs activate only some experts for each token.</p></blockquote><p>Let&#8217;s look inside a model as it processes a question:</p><p>Imagine one layer contains eight experts. A router selects two experts to process a token&#8217;s numerical representation. Then the layer combines their results &amp; passes the information onward.</p><p>The next token could use a different pair of experts.</p><p>The router learns how to assign work during training. Each expert performs part of the model&#8217;s calculations, while other components also contribute to the response.</p><p>(These experts work within the same model.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WF-T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WF-T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!WF-T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WF-T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!WF-T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f3ef785-f04d-487e-8c3b-494bdd99d112_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a workshop with several workers &amp; a coordinator.</p><p>The coordinator assigns each task to a few workers. Those workers contribute their results, and the work continues through the workshop.</p><p>Not every worker needs to handle every piece.</p><h3><strong>Common mistake</strong></h3><p>Assuming each expert has a fixed subject - mathematics, coding, or history.</p><p>The word &#8220;expert&#8221; describes a neural network component. Training shapes its behavior &amp; router&#8217;s choices, but those choices don&#8217;t necessarily follow recognizable subject categories.</p><h3><strong>Why it matters</strong></h3><p>Sparse MoE allows a model to have more parameters <em>without</em> using all its experts for every token. Only selected experts perform calculations, thus reducing computation while giving the model more capacity to learn patterns.</p><p>Yet all expert weights still need to be stored in memory/storage.</p><p>So using fewer experts per token reduces computation, but doesn&#8217;t reduce the model&#8217;s memory requirements.</p><h2><strong>36. LLM Serving and Inference Engines</strong></h2><blockquote><p>LLM serving makes a trained model available to receive requests &amp; return responses. An inference engine is the software that runs the model&#8217;s calculations.</p></blockquote><p>You submit <em>&#8220;Explain this error&#8221;</em> through a chatbot:</p><ol><li><p>The serving system accepts your request &amp; passes it to the software that runs the model.</p></li><li><p>Inference engine uses the model&#8217;s weights &amp; your input to generate tokens.</p></li><li><p>The serving system sends those tokens back to your screen.</p></li></ol><p>Your answer arrives through several coordinated steps.</p><p>Now imagine hundreds of users submitting questions at once...</p><p>The system schedules work within the available memory &amp; computing capacity. Some requests need longer responses than others. Requests that exceed available capacity must wait or get rejected.</p><p>The model needs software around it to serve real users.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HuhG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HuhG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!HuhG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HuhG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HuhG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d81cba9-e78a-46bb-9097-1fff22ba6052_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a restaurant&#8217;s kitchen &amp; service team<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>:</p><p>The kitchen prepares the meals&#8230; The wider restaurant operation accepts orders, coordinates workload, and delivers food to customers.</p><p>Preparing a meal is one part of serving a restaurant full of people.</p><h3><strong>Common mistake</strong></h3><p>Testing one request &amp; assuming the system is ready for traffic.</p><p>A setup that responds quickly to one user could slow down when many requests arrive at once<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. Test realistic request volumes &amp; response lengths, then check waiting times, failures &amp; memory use.</p><h3><strong>Why it matters</strong></h3><p>LLM serving helps applications handle requests from many users.</p><p>While inference engines run the model&#8217;s calculations to generate responses. Together, they affect response time, hardware efficiency, and how reliably an application serves users.</p><p>Choosing a suitable engine &amp; testing the complete serving system helps turn a trained model into a dependable service.</p><h2><strong>37. Synthetic Data and Self-Instruction</strong></h2><blockquote><p>Synthetic data is &#8220;artificially created&#8221; data used for purposes such as training/testing. Self-instruction<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> uses a language model to generate tasks &amp; corresponding responses for further training.</p></blockquote><p>Imagine you need more training examples for a model that classifies &#8220;customer support&#8221; messages.</p><p>You ask a language model to generate fictional messages about billing &amp; technical problems.</p><p>With <em>self-instruction</em>, the model also creates instructions &amp; expected answers for those messages.</p><p>Each example contains a task &amp; its correct label:</p><ul><li><p>Instruction: Classify this customer message.</p></li><li><p>Message: <em>&#8220;My card got charged twice.&#8221;</em></p></li><li><p>Expected answer: Billing.</p></li></ul><p>The system then checks generated examples &amp; removes incorrect, repetitive, and/or unsuitable ones.</p><p>The remaining examples could be used to <em>fine-tune</em> the model&#8230;</p><p>Also generating examples alone doesn&#8217;t change the model&#8217;s weights&#8230; A separate training step uses those examples to update the weights, thus helping the model learn to classify similar messages.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HnO9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HnO9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 424w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 848w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 1272w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!HnO9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png" width="1456" height="870" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:870,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HnO9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 424w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 848w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 1272w, https://substackcdn.com/image/fetch/$s_!HnO9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e1c6e62-f2b4-4484-b907-d77928e559b3_1622x969.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of preparing practice questions with an answer key:</p><p>You create exercises to cover different situations. Before anyone studies from them, you check whether the questions make sense &amp; if the answers are correct.</p><p>Faulty practice material teaches faulty lessons.</p><h3><strong>Common mistake</strong></h3><p>Treating a large generated dataset as a high-quality dataset.</p><p>Generated examples could contain wrong answers, repeated patterns, or unrealistic situations. Check their accuracy &amp; variety, then evaluate the trained model on separate examples that reflect real use.</p><h3><strong>Why it matters</strong></h3><ul><li><p>Synthetic data helps expand training material when suitable examples are scarce.</p></li><li><p>Self-instruction provides one way to create examples for instruction-based tasks.</p></li></ul><p>The value comes from useful, checked examples rather than volume alone.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>38. LLM-as-a-Judge</strong></h2><blockquote><p>LLM-as-a-Judge uses a language model to evaluate another model&#8217;s responses against predefined criteria, such as factual accuracy, relevance, or completeness, and assigns scores/rankings based on those criteria.</p></blockquote><p>Ask an assistant to shorten a customer&#8217;s complaint.</p><p>The customer wrote, <em>&#8220;My order arrived three days late, and the box was damaged.&#8221;</em> But the assistant produces <em>&#8220;The order arrived late.&#8221;</em> You give a judge model both versions &amp; ask it to check whether the summary includes both problems.</p><p>The judge could flag the missing detail:<em> damaged box.</em></p><p>Your instructions define what the judge checks. It could score one response, explain a problem, or compare two answers &amp; select the better one.</p><p>Clear criteria give the review a specific purpose.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KmNs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KmNs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 424w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 848w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 1272w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!KmNs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png" width="1456" height="765" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cacff04e-2678-4009-a078-86e76961998d_1730x909.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:765,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KmNs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 424w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 848w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 1272w, https://substackcdn.com/image/fetch/$s_!KmNs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcacff04e-2678-4009-a078-86e76961998d_1730x909.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a teacher checking a student&#8217;s work:</p><p>The teacher compares the answer to the assignment requirements. A judge model performs a similar review using the instructions and reference material you supply.</p><h3><strong>Common mistake</strong></h3><p>Treating the judge&#8217;s score as proof of correctness.</p><p>A judge could overlook an error or favor a longer answer without good reason. Compare some of its reviews with careful human assessments. When comparing 2 answers, swap their order to check whether its preference changes.</p><h3><strong>Why it matters</strong></h3><p>Reading every response by hand takes time.</p><p>LLM judges help teams review large collections of answers &amp; identify responses that need closer inspection.</p><p>Their usefulness depends on how reliably their assessments match qualities you need.</p><h2><strong>39. Direct Preference Optimization</strong></h2><blockquote><p>Direct Preference Optimization (<strong>DPO</strong>) &#8220;trains&#8221; a language model to favor preferred responses over less preferred alternatives using pairs of answers to the same request.</p></blockquote><p>Imagine you want an assistant to reply politely to customers.</p><p>For <em>&#8220;My order is late,&#8221;</em> one response says, <em>&#8220;Just wait.&#8221;</em> Another says, <em>&#8220;I&#8217;m sorry about the delay. Please send your order number.&#8221;</em> A reviewer marks the second response as the better choice.</p><p>The pair then becomes a training example.</p><p>DPO uses many such pairs to adjust the model&#8217;s weights toward preferred responses during training. It uses recorded choices directly, without first training a separate reward model to score answers.</p><p>Choosing a response records feedback; the training step changes the model.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4OKh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4OKh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 424w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 848w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 1272w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!4OKh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png" width="1456" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4OKh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 424w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 848w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 1272w, https://substackcdn.com/image/fetch/$s_!4OKh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0536bc8-f6ab-4894-bf6a-268edeb7c9cb_1729x910.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of helping someone write customer replies:</p><p>You show two drafts &amp; point out which one better follows the company&#8217;s standards. Repeated practice guides how the person writes future replies.</p><p>DPO guides a model through similar comparisons.</p><h3><strong>Common mistake</strong></h3><p>Choosing preferred answers based only on how pleasant they sound.</p><p>A polite reply could promise a refund the customer doesn&#8217;t qualify for. Review accuracy &amp; company policy alongside tone, so the training examples reward useful behavior.</p><h3><strong>Why it matters</strong></h3><p>DPO provides a simpler way to train from preferences than approaches which require a separate reward model and reinforcement learning.</p><p>The quality of those preferences shapes the behavior the model learns.</p><h2><strong>40. Knowledge Distillation</strong></h2><blockquote><p>Knowledge distillation <em>trains</em> a student model<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> to learn from a teacher model&#8217;s outputs. A common goal is to preserve useful abilities in a smaller model.</p></blockquote><p>Imagine a large model recognizes cats &amp; dogs well, but your application needs something smaller.</p><p>You show photos to the teacher model &amp; collect its predictions. The student processes the same photos, and the training algorithm compares its predictions to the teacher&#8217;s. Then it adjusts student&#8217;s weights to bring their predictions closer together.</p><p>The teacher&#8217;s outputs guide the student&#8217;s training.</p><p>Some methods also use the teacher&#8217;s confidence across possible answers. This gives the student more information than a single label such as &#8220;cat.&#8221; The student learns through its own weight adjustments.</p><p>After training, the student handles new photos independently.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-4yy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-4yy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-4yy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-4yy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!-4yy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bc9ad3b-1bd4-4e80-8b20-db7716ba9d0a_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a teacher helping a student practice.</p><p>The teacher demonstrates answers, and the student learns from those examples. The student attempts new questions later without the teacher beside them.</p><p>Practice doesn&#8217;t guarantee the student matches the teacher on every question.</p><h3><strong>Common mistake</strong></h3><p>Assuming the student inherits every ability the teacher has.</p><p>A student trained on cat &amp; dog photos hasn&#8217;t necessarily learned to recognize other animals. It could also repeat the teacher&#8217;s errors. Test it on separate examples which reflect the job you need it to perform.</p><h3><strong>Why it matters</strong></h3><p>Distillation helps teams develop models which need less memory and computation for a chosen task. A smaller student could serve requests faster or run on more limited hardware.</p><p>Check whether those savings preserve the quality your application needs.</p><h2><strong>41. Temperature and Sampling</strong></h2><blockquote><p>Sampling is how an AI model chooses the next token during inference. Tokens the model considers likely have a higher chance of being chosen.</p><p>Temperature controls how predictable that choice is by adjusting the probabilities to make likely options more dominant or give less likely options more chance.</p></blockquote><p>Ask an assistant to suggest a name for your bakery:</p><p>The model builds each suggestion one token at a time. At each step, it assigns probabilities to possible next tokens. Sampling chooses among those options according to their chances.</p><p>Different choices lead to different names.</p><p>Lower temperature favors the leading options more strongly, usually producing less variation across attempts. Higher temperature gives less likely options more chance, usually producing more varied suggestions.</p><p>Yet some results could be unusual/awkward&#8230; More variation doesn&#8217;t guarantee a better name.</p><p>These settings affect token selection <em>without</em> changing the model&#8217;s weights.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TBXr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TBXr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 424w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 848w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 1272w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!TBXr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png" width="1456" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TBXr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 424w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 848w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 1272w, https://substackcdn.com/image/fetch/$s_!TBXr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F207edc93-1e2b-45f4-862a-cee4d39842ad_1729x910.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of drawing a slip from a bowl.</p><p>Several slips carry the same word, while others carry different words. A word with more slips has a higher chance of being selected.</p><p>Temperature changes the balance of slips; sampling makes the draw.</p><h3><strong>Common mistake</strong></h3><p>Treating temperature as a quality control.</p><p>A higher setting doesn&#8217;t guarantee originality, and a lower setting doesn&#8217;t guarantee accuracy. Review results for readability &amp; relevance, and check factual answers against reliable sources.</p><h3><strong>Why it matters</strong></h3><p>Different tasks need different amounts of variation&#8230;</p><p>Name suggestions benefit from a range of options, while extracting details from a receipt benefits from consistent results.</p><p>Test the settings against the task rather than using one value for everything.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>42. Gradient Descent and Optimization</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-software-engineers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[64 AI Engineering Concepts, Clearly Explained]]></title><description><![CDATA[#193: Part 2 - RLHF, Pretraining, Vector Search, and 14 others.]]></description><link>https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Tue, 20 Oct 2026 13:27:50 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/7fb0bd93-e36d-4683-8991-10bf77823357_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A reader asks:</p><p><em>&#8220;Hi Neo, do I really need to understand all these AI concepts? RLHF, vector search, quantization, diffusion models, MCP, hybrid retrieval... It feels like every time I learn one concept, five more appear. Lol&#8221;</em></p><p>All I will say is this:</p><p>You don&#8217;t need to master every AI concept to start building AI apps.</p><p>At least, not all at once.</p><p>But understanding how these concepts work makes a BIG difference.</p><p>Onward.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><a href="https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf">Same model, 2x the fixes: the coding harness is part of the system</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fMh4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fMh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png" width="1456" height="764" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:764,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:424976,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/179236490?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fMh4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 424w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 848w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 1272w, https://substackcdn.com/image/fetch/$s_!fMh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf82a71-3ec7-457d-b65a-fee94213abbd_1600x840.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most teams choose a coding agent by its model. AgentField tested the other half: ten coding harnesses on one open model, run on the same 113 real GitHub issues from the DeepSWE benchmark. Results ran from 3 solved issues to 62. The system around the model decides as much as the model does.</p><p><strong><a href="https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf">CodeAF</a></strong>, a new open-source coding harness by AgentField AI, finished #1 of the ten (method and data are public on GitHub):</p><ul><li><p>2x OpenCode&#8217;s solves and nearly 4x Claude Code&#8217;s, on the same model</p></li><li><p>4.8x less per solved issue than OpenCode, 3.4x less than Claude Code</p></li><li><p>Built for open models like DeepSeek, Qwen, GLM and Kimi, and it works with closed models too</p></li><li><p>One small Go binary, open source</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf&quot;,&quot;text&quot;:&quot;Try CodeAF on GitHub&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf"><span>Try CodeAF on GitHub</span></a></p><p>(Thanks to <a href="https://agentfield.ai/github/codeaf/?utm_source=sys_design&amp;utm_medium=newsletter&amp;utm_campaign=sys_design-261020&amp;utm_id=sys_design-261020-codeaf&amp;utm_content=codeaf">AgentField</a> for partnering on this newsletter.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Subscribe now and be the first to know about my letters:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>This is part 2 of a four-part<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> newsletter series:</p><ol start="18"><li><p>Reinforcement Learning from Human Feedback,</p></li><li><p>Pretraining,</p></li><li><p>Vector Search and Approximate Nearest Neighbors,</p></li><li><p>In-Context Learning,</p></li><li><p>Hallucination, Factuality and Grounding,</p></li><li><p>Quantization,</p></li><li><p>Context Windows and Long-Context Modeling,</p></li><li><p>Structured Outputs and Constrained Decoding,</p></li><li><p>Model Context Protocol,</p></li><li><p>Parameter-Efficient Fine-Tuning,</p></li><li><p>Diffusion Models,</p></li><li><p>Autoregressive Generation and Next-Token Prediction,</p></li><li><p>Self-Supervised Learning,</p></li><li><p>Inference,</p></li><li><p>Retrieval Reranking,</p></li><li><p>Hybrid Retrieval,</p></li><li><p>Chunking and Document Segmentation.</p></li></ol><p>( &#8230;and much more in Parts 3 &amp; 4!)</p><p>For each, I&#8217;ll share:</p><ul><li><p>What it means &amp; how it works,</p></li><li><p>A real-world analogy where useful,</p></li><li><p>A common mistake to avoid,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s dive in!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>18. Reinforcement Learning from Human Feedback</strong></h2><blockquote><p>Reinforcement Learning from Human Feedback (<strong>RLHF</strong>) uses human feedback to guide further model training toward preferred responses.</p></blockquote><p>Give reviewers two answers to the same question.</p><p>The reviewers compare qualities such as usefulness &amp; how well each answer follows instructions. Those comparisons train a reward model<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> to score responses. The language model then receives further training to produce responses with higher scores.</p><p>Human preferences help shape what the training process rewards.</p><p>This improves behavior according to the chosen criteria, but still needs careful evaluation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A6JM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A6JM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!A6JM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A6JM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!A6JM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26cc0758-522f-4c54-bef8-5c5b3fe73b23_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a coach reviewing practice performances:</p><p>Feedback guides the next attempt. The improvement depends partly on whether the coach rewards the qualities the task actually requires.</p><h3><strong>Common mistake</strong></h3><p>Confusing a preferred answer with a &#8220;verified&#8221; answer.</p><p>Reviewers could favor a polished response containing a subtle factual error. Check accuracy separately from tone &amp; helpfulness.</p><h3><strong>Why it matters</strong></h3><p>RLHF helps shape a broadly trained model into a more useful assistant. The feedback criteria influence which behaviors the model learns to favor.</p><h2><strong>19. Pretraining</strong></h2><blockquote><p>Pretraining is an initial training stage in which a model learns broad patterns from a large dataset before more specialized training.</p></blockquote><p>Before a model follows your request, it needs a foundation.</p><p>For a typical generative language model, pretraining repeatedly tests predictions of the next token<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. Prediction errors guide adjustments to the model&#8217;s weights. Across many examples, these adjustments help the model learn patterns in the text.</p><p>The text itself supplies the next-token answers.</p><p>Other models use different tasks, such as predicting missing pieces of an input.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-795!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-795!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!-795!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!-795!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!-795!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-795!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-795!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!-795!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!-795!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!-795!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60dad202-4eb7-4186-87b8-be4450a6ceae_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a broad education before a specialized course:</p><p>The foundation covers many subjects &amp; patterns. Later instruction directs those abilities toward a particular role.</p><h3><strong>Common mistake</strong></h3><p>Assuming pretraining produces a ready-to-use assistant.</p><p>A model trained to predict text doesn&#8217;t automatically respond in the style users expect. Further training &amp; application design help shape how it handles requests.</p><h3><strong>Why it matters</strong></h3><p>Pretraining provides capabilities reused across many tasks.</p><p>The data influences what the model learns well and where its knowledge has gaps.</p><h2><strong>20. Vector Search and Approximate Nearest Neighbors</strong></h2><blockquote><p>Vector search finds items with similar numerical representations. Approximate Nearest Neighbors (<strong>ANN</strong>) methods speed up search while accepting the possibility of <em>missing</em> some closest matches.</p></blockquote><p>Imagine searching millions of support documents:</p><p>The system converts your question into an embedding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> &amp; compares it with document embeddings with <em>vector search</em>. An exact<em> search</em> finds the closest matches under a chosen comparison rule. An <em>approximate search</em> uses an index, an organized search structure, to reduce the work.</p><p>The shortcut helps results arrive faster.</p><p>How much accuracy it sacrifices depends on the method &amp; its settings&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BArz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BArz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!BArz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!BArz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!BArz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!BArz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BArz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!BArz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!BArz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!BArz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e61a115-7a33-4789-93a4-93456c8ba917_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a librarian directing you to likely shelves&#8230;</p><p>You search a smaller area instead of checking every book. The shortcut saves time, but you could miss a useful book elsewhere.</p><h3><strong>Common mistake</strong></h3><p>Choosing the fastest setup without checking its results.</p><p>A quick search is unhelpful if it repeatedly misses the relevant document. Compare retrieval quality, response time &amp; memory use.</p><h3><strong>Why it matters</strong></h3><ul><li><p>Vector Search: Best for <em>smaller</em> datasets requiring the true nearest matches.</p></li><li><p>Approximate Nearest Neighbors: Best for <em>large</em> datasets where search speed &amp; scalability matter more than finding the exact nearest match.</p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>21. In-Context Learning</strong></h2><blockquote><p>In-context learning is a model&#8217;s ability to use instructions/examples in its current context without updating its weights.</p></blockquote><p>Show the model a few examples before asking it to label a new message:</p><div class="callout-block" data-callout="true"><p>&#8220;My card was charged twice&#8221; &#8594; Billing</p><p>&#8220;The page crashes when I sign in&#8221; &#8594; Technical</p></div><p>The examples demonstrate the categories &amp; response format. The model then uses the pattern to label the next message. No separate training run occurs!</p><p>The examples <em>guide</em> the response through the context.</p><p>(Remove them from a later request, and you shouldn&#8217;t assume the model still has access to them.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h2Ta!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h2Ta!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!h2Ta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h2Ta!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!h2Ta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb63d4df7-c766-4a50-86ba-03c7a6f98de6_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of filling out a form after examining a completed sample:</p><p>The sample shows how the fields work. You apply the pattern immediately without taking a new course.</p><h3><strong>Common mistake</strong></h3><p>Providing examples that cover only obvious cases.</p><p>If every billing example contains &#8220;invoice,&#8221; the model could rely too heavily on a specific word. Include varied wording &amp; difficult cases, then test on separate examples.</p><h3><strong>Why it matters</strong></h3><p>In-context learning lets you demonstrate a task quickly. It helps you test formats/categories before investing in fine-tuning.</p><h2><strong>22. Hallucination, Factuality, and Grounded Answers</strong></h2><blockquote><p>A hallucination is generated content presented as &#8220;true&#8221; despite being false/unsupported. Factuality concerns correctness; grounding connects an answer to evidence.</p></blockquote><p>An assistant gives you a confident answer &amp; 3 citations.</p><p>One source doesn&#8217;t exist. Another exists without supporting the claim. The answer looks well researched, but its appearance tells you little about its accuracy.</p><p>The evidence needs inspection too&#8230;</p><p>A <em>grounded</em> answer uses supplied or retrieved material. It could still repeat an error from an outdated source, so the material's quality matters.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pdpF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pdpF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pdpF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pdpF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!pdpF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc516c5b9-59e2-4f95-9b72-7454dc88e100_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a report with footnotes.</p><p>The footnotes help you trace the claims. You still need to check whether the sources exist &amp; support what the report says.</p><h3><strong>Common mistake</strong></h3><p>Treating a citation as a completed fact-check.</p><p>Check the source &amp; compare its content with the answer. Give the system a way to report insufficient evidence instead of filling gaps with guesses.</p><h3><strong>Why it matters</strong></h3><p>These distinctions help you find the source of an error. The application could need better documents, better retrieval, and/or stricter checks on the final answer.</p><h2><strong>23. Quantization</strong></h2><blockquote><p>Quantization stores model values using fewer bits, thus reducing memory needs while preserving less numerical details.</p></blockquote><p>A model is too large for your machine's memory.</p><p>Its weights are numbers, and storing those numbers takes space. Quantization converts selected values into <em>smaller</em> numerical representations. The model needs less memory, though the conversion introduces <em>approximations</em>.</p><p>You trade some precision for a smaller memory footprint.</p><p>The effect on output quality depends on the model &amp; the quantization method.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZvWk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZvWk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZvWk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZvWk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!ZvWk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40e57925-4633-49db-974a-ad5bf0700470_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of recording measurements to the nearest centimeter instead of millimeters.</p><p>You preserve less detail. Whether the difference matters depends on what you need the measurements for.</p><h3><strong>Common mistake</strong></h3><p>Assuming a smaller model representation always runs faster with identical results.</p><p>Speed depends on the hardware &amp; software used to run it. Test both quality and response time before choosing a quantized version.</p><h3><strong>Why it matters</strong></h3><p>Quantization helps larger models fit within smaller memory budgets. It creates more deployment options when the quality tradeoff is acceptable.</p><h2><strong>24. Context Windows and Long-Context Models</strong></h2><blockquote><p>A context window is the amount of information a model handles within a single context (measured in tokens). Long-context models support larger amounts of material.</p></blockquote><p>Upload a long manual &amp; ask about a detail halfway through it.</p><p>Your instructions, conversation history, document text, and tool results all take up space. In typical text-generation systems, the response also needs room within the overall limit. The application decides what to include &amp; how much space to reserve for the answer.</p><p>A larger window holds more material.</p><p>Yet it doesn&#8217;t guarantee the model uses every detail correctly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xsjn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xsjn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xsjn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xsjn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!Xsjn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2c95e33-a727-4913-921c-9725b3c907f0_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a desk covered with reference pages.</p><p>A larger desk holds more pages. It doesn&#8217;t guarantee you notice every detail or connect the right passages.</p><h3><strong>Common mistake</strong></h3><p>Assuming a document that fits is a document the model uses reliably.</p><p>Test questions whose answers appear in different parts of the document. Remove irrelevant material or retrieve targeted passages when full-document answers become unreliable.</p><h3><strong>Why it matters</strong></h3><p>Context limits affect document analysis, code review &amp; long conversations. Plus the amount of material processed influences cost &amp; response time.</p><h2><strong>25. Structured Outputs and Constrained Decoding</strong></h2><blockquote><p>Structured outputs follow a specified format. Constrained decoding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> restricts what model generates, so the output follows supported format rules.</p></blockquote><p>Your application needs 3 fields from a support ticket.</p><p>A paragraph is inconvenient for code to process. A schema, or set of format rules, defines the field names, value types, and permitted choices. <em>Constrained decoding</em> limits the model&#8217;s next-token options to keep the response within those rules.</p><p>This makes the result easier for software to process.</p><p>For example, a <em>structured output</em> could follow a JSON schema like this</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:&quot;c8c97a27-4f26-49d9-b8b0-3c7015c63156&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
 &#8220;category&#8221;: &#8220;billing&#8221;,
 &#8220;priority&#8221;: &#8220;high&#8221;,
 &#8220;order_id&#8221;: null
}</code></pre></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6j9m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6j9m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6j9m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6j9m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!6j9m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62c83733-4b36-46fd-9f8f-ed3fd311ba0a_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a form with fixed fields &amp; dropdown menus.</p><p>The form controls where information goes &amp; which options are allowed. It doesn&#8217;t establish whether the selected option is correct.</p><h3><strong>Common mistake</strong></h3><p>Confusing correct format with correct <em>information</em>.</p><p>A response could follow every format rule and still misclassify a ticket. Check the values and handle refusals or incomplete responses separately.</p><h3><strong>Why it matters</strong></h3><p>Structured outputs reduce work needed to turn model responses into usable application data. They solve a formatting problem, while factual checks remain necessary.</p><h2><strong>26. Model Context Protocol</strong></h2><blockquote><p>Model Context Protocol (<strong>MCP</strong>) is an open standard for connecting AI apps to external tools &amp; information sources.</p></blockquote><p>Your assistant needs access to a document store &amp; a ticket system.</p><p>An MCP server exposes capabilities, such as a document search or ticket lookup. The AI application connects through an MCP client, which discovers those capabilities and exchanges requests &amp; results. The shared protocol gives both sides a common way to communicate.</p><p>The connection follows a standard format.</p><p>(The application &amp; connected services still need to enforce access permissions.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ewp6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ewp6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ewp6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ewp6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!ewp6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ddee2d0-6089-43f7-909a-6df95286fd27_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a <em>standard</em> connector between devices:</p><p>A shared connector reduces custom wiring. Each device still offers different capabilities &amp; plugging it in doesn&#8217;t grant permission to use everything.</p><h3><strong>Common mistake</strong></h3><p>Treating an MCP server as automatically trusted.</p><p>A server could expose sensitive data or powerful actions. Review its capabilities, limit permissions &amp; decide which actions need approval.</p><h3><strong>Why it matters</strong></h3><p>MCP reduces custom integration work across compatible AI applications.</p><p>A server&#8217;s capabilities become reusable without designing a different communication interface for every application.</p><h2><strong>27. Parameter-Efficient Fine-Tuning and LoRA</strong></h2><blockquote><p>Parameter-Efficient Fine-Tuning (<strong>PEFT</strong>) adapts a model by training only a small portion of its parameters or added parameters. Low-Rank Adaptation (<strong>LoRA</strong>) is one method that learns compact additions to selected model weights.</p></blockquote><p>You want a model to follow your support team&#8217;s response style.</p><p>Full fine-tuning updates all of the model&#8217;s weights. LoRA keeps the original weights fixed and trains smaller groups of numbers that represent changes to selected layers. These learned additions influence the model&#8217;s output.</p><p>The additions are then saved as an adapter<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>.</p><p>The adapter works alongside the base model, or its changes are merged into compatible weights.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n-iV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n-iV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!n-iV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!n-iV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!n-iV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faeb49f05-a6ee-4ae3-861a-1a24fe760234_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a company handbook with a short <em>supplement</em> for each department:</p><p>The main handbook stays the same. Each supplement adapts to a specific role. A LoRA adapter serves a similar purpose through learned numerical changes.</p><h3><strong>Common mistake</strong></h3><p>Assuming a small adapter works with any model.</p><p>Its changes depend on the base model &amp; layers used during training. Keep the matching model version and configuration, then test the combined result on separate examples.</p><h3><strong>Why it matters</strong></h3><p>PEFT reduces the resources needed to train and store specialized adaptations.</p><p>The base model still needs memory and computation, but maintaining several task-specific versions becomes more practical.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>28. Diffusion Models</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/advanced-ai-concepts-explained">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Networking - A Deep Dive]]></title><description><![CDATA[#192: Part 1 - Must Know Networking Concepts Explained]]></description><link>https://newsletter.systemdesign.one/p/networking-fundamentals-software-engineers</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/networking-fundamentals-software-engineers</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 19 Oct 2026 14:46:45 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/eeecbfac-3f92-46f2-99d7-7e29eccfca1c_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Once upon a time, there lived a full-stack engineer named Jung.</p><p>He was very good at building apps &amp; deploying them.</p><p>Until one day, when the DevOps engineer from his team fell ill.</p><p>And he got the task of updating the VPC for their production app.</p><p>Yet he had zero knowledge of networking fundamentals.</p><p>So his tiny config change took down the entire app&#8230;</p><p>Onward.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://coveron.com/neocoveron">The Missing Layer in Your Security Stack (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://coveron.com/neocoveron" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1zWe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 424w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 848w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 1272w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1zWe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png" width="1456" height="806" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:806,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://coveron.com/neocoveron&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1zWe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 424w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 848w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 1272w, https://substackcdn.com/image/fetch/$s_!1zWe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbca843bf-a417-43b8-908a-c3c59f0535fa_1868x1034.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most security tools focus on preventing or detecting an attack.</p><p>Password managers protect credentials. Monitoring tools flag suspicious activity. But when a scam succeeds and money is lost, detection alone doesn&#8217;t help you recover it.</p><p><a href="https://coveron.com/neocoveron">Coveron adds a recovery layer to your security stack.</a></p><p>As someone who spends most of the day online, I already use tools to reduce security risks, but I like the idea of having a fallback if those protections fail.</p><p>Coveron monitors for suspicious activity and exposed personal data, then adds financial protection and hands-on recovery support when something goes wrong.</p><p>What you get:</p><ul><li><p>Up to $100K for eligible scam or online fraud losses</p></li><li><p>Up to $100K for cyber extortion or threats</p></li><li><p>Up to $2M for eligible identity theft recovery costs</p></li><li><p>Real people who guide you step-by-step through recovery</p></li></ul><p>Tools reduce risk. Insurance reduces loss. Coveron is built for what happens when prevention isn&#8217;t enough.</p><p style="text-align: center;"><em><strong>One scam can cost you everything &#8212; protect yourself now, first 100 users get 20% off with code neocoveron</strong></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://coveron.com/neocoveron&quot;,&quot;text&quot;:&quot;Get Coveron &#8594;&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://coveron.com/neocoveron"><span>Get Coveron &#8594;</span></a></p><p><em>(Thanks to <a href="https://coveron.com/neocoveron">Coveron</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I spent a few hours putting together this list of foundational networking concepts, so you don&#8217;t have to.</p><p>Curious to know how many are new to you:</p><ol><li><p>Network stack,</p></li><li><p>Encapsulation,</p></li><li><p>IP addressing,</p></li><li><p>Subnets &amp; CIDR,</p></li><li><p>VPC,</p></li><li><p>Routing &amp; forwarding,</p></li><li><p>NAT,</p></li><li><p>BGP,</p></li><li><p>Ports and sockets,</p></li><li><p>VPN.</p></li></ol><p>For each, I&#8217;ll share:</p><ul><li><p>What it is &amp; how it works in simple words,</p></li><li><p>A real-world analogy,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Don't miss out on new updates! Enter your email to stay in the loop:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/networking-fundamentals-software-engineers/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>1. Network stack</strong></h2><blockquote><p>The network stack divides communication into layers. Each layer handles a specific task &amp; passes data to the next layer.</p></blockquote><p>Two models explain how these layers work:</p><ul><li><p><strong>OSI Model:</strong> The Open Systems Interconnection (OSI<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>) model has 7 layers. It helps you understand and troubleshoot network communication.</p></li><li><p><strong>TCP/IP Model:</strong> The Transmission Control Protocol/Internet Protocol (TCP/IP) model has four layers: Application, Transport, Internet, and Link. It reflects how modern internet protocols work.</p></li></ul><p><em>Think about opening a website:</em></p><p>Your browser sends an HTTP request. The transport layer manages communication between applications, the internet layer routes packets toward their destination, and the link layer delivers data across the local network.</p><p>Each layer handles its own responsibility.</p><p>So your app does not have to manage packet routing or physical transmission.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PsRr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PsRr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PsRr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PsRr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!PsRr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f9802e7-80ab-4033-9b24-57572926e805_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A letter passing through the postal system:</p><p>You write the words. An envelope carries the address; a sorting office picks the route; and a truck moves the physical mail. Each stage trusts the next to do its job.</p><h3><strong>Why it matters</strong></h3><p>Imagine your application suddenly loses its database connection&#8230;</p><p>The problem could occur in several places:</p><ul><li><p><strong>Application layer:</strong> DNS fails to resolve the database hostname.</p></li><li><p><strong>Transport layer:</strong> A firewall blocks the database&#8217;s TCP port.</p></li><li><p><strong>Transport/Application boundary:</strong> A TLS handshake fails.</p></li><li><p><strong>Internet layer:</strong> A routing issue prevents packets from reaching the database.</p></li></ul><p>Understanding the network stack helps you identify where communication fails &amp; narrow down the root cause.</p><p>Reach for <code>tcpdump</code> when you suspect the transport, and <code>curl</code> when you suspect the application. Pair it with encapsulation, which shows what each layer adds to your data.</p><h2><strong>2. Encapsulation</strong></h2><blockquote><p>Encapsulation is the process of wrapping data with protocol headers as it moves down the network stack.</p></blockquote><p>When you send an HTTP request, each layer adds information needed to deliver data:</p><ol><li><p><strong>Application Layer:</strong> Creates the HTTP request containing the payload.</p></li><li><p><strong>Transport Layer:</strong> Adds a TCP header with source &amp; destination ports, sequence numbers, and control information.</p></li><li><p><strong>Network Layer:</strong> Adds an IP header with source &amp; destination IP addresses.</p></li><li><p><strong>Data Link Layer:</strong> Wraps the IP packet in an Ethernet frame with a header &amp; trailer.</p></li></ol><p>The receiving machine reverses this process; it&#8217;s called <em>decapsulation</em>.</p><p>Each layer processes its protocol information &amp; passes remaining data to layer above.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dJGi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dJGi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dJGi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dJGi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dJGi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F751a1c05-5b8b-4886-a9f0-ab69fbd148c2_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A gift in a box, inside a padded parcel, inside a shipping crate.</p><p>Each wrapper carries the label its own handler needs, and nobody opens more than one layer.</p><h3><strong>Why it matters</strong></h3><p>Every header adds overhead to network communication.</p><p>Sending a 10-byte payload over TCP/IPv4 and Ethernet requires:</p><ul><li><p>TCP header: 20 bytes</p></li><li><p>IPv4 header: 20 bytes</p></li><li><p>Ethernet header and trailer: 18 bytes</p></li><li><p>Application payload: 10 bytes</p></li></ul><p>That&#8217;s 58 bytes of protocol overhead for just 10 bytes of payload, excluding Ethernet padding and other link-level overhead.</p><p>Small messages consume significantly more bandwidth than their payload size suggests.</p><p>Read frames with <code>Wireshark</code> and set path sizes in your virtual private network config. Read it alongside ports and sockets, which explain the transport header fields.</p><h2><strong>3. IP addressing</strong></h2><blockquote><p>An Internet Protocol (<strong>IP</strong>) address identifies a network interface &amp; helps routers deliver packets to the correct destination.</p></blockquote><p>There are two main versions:</p><ul><li><p><strong>IPv4:</strong> Uses 32-bit addresses, such as <code>192.168.1.1</code>. It supports 4.3 billion unique addresses.</p></li><li><p><strong>IPv6:</strong> Uses 128-bit addresses, such as <code>2001:db8::1</code>. It provides a vastly larger address space.</p></li></ul><p>IPv4 addresses became <em>scarce</em> as the Internet grew&#8230;</p><p>To conserve public addresses, networks adopted Network Address Translation (<strong>NAT</strong>). This allows many devices to share one public IPv4 address.</p><p>IPv6 addresses this limitation by providing enough addresses for an enormous number of devices &amp; networks.</p><p>Plus, many networks support both IPv4 &amp; IPv6, an approach called <strong>dual stack</strong>.</p><ul><li><p>Your laptop could have both an IPv4 and an IPv6 address.</p></li><li><p>A website could publish both IPv4 (<strong>A</strong>) and IPv6 (<strong>AAAA</strong>) DNS records.</p></li><li><p>Your device selects a reachable address &amp; connects using corresponding protocol.</p></li></ul><p>IPv6 adoption varies across networks&#8230;</p><p>Some mobile carriers and cloud providers support it extensively, while many corporate networks still rely on IPv4.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xwz_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xwz_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!xwz_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xwz_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!xwz_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e856f42-7683-43b8-84ac-192471cb95eb_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of IPv4 as a city running out of house addresses.</p><p>IPv6 expands the address space so dramatically that there is room for an enormous number of new buildings.</p><h3><strong>Why it matters</strong></h3><p>When designing a cloud network, you need to choose which IP versions to support.</p><ul><li><p><strong>AWS VPC:</strong> Configure IPv4-only, dual-stack, or IPv6-only subnets according to your requirements.</p></li><li><p><strong>Kubernetes:</strong> Configure IPv4, IPv6, or dual-stack networking based on your cluster and Container Network Interface (CNI) support.</p></li></ul><p>Also you need to understand <em>subnetting</em>.</p><p>It divides an IP address range into smaller networks for routing &amp; address management.</p><h2><strong>4. Subnets and CIDR</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/networking-fundamentals-software-engineers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[HTTP1 vs HTTP2 vs HTTP3]]></title><description><![CDATA[#191: Part 2 - 23 Concepts Every Engineer Must Know]]></description><link>https://newsletter.systemdesign.one/p/http2-vs-http3-explained</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/http2-vs-http3-explained</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sat, 17 Oct 2026 13:34:54 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3e68996e-75f2-4bb9-8a93-12c2a2b06a8e_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><h2><a href="https://nordvpn.com/neokim">Security at the Architecture Level (Partner)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://nordvpn.com/neokim" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wN90!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!wN90!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!wN90!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!wN90!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wN90!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://nordvpn.com/neokim&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wN90!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!wN90!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!wN90!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!wN90!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5daa28bf-f309-480e-9b7e-7aed8a0c3300_1080x1080.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most online attacks don&#8217;t happen in one step.</p><p>A phishing link leads to a fake site, the site pushes a malicious download, and the download delivers the payload.</p><p><a href="https://nordvpn.com/neokim">NordVPN approaches this like a defense-in-depth problem.</a></p><p>As someone who works online every day, I already think about security in layers, so having phishing, scam, and malware protection alongside the VPN is useful to me.</p><p>NordVPN&#8217;s built-in next-gen antivirus aims to intercept threats earlier in the attack pipeline instead of waiting until a malicious file has already reached your device. NordVPN uses a proprietary machine learning model to block phishing sites before they cause harm, while its malware protection scans downloading files and removes them if they&#8217;re dangerous.</p><p>What you get:</p><ul><li><p>Anti-phishing protection powered by NordVPN&#8217;s proprietary machine-learning model</p></li><li><p>Protection against scam websites and fake online stores</p></li><li><p>Malware scanning for downloading files</p></li></ul><p>The VPN remains a core part of NordVPN, alongside these additional security features.</p><p>Depending on your plan and operating system, one subscription gives you access to multiple security tools.</p><h4 style="text-align: center;"><strong><a href="https://nordvpn.com/neokim"><mark data-color="#ffff00" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Get NordVPN 2Y plan with 4 extra months&#8594;</mark></a></strong></h4><p>Plus, it comes with a 30-day money-back guarantee.</p><p><em>(Thanks to <a href="https://nordvpn.com/neokim">NordVPN</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><code>HTTP/2</code> was supposed to make the web faster.</p><p>It introduced multiplexing, header compression &amp; better connection reuse.</p><p>But one lost TCP packet could still delay every stream on the connection.</p><p><code>HTTP/3</code> was built to solve this problem.</p><p>In this newsletter, we&#8217;ll break down 12 essential concepts behind <code>HTTP/2</code> &amp; <code>HTTP/3</code>:</p><ol start="12"><li><p>Multiplexing,</p></li><li><p>HPACK header compression,</p></li><li><p>Flow control,</p></li><li><p>Stream prioritization,</p></li><li><p>Server push &amp; early hints,</p></li><li><p>TCP head-of-line blocking,</p></li><li><p>QUIC over UDP,</p></li><li><p>QUIC handshake,</p></li><li><p>Independent streams &amp; loss recovery,</p></li><li><p>Connection IDs &amp; connection migration,</p></li><li><p>QPACK,</p></li><li><p>Alt-Svc &amp; HTTPS DNS records.</p></li></ol><p>For each, I&#8217;ll share:</p><ul><li><p>What it is &amp; how it works in simple words,</p></li><li><p>A real-world analogy,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/http2-vs-http3-explained/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>12. Multiplexing</strong></h2><p>Multiplexing sends many requests &amp; responses at the same time over ONE connection by interleaving their frames.</p><p>The queue disappears&#8230;</p><p>Request one waits on a slow database while other requests return &amp; render. The server replies in whatever order the data becomes ready.</p><p>The result shows up plainly in connection counts:</p><p>A desktop page opens <em>fewer</em> connections on <code>HTTP/2</code> than on <code>HTTP/1.1</code>. The gap roughly doubles on lighter pages, where one connection does the work of two.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!04N5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!04N5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!04N5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!04N5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!04N5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!04N5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!04N5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!04N5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!04N5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!04N5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5da7ae0-b04c-4973-8fff-5d388620d182_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>One conversation channel where each sentence carries the speaker&#8217;s name.</p><p>Three people talk at once, and nobody loses the thread.</p><h3><strong>Why it matters</strong></h3><p>Multiplexing changes how you bundle because many tiny files beat a large one for cache reuse.</p><p>Confirm which protocol your assets use with the devtools protocol column and measure the bundling change in WebPageTest. Yet TCP head-of-line blocking<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> marks the limit multiplexing could never remove.</p><h2><strong>13. HPACK Header Compression</strong></h2><p>HPACK is the header compression format for <code>HTTP/2</code>.</p><p>It&#8217;s built from a static table, a dynamic table &amp; Huffman coding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>.</p><p>Headers repeat almost perfectly. Your <code>user agent</code> string, <code>accept</code> headers, and <code>cookies</code> go out identically on every request, and on an API-heavy page they outweigh the payload.</p><p>HPACK indexes them:</p><p>A fixed table of common header names covers the obvious cases, so a method line becomes a single byte. Headers you have already sent go into a dynamic table shared by both ends.</p><p>The second request references those entries by number rather than repeating them, and the saving compounds across every request on the connection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d7E7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d7E7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!d7E7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d7E7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!d7E7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8cadb70-e81d-4a3b-af8d-740259fe43d9_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Shorthand between two colleagues who talk daily.</p><p>Once you both agree a short name means one specific document, you stop saying the full title.</p><h3><strong>Why it matters</strong></h3><p>Header weight decides real latency on pages carrying large authentication tokens.</p><p>Inspect encoded header sizes in Wireshark and compare them against the devtools network panel. QPACK rebuilds this idea for out-of-order delivery.</p><h2><strong>14. Flow Control</strong></h2><p>Flow control limits how much data a sender may have outstanding, applied per stream &amp; across the whole connection.</p><p>The receiver sets a flow-control window. This limits how much DATA the sender can transmit before receiving additional flow-control credit. A <code>WINDOW_UPDATE</code> frame grants more room as the receiver consumes data, and the default initial window is 65,535 bytes.</p><p>This mechanism protects slow consumers<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>:</p><p>A browser decoding a large image should slow the pipe rather than buffer forever, and a proxy feeding a slow client behaves the same way.</p><p>Also it stops one greedy stream from monopolizing a connection everything else depends on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8jbF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8jbF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8jbF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8jbF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8jbF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e08a09d-25e4-45dd-bca5-188489a5b430_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A coworker saying, &#8220;Send me five files at a time, and I will ask for more.&#8221;</p><p>They control the pace, so nothing piles up on their desk.</p><h3><strong>Why it matters</strong></h3><p>Large uploads, gRPC streams, and video segments all hit this ceiling before they hit bandwidth.</p><p>Watch window updates with <code>nghttp</code> and confirm socket-level throughput with <code>ss</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. Independent streams show how QUIC applies the same idea per stream.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http2-vs-http3-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http2-vs-http3-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/http2-vs-http3-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>15. Stream Prioritization</strong></h2><p>Stream prioritization lets a client tell the server which responses matter most, so the server can send that data first.</p><p>A browser needs CSS to render a webpage. Giving CSS higher priority than a large image helps the page become usable quicker, even if the total amount of data stays the same.</p><p><code>HTTP/2</code> used a complex system of stream dependencies &amp; weights to decide which data to send first. But browsers &amp; servers struggled to implement it consistently!</p><p>Then a simpler priority scheme got introduced... It uses 2 signals:</p><ul><li><p><strong>Urgency (0&#8211;7):</strong> Indicates how important a response is. Zero is the highest priority &amp; seven is the lowest.</p></li><li><p><strong>Incremental flag:</strong> Indicates whether a response can be delivered progressively, thus allowing the server to interleave its data with other responses.</p></li></ul><p>Also browsers provide the Fetch Priority API.</p><p>This lets developers influence the priority of resources using attributes such as <code>fetchpriority="high"</code>.</p><p>The browser uses these hints when scheduling requests and assigning HTTP priorities, although the Fetch Priority API does not directly expose HTTP&#8217;s urgency values.</p><p>Adoption of the Fetch Priority API grew rapidly after Chrome introduced support.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cst2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cst2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!cst2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!cst2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!cst2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!cst2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cst2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!cst2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!cst2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!cst2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb79e2d65-7e89-46b3-b7f8-65c8d051d60a_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A triage nurse.</p><p>Everyone in the waiting room gets seen &amp; order reflects who needs help soonest.</p><h3><strong>Why it matters</strong></h3><p>One attribute on your largest visible image moves a headline performance metric.</p><p>Set fetchpriority in your markup and verify the assigned value in the Chrome devtools priority column. Early hints reach the same goal from the server side.</p><h2><strong>16. Server Push and Early Hints</strong></h2><p>Server Push lets a server send resources to a browser before browser requests them.</p><p>It was one of <code>HTTP/2</code>&#8217;s most promising features.</p><p>But it had its problems:</p><p>Servers pushed files already stored in the browser&#8217;s cache, thus wasting bandwidth. Also performance improvements were inconsistent, so adoption remained low.</p><p>(Chrome eventually disabled Server Push by default, and Firefox removed support.)</p><p>Early Hints emerged as a simpler alternative:</p><p>Instead of sending the resource itself, the server sends an HTTP <code>103 Early Hints</code> response containing <code>Link</code> headers while preparing the final response.</p><p>The browser then uses these hints to:</p><ul><li><p><strong>Preconnect:</strong> Establish connections to other servers before they&#8217;re needed.</p></li><li><p><strong>Preload:</strong> Start downloading crucial resources, such as CSS files, before the final HTML arrives.</p></li></ul><p>This helps the browser start useful work earlier &amp; potentially render the page faster.</p><p>Yet adoption remains limited&#8230; Only 2.9% of desktop pages used Early Hints, with Shopify accounting for roughly 90% of those deployments.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!quqC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!quqC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!quqC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!quqC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!quqC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!quqC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!quqC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!quqC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!quqC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!quqC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71449a02-1ef0-4374-9733-769b7f81827d_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Push is a waiter setting down a dish you never ordered &amp; may already have.</p><p>Early hints is a waiter handing you the menu while the kitchen warms up.</p><h3><strong>Why it matters</strong></h3><p>Dead push configuration survives in production long after browsers stopped honoring it.</p><p>Enable early hints at Cloudflare/Fastly and prove the gain with real user monitoring rather than a lab score. Chunked transfer encoding fills the same dead time once the response finally starts.</p><h2><strong>17. TCP Head-of-Line Blocking</strong></h2><p>TCP delivers data to applications in a strict order.</p><p>If a TCP packet gets lost, later data must wait until the missing packet gets retransmitted. Yet this creates a problem for <code>HTTP/2</code>&#8230;</p><p><code>HTTP/2</code> multiplexes multiple streams over one TCP connection. And TCP sees only a single ordered sequence of bytes, with no knowledge of individual <code>HTTP/2</code> streams. So one lost TCP packet delays data delivery across multiple streams, even when their data has already arrived.</p><p>This is called <em>TCP head-of-line (<strong>HOL</strong>) blocking.</em></p><p>TCP uses acknowledgments &amp; retransmissions to provide reliable, ordered delivery.</p><p>But this ordering can delay otherwise available data&#8230; On lossy networks, <code>HTTP/2</code> using one TCP connection sometimes performs worse than <code>HTTP/1.1</code> using six parallel connections.</p><p>Each TCP connection handles packet loss independently, so a lost packet on one connection does not directly block the others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!20lI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!20lI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!20lI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!20lI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!20lI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!20lI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!20lI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!20lI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!20lI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!20lI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48769818-b302-45c3-9c18-fceab11f4813_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>One conveyor belt at a sorting depot.</p><p>Drop a box &amp; everything behind it stops moving, even if those parcels have nothing to do with each other.</p><h3><strong>Why it matters</strong></h3><p>This single property is the entire reason <code>HTTP/3</code> exists.</p><p>Confirm retransmits with <code>ss -i</code> and capture the stall itself with <code>tcpdump</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a>. QUIC over UDP replaces the transport rather than working around it.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>18. QUIC over UDP</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/http2-vs-http3-explained">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[HTTP1 vs HTTP2 vs HTTP3]]></title><description><![CDATA[#190: Part 1 - 23 Concepts Every Engineer Should Know]]></description><link>https://newsletter.systemdesign.one/p/http-concepts-explained</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/http-concepts-explained</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 15 Oct 2026 12:07:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e3979e0c-96c2-4cea-bc82-998b1eb5e92e_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><h3><a href="https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4">Live demo: give AI agents the access they need without credentials they can leak</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CtdE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 424w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 848w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CtdE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp" width="1200" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:688818,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:&quot;https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/220234867?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CtdE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 424w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 848w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 1272w, https://substackcdn.com/image/fetch/$s_!CtdE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94f8bf40-15c7-47d7-acf7-37dbdafa15d2_1200x800.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a href="https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4">Infisical&#8217;s</a> Agent Vault gives AI agents access to services without ever handing them secrets. A proxy attaches credentials on the way out, with no code changes. You control what agents can reach and when access expires.</p><p>See it in a 30-minute live demo on Wednesday, October 21 at 1 PM ET.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4&quot;,&quot;text&quot;:&quot;Save your spot&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4"><span>Save your spot</span></a></p><p><em>(Thanks to <a href="https://www.vpdae.com/redirect/ap9y0q1160spq7um58llgjb4rq4">Infisical</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>Why does a site take several seconds to load, even if server responds in milliseconds?</p><p>Before a single page appears, the browser must establish connections, send requests, and receive responses&#8230; </p><p>Understanding underlying mechanisms changed how I think about HTTP &amp; web performance.</p><p>In this newsletter, I&#8217;ll break down must-know HTTP concepts. Some of these are foundational &amp; some are quite advanced.</p><p>All of them are useful to engineers building production-ready systems:</p><ol><li><p>Request-response cycle,</p></li><li><p>TCP handshake,</p></li><li><p>Persistent connections,</p></li><li><p>Pipelining,</p></li><li><p>HTTP head-of-line blocking,</p></li><li><p>Chunked transfer encoding,</p></li><li><p>Caching &amp; conditional requests,</p></li><li><p>Parallel connections &amp; domain sharding,</p></li><li><p>TCP slow start,</p></li><li><p>The binary framing layer,</p></li><li><p>Streams, messages &amp; frames.</p></li></ol><p>(&#8230;and much more in Part 2!)</p><p>For each, I&#8217;ll share:</p><ul><li><p>What it is &amp; how it works in simple words,</p></li><li><p>A real-world analogy,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/http-concepts-explained/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>1. Request-Response Cycle</strong></h2><p>Every HTTP exchange is one request and one response.</p><p>The client sends a method, a path, and a set of headers. The server replies with a status code, its own headers, and usually a body. In <code>HTTP/1.x</code>, the message format is text-based, so you could type a request by hand into a terminal and read the reply with your own eyes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>.</p><p>The earliest version of the protocol supported a single method and returned a single file type. The next version added headers, status codes, POST, and HEAD.</p><p>Also, it opened a fresh connection for every exchange and threw it away afterward. (This decision shaped the next 20+ years of workarounds.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qDj_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qDj_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!qDj_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qDj_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qDj_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1379ec92-f6d6-431f-b3de-e41585b87575_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Ordering by postcard:</p><p>You write one item, mail it, and wait for one parcel.</p><p>To order a second item, you write a second postcard.</p><h3><strong>Why it matters</strong></h3><p>Debugging an unexpected status code starts with reading the raw exchange, not your application logs.</p><p>Send requests by hand with <code>curl</code> and inspect real traffic in the Chrome DevTools Network tab. The binary framing layer picks up from here, keeping these semantics and changing the bytes.</p><h2><strong>2. TCP Three-Way Handshake</strong></h2><p>Transmission Control Protocol (<strong>TCP</strong>) opens a connection with 3 messages before either side sends data.</p><ol><li><p>Client sends a synchronize packet.</p></li><li><p>Server replies with an acknowledgment plus its own sequence number.</p></li><li><p>Client acknowledges the number &amp; connection opens.</p></li></ol><p>Three messages cost one full round trip&#8230;</p><p>i.e., on a link with 100ms of latency, you burn 100ms before the first byte of your request leaves the machine.</p><p>Encryption adds more on top&#8230;</p><p>A Transport Layer Security (<strong>TLS</strong>) 1.2 handshake costs two extra round trips, and TLS 1.3 cut that to one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kqhV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kqhV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kqhV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kqhV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!kqhV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb7259ae-ad6d-4774-bb33-4ac352130f04_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A phone call:</p><p>You dial, they say hello, and you say hello back. And only on the fourth breath does anyone say something useful.</p><h3><strong>Why it matters</strong></h3><p>Connection setup shows up in your p99 long before your handler code does.</p><p>Measure it with <code>curl -w</code> and watch it across a full page load in WebPageTest. Persistent connections spread that cost across many requests.</p><h2><strong>3. Persistent Connections</strong></h2><p>A persistent connection stays open after a response, so the next request reuses it.</p><p><code>HTTP/1.1</code> made this the default behavior. The connection lives until either side sends a close header or a timeout fires, so one handshake now covers dozens of requests.</p><p>The saving compounds on real pages.</p><p>A page with 40 assets used to pay 40 handshakes; on a single persistent connection, it pays one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_NtK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_NtK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!_NtK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_NtK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!_NtK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3242c-ef12-4451-a51a-f51cc4694aa8_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Keeping the phone line open between questions instead of hanging up and redialing every time you think of something new.</p><h3><strong>Why it matters</strong></h3><p>Connection churn on a busy proxy exhausts temporary ports well before it exhausts bandwidth<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>.</p><p>Tune <code>keepalive_timeout</code> in nginx and <code>server.keepAliveTimeout</code> in Node.js, then check both against your load balancer. TCP slow start explains why a reused connection also runs faster.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>4. Pipelining</strong></h2><p>Pipelining lets a client send several requests back-to-back on one connection without waiting for each response.</p><p>The browser asks for two images at once rather than asking, waiting, then asking again. On paper, it removes a full round trip per request while using nothing more than the connection you already have.</p><p>Yet one rule ruined it:</p><p>Responses must return in the exact order the requests went out, so a slow first response stalls everything behind it. Buggy proxies mangled pipelined traffic on top of that.</p><p>(NOTE: Because of these problems, major browsers disabled <code>HTTP/1.1</code> pipelining, and it never gained widespread adoption.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l6G1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l6G1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!l6G1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l6G1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!l6G1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddc2205a-fa7c-4dd6-802f-7285b2d510b8_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Ordering all three courses at once:</p><p>The kitchen still serves them in the order you named them, so a slow starter holds up your main.</p><h3><strong>Why it matters</strong></h3><p>You will find pipelining disabled in <code>curl</code> and every browser, and now you know why.</p><p>Confirm the behavior with <code>curl</code> and watch real request ordering in Wireshark<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>. Multiplexing solves the same problem without the ordering rule.</p><h2><strong>5. HTTP Head-of-Line Blocking</strong></h2><p>Head-of-line blocking occurs when first item in a queue delays every item behind it<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>.</p><p>One <code>HTTP/1.1</code> connection processes one exchange at a time:</p><p>A slow database query on request one could keep four other requests waiting, and the network sits idle while the queue holds.</p><p>This is the ceiling <code>HTTP/1.1</code> could never lift&#8230; Persistent connections removed the handshake cost and left the queue completely intact.</p><p>Every workaround built on top of it, from parallel connections to asset bundling, exists to hide this single property.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!20yz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!20yz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!20yz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!20yz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!20yz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!20yz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!20yz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!20yz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!20yz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!20yz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b040cb0-94b8-4a97-9bf4-a763225c9020_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A single supermarket checkout:</p><p>The shopper at the front needs a price check, and the four people behind them stand still.</p><h3><strong>Why it matters</strong></h3><p>Stair-stepped requests with visible gaps in a waterfall chart point straight at this.</p><p>Read the waterfall in WebPageTest and count concurrent requests in the Chrome DevTools Network panel. Parallel connections show the workaround the browsers actually picked.</p><h2><strong>6. Chunked Transfer Encoding</strong></h2><p>Chunked transfer encoding lets a server send a response in pieces without knowing the total size in advance.</p><p>The server marks the response as chunked and writes each piece with its size in hexadecimal on the line above. A &#8220;zero-length&#8221; chunk marks the end.</p><p>The browser could start rendering before the full response arrives.</p><p>In <code>HTTP/1.1</code>, chunked transfer encoding supports streaming generated HTML, server-sent events, and token-by-token model responses.</p><p><code>HTTP/2</code> and <code>HTTP/3</code> use DATA frames instead.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rxmV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rxmV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!rxmV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rxmV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!rxmV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F597213e2-ccd4-4aa2-acf1-622ea0cf50ca_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A publisher shipping a book one chapter at a time.</p><p>You start reading chapter one while the author is still writing chapter four.</p><h3><strong>Why it matters</strong></h3><p>Streaming responses depend on the HTTP version&#8217;s framing mechanism, and accidental buffering often stops streaming. </p><p>Check <code>proxy_buffering</code> in nginx and <code>res.flushHeaders</code> in Express before you blame your application code. Early hints apply the same idea to the wait before a response starts.</p><h2><strong>7. Caching and Conditional Requests</strong></h2><p>Caching stores a copy of a response so a later request skips the network entirely.</p><p><code>Cache-Control</code> sets the rules:</p><p>A <code>max-age</code> directive says how long a copy stays fresh; <code>no-cache</code> forces a check on every use, and <code>immutable</code> promises the file never changes under its URL.</p><p>Conditional requests handle the check cheaply:</p><p>The client sends its stored entity tag in an <code>If-None-Match</code> header, and a server holding the same version answers <code>304 Not Modified</code> without a body.</p><p>A cache hit costs zero bytes on the wire and zero milliseconds of server time, thus making it the cheapest performance work available to you.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ws71!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ws71!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ws71!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ws71!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ws71!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ws71!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ws71!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ws71!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ws71!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ws71!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27dd19af-6a1d-4b18-a890-f996dbe39526_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Asking a librarian whether the report changed since your last visit.</p><p>If nothing changed, you read the copy already on your desk.</p><h3><strong>Why it matters</strong></h3><p>Static assets &amp; API responses need opposite caching policies, and mixing them up costs freshness or bandwidth.</p><p>Set the rules at the edge in Cloudflare/Varnish and read the real cache hit ratio there rather than trusting your config. Conditional requests lose their value once you version filenames properly.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Share this letter &amp; I&#8217;ll send you some rewards for the referrals!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>8. Parallel Connections and Domain Sharding</strong></h2><p>Browsers open several TCP connections (typically 6) to the same origin at once.</p><p>Six lanes beat one lane, so head-of-line blocking hurts less. Sites wanting more than six invented extra hostnames, serving images from one subdomain &amp; scripts from another. That bought another six per name.</p><p>This technique is called <em>domain sharding</em>&#8230; It shaped front-end architecture.</p><p>But it became obsolete the moment multiplexing arrived&#8230; yet survives in production long after the sites that used it moved on&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vVLA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vVLA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!vVLA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vVLA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!vVLA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa15fba0c-18ce-4683-9004-4a5d697c0dc8_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Opening more checkout lanes.</p><p>When six lanes fill up, you rent the shop next door and open six more.</p><h3><strong>Why it matters</strong></h3><p>Removing dead shards is one of the easier wins available on an older codebase.</p><p>Measure the before and after in WebPageTest and let Lighthouse<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> flag the redundant origins. TCP slow start explains why those extra connections start slow.</p><h2><strong>9. TCP Slow Start</strong></h2><p>Slow start is a congestion control algorithm where a new connection begins with a small send window &amp; then grows it each round trip.</p><p>TCP has no idea how much bandwidth sits between you and your user. Guessing high floods the path and drops packets, so it guesses low and probes upward instead.</p><p>The window typically starts at 10 packets, roughly 14 kilobytes, and doubles on every successful round trip. Packet loss halves it and switches the sender to a slower climb<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>.</p><p>Without this algorithm, every new connection would flood the path and collapse throughput for everyone sharing 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_!ZUjE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZUjE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZUjE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZUjE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ZUjE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9151f9ee-0375-49ec-9afd-f717d924e29a_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Merging onto a motorway:</p><p>You accelerate in stages instead of flooring it blind into traffic you cannot see yet.</p><h3><strong>Why it matters</strong></h3><p>The first 14 kilobytes of your HTML carry more weight than the next 500.</p><p>Put critical CSS &amp; your hero image reference inside that window and let Lighthouse confirm the render path. Persistent connections keep the window you already earned.</p><h2><strong>10. Binary Framing Layer</strong></h2><p>Binary framing layer encodes HTTP messages as binary frames instead of plain text lines.</p><p>Each frame carries a length, type, set of flags, and a stream identifier in a fixed nine-byte header. The methods, headers, and status codes stay exactly as they were.</p><p>You still send <code>GET</code>&#8230; You still read <code>404</code>. The bytes on the wire look completely different, and frames parse faster and pack tighter than text ever did.</p><p>The stream identifier is the important part, and the next concept explains why.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iqGz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iqGz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!iqGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iqGz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!iqGz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0fb8b3-f0a8-4c6c-98fb-a66476e416ea_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Shipping containers replacing loose cargo.</p><p>The goods are identical, and the uniform box is what lets a crane stack, sort, and interleave them at speed.</p><h3><strong>Why it matters</strong></h3><p>Reading <code>HTTP/2</code> traffic needs different tools than reading <code>HTTP/1.1</code> traffic.</p><p>Dump frames with nghttp and decode full sessions in Wireshark with a TLS key log. Streams &amp; frames explain what the identifier inside each frame does.</p><h2><strong>11. Streams, Messages, and Frames</strong></h2><p>A connection carries many streams; each stream carries one request-response pair, and each message splits into frames tagged with a stream identifier.</p><p>i.e., three levels, one job.</p><p>The identifier lets frames from different requests share the wire and still reassemble correctly at the far end.</p><p>Numbering follows a simple rule:</p><p>Client-initiated streams take odd numbers, server-initiated streams take even ones, and identifiers always increase.</p><p>A stream costs only a few bytes per frame to label; this is what makes concurrency on a single connection practical.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tybx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tybx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tybx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tybx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tybx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0915f87b-2129-467b-ba5b-07fa48f271c8_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>One highway with many lanes.</p><p>Every car carries a destination label, so they travel together and still arrive at different lanes.</p><h3><strong>Why it matters</strong></h3><p>Default stream limits rarely match the concurrency your service actually sees.</p><p>Set <code>http2_max_concurrent_streams</code> in nginx and the matching limit in Envoy against your real p99. Flow control decides how much data those streams may send.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>Final Words</strong></h2><p><code>HTTP/1.1</code> made the web faster, but it left one major problem unsolved: responses still had to arrive in order on each connection.</p><p><code>HTTP/2</code> addressed this with multiplexing&#8230; But TCP&#8217;s head-of-line blocking remained.</p><p>In Part 2, we&#8217;ll explore how <code>HTTP/2</code> &amp; <code>HTTP/3</code> tackled these bottlenecks, and why the web needed another major upgrade.</p><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 17 October. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/http-concepts-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3>References</h3><ul><li><p>RFC 9110, <em>HTTP Semantics</em>:<a href="https://www.rfc-editor.org/rfc/rfc9110.html"> https://www.rfc-editor.org/rfc/rfc9110.html</a></p></li><li><p>RFC 9111, <em>HTTP Caching</em>:<a href="https://www.rfc-editor.org/rfc/rfc9111.html"> https://www.rfc-editor.org/rfc/rfc9111.html</a></p></li><li><p>RFC 9112, <em>HTTP/1.1</em>:<a href="https://www.rfc-editor.org/rfc/rfc9112.html"> https://www.rfc-editor.org/rfc/rfc9112.html</a></p></li><li><p>RFC 9113, <em>HTTP/2</em>:<a href="https://www.rfc-editor.org/rfc/rfc9113.html"> https://www.rfc-editor.org/rfc/rfc9113.html</a></p></li><li><p>RFC 7541, <em>HPACK: Header Compression for HTTP/2</em>:<a href="https://www.rfc-editor.org/rfc/rfc7541.html"> https://www.rfc-editor.org/rfc/rfc7541.html</a></p></li><li><p>RFC 9218, <em>Extensible Prioritization Scheme for HTTP</em>:<a href="https://www.rfc-editor.org/rfc/rfc9218.html"> https://www.rfc-editor.org/rfc/rfc9218.html</a></p></li><li><p>RFC 8297, <em>An HTTP Status Code for Indicating Hints</em>:<a href="https://www.rfc-editor.org/rfc/rfc8297.html"> https://www.rfc-editor.org/rfc/rfc8297.html</a></p></li><li><p>RFC 9000, <em>QUIC: A UDP-Based Multiplexed and Secure Transport</em>:<a href="https://www.rfc-editor.org/rfc/rfc9000.html"> https://www.rfc-editor.org/rfc/rfc9000.html</a></p></li><li><p>RFC 9114, <em>HTTP/3</em>:<a href="https://www.rfc-editor.org/rfc/rfc9114.html"> https://www.rfc-editor.org/rfc/rfc9114.html</a></p></li><li><p>RFC 9204, <em>QPACK: Field Compression for HTTP/3</em>:<a href="https://www.rfc-editor.org/rfc/rfc9204.html"> https://www.rfc-editor.org/rfc/rfc9204.html</a></p></li><li><p>HTTP Archive, <em>Web Almanac, HTTP chapter</em>:<a href="https://almanac.httparchive.org/en/2024/http"> https://almanac.httparchive.org/en/2024/http</a></p></li><li><p>Chrome for Developers, <em>Removing HTTP/2 Server Push from Chrome</em>:<a href="https://developer.chrome.com/blog/removing-push"> https://developer.chrome.com/blog/removing-push</a></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>HTTP/2 and HTTP/3 preserve the core HTTP semantics but use binary framing instead of HTTP/1.x&#8217;s text-based message format.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><ul><li><p>Connection churn: Opening and closing too many connections wastes resources.</p></li><li><p>Temporary ports: Each outgoing connection uses a temporary port. Too many short-lived connections can exhaust available ports.</p></li><li><p>Keep-alive timeout: Controls how long an idle connection stays open for reuse.</p></li><li><p>Load balancer: Its timeout settings should work with your server&#8217;s settings to avoid unexpected disconnections.</p></li><li><p>TCP slow start: New connections start with a limited sending rate. Reusing an existing connection avoids repeating this slow growth phase.</p></li></ul><p>Reuse connections to reduce connection setup overhead, avoid port exhaustion, and improve performance.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Wireshark is a free, open-source network analysis tool that captures and examines network traffic in detail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><ul><li><p>Head-of-line blocking: One slow request delays other requests waiting behind it.</p></li><li><p>HTTP/1.1: A single connection handles responses one at a time, in order.</p></li><li><p>Example: Five requests share one connection. The first request takes 5 seconds because of a slow database query. The other four must wait.</p></li><li><p>Persistent connections: Reuse the same connection to avoid repeated TCP handshakes, but they don&#8217;t solve head-of-line blocking.</p></li><li><p>Parallel connections: Browsers open multiple connections so a slow request on one connection doesn&#8217;t block requests on others.</p></li></ul><p>HTTP/2 addresses this with multiplexing!</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Google Lighthouse is a free, open-source tool that analyzes a website and identifies ways to improve its performance, accessibility, and SEO.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>The initial congestion window varies by implementation. Traditional loss-based TCP congestion control reduces its window after detecting congestion, while algorithms such as BBR use different mechanisms. The diagram illustrates a simplified loss-based congestion-control scenario.</p></div></div>]]></content:encoded></item><item><title><![CDATA[AI Engineering Playbook 🔥]]></title><description><![CDATA[Download My Playbook for Free]]></description><link>https://newsletter.systemdesign.one/p/ai-engineering-roadmap-for-beginners</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/ai-engineering-roadmap-for-beginners</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Tue, 13 Oct 2026 16:24:46 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0a58b035-765c-4fb6-9e8e-93951f1d6aca_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Once upon a time, I spent hours solving competitive math problems.</p><p>But I used to forget important formulas &amp; theorems quickly&#8230; and because of this, it became difficult to apply them when solving new problems.</p><p>Until one day, I started making notes on key ideas &amp; revisiting them regularly. This helped me absorb what I learned and become better than my past self.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://newsletter.systemdesign.one/subscribe" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FpKu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FpKu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png" width="254" height="317.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1350,&quot;width&quot;:1080,&quot;resizeWidth&quot;:254,&quot;bytes&quot;:720001,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/220181721?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.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_!FpKu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!FpKu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4a6f4b2-a07a-4726-89cd-1861652f1423_1080x1350.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now I&#8217;ve created a playbook to help you learn AI engineering.</p><p>It gives you:</p><ul><li><p>Core concepts behind modern AI systems.</p></li><li><p>Condensed notes to understand the AI engineering stack.</p></li><li><p>Must-know techniques to build, deploy, debug &amp; scale AI apps.</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><strong><mark data-color="#ffff00" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Join this newsletter right now and download my playbook for FREE:</mark></strong></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 style="text-align: center;">(Wait a few minutes for the welcome email &amp; check all folders.)</p><p>PS - This newsletter exists because of your support. Thank you.</p>]]></content:encoded></item><item><title><![CDATA[How to Scale an “AI App” to 1 Million Users in Production]]></title><description><![CDATA[#189: Part 7 - Generative AI Masterclass]]></description><link>https://newsletter.systemdesign.one/p/llm-inference-cost-optimization</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/llm-inference-cost-optimization</guid><dc:creator><![CDATA[Louis-François Bouchard]]></dc:creator><pubDate>Mon, 12 Oct 2026 11:30:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a248d777-d0fd-4da0-bf04-c7573a9a721d_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://newsletter.systemdesign.one/subscribe?yearly=true" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RKN7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 424w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 848w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1272w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png" width="1280" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3689f342-2008-4ce6-b968-16461682508b_1280x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24224,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://newsletter.systemdesign.one/subscribe?yearly=true&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/192435842?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RKN7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 424w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 848w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1272w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Traditional software gets cheaper per user as it scales.</p><p>Yet AI software on an API does not!&#8230;</p><p>Every request runs a model, every model call has a per-token price, and the price stays &#8220;flat&#8221; whether ten people use it or a million do.</p><p>Self-hosting changes this, as GPU costs amortize across users.</p><p>But it introduces a new problem: <em>capacity planning, hardware management, and a minimum spend that has to be justified before the first user arrives.</em></p><p>So scaling an AI product forces cost decisions most software never encounters, and most engineering teams face them only after users have already arrived.</p><p>Building an AI system that produces correct, grounded, and safe responses is one challenge&#8230;Serving those responses reliably and affordably to a million users is another.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bZpH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bZpH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 424w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 848w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1272w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png" width="1456" height="690" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:690,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1014671,&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://newsletter.systemdesign.one/i/219568117?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.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_!bZpH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 424w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 848w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1272w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">At one million daily users, admission control protects capacity, cache hits bypass inference, misses route across serving tiers, and traced outcomes plus reviewed feedback drive eval-gated releases.</figcaption></figure></div><p>This newsletter shows you how to redesign a <a href="https://newsletter.systemdesign.one/p/ai-chat-assistant">chat assistant</a> for large-scale production, reduce inference costs &amp; build the infrastructure needed to handle millions of users.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><strong><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <strong><a href="https://link.svix.com/system-01">Svix</a></strong> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.youtube.com/@whatsai?sub_confirmation=1" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png" width="1100" height="220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.youtube.com/@whatsai?sub_confirmation=1&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I want to introduce <a href="https://louisbouchard.substack.com/">Louis-Fran&#231;ois Bouchard</a> as a guest author.</p><p>He&#8217;s a best-selling author (<a href="https://amzn.to/4bqYU9b">Building LLMs for Production</a>), the co-founder of <a href="https://academy.towardsai.net/?ref=1f9b29">Towards AI</a>, and the creator of the YouTube Channel, <a href="https://www.youtube.com/@whatsai?sub_confirmation=1">What&#8217;s AI</a>, where he helps people understand AI and learn how to apply it in the real world. Through his development work with clients, content, teaching, AI training programs, and the new Mentorship program at <a href="https://academy.towardsai.net/?ref=1f9b29">Towards AI Academy</a>, Louis focuses on making AI practical for builders, engineers, and curious learners alike.</p><p>At Towards AI, he and his team train AI engineers through courses and mentorship built for every stage, from beginner to advanced. That educational mission and the real-world experience building for his clients are exactly why I wanted him in this newsletter series.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em><strong>Here&#8217;s what&#8217;s inside this newsletter:</strong></em></p><ul><li><p><strong>Your $193,000 AI bill could drop to $48,000.</strong> Three optimizations cut the projected monthly cost by 75% at 100,000 daily conversations. Most teams overlook where the biggest savings actually come from.</p></li><li><p><strong>Your smartest AI model could be your biggest money leak.</strong> Up to 70% of requests in our example go to a cheaper model, while the expensive one handles the rest. The surprising part is what happens to the total bill.</p></li><li><p><strong>At 100K users, renting AI could beat owning GPUs.</strong> A $48,000 API bill competes with a $49,560 self-hosted setup. At 1 million daily conversations, the economics flip dramatically.</p></li><li><p><strong>One GPU benchmark could wipe out $182,000 in monthly savings.</strong> Self-hosting looks 38% cheaper at scale, until lower throughput forces you to rent dozens of additional GPUs.</p></li><li><p><strong>Your AI could pass every test and still break in production.</strong> The hidden gaps between evaluations, guardrails, and real user behavior, and why production failures need to become tests before the next release.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Should You Plan for a Million Users?</h2><p>For most AI products, planning for a million users too early wastes time &amp; money.</p><p>An API key and a credit card are often enough to launch a prototype. You should focus on building a useful product before investing in complex infrastructure.</p><p>But as your user base grows, these challenges become HARD to ignore:</p><ul><li><p><strong>Cost increases with usage.</strong> A chat assistant costs approximately $0.064 per conversation using GPT-5.4. </p><ul><li><p>At 100 daily users, the monthly model bill reaches roughly $193.</p></li><li><p>At 100,000 daily users, it grows to $193,000.</p></li><li><p>At one million, it reaches $1.93 million.</p></li></ul><p>Model routing &amp; caching reduce the cost per conversation, but total spending still grows with usage.</p></li><li><p><strong>Latency increases under heavy traffic.</strong> An AI system that responds in 400 milliseconds with ten concurrent users could take two seconds with a thousand. As incoming requests approach the system&#8217;s serving capacity, queues grow &amp; response times increase.</p></li><li><p><strong>Small prompt changes become expensive.</strong> Adding 200 tokens to your system prompt across one million daily requests produces six billion additional input tokens per month. At GPT-5.4&#8217;s input price of $2.50 per million tokens, that adds $15,000 to your monthly bill before prompt caching.</p></li><li><p><strong>API rate limits restrict scalability.</strong> AI providers enforce limits on requests &amp; tokens per minute. As traffic grows, these limits could prevent your application from serving more users, even when your infrastructure has spare capacity.</p></li><li><p><strong>Unit economics determine profitability.</strong> If each conversation costs more than the revenue it generates, acquiring more users increases your losses. You need to measure cost per conversation against the revenue it produces.</p></li></ul><p>These challenges determine when your AI application needs more advanced production infrastructure.</p><p>So before moving beyond a managed API, evaluate these four constraints:</p><ul><li><p><strong>Unit economics:</strong> Does the cost per successful conversation support your target profit margin?</p></li><li><p><strong>Service level objectives (SLOs):</strong> Does the system meet your latency, availability, and reliability targets?</p></li><li><p><strong>Rate limits:</strong> Does your provider support your expected request and token volume?</p></li><li><p><strong>Data residency:</strong> Does the provider meet your requirements for where user data gets processed &amp; stored?</p></li></ul><p>As long as your API provider meets these requirements, staying with managed infrastructure is often the &#8220;simplest&#8221; choice.</p><p>The rest of this newsletter shows you how to estimate costs, identify scalability bottlenecks, and decide when more advanced infrastructure becomes necessary.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/llm-inference-cost-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Target System Design</h2><p>Our goal is to scale an AI chat assistant to <em>one million daily users</em> while keeping inference costs under control.</p><p>For simplicity, we assume each daily active user starts one conversation. Each conversation contains eight requests to the language model.</p><p>Let&#8217;s define the token usage for each request:</p><ul><li><p><strong>Static input:</strong> 1,024 tokens for the system prompt and a fixed few-shot examples. This meets OpenAI&#8217;s minimum prefix length for prompt caching.</p></li><li><p><strong>Dynamic input:</strong> 400 tokens for conversation history &amp; current user message.</p></li><li><p><strong>Output:</strong> 300 billed tokens generated by the model.</p></li></ul><p>Each request therefore processes 1,424 input tokens &amp; generates 300 output tokens.</p><p>With eight requests per conversation, the total becomes:</p><ul><li><p><strong>Input:</strong> 11,392 tokens per conversation.</p></li><li><p><strong>Output:</strong> 2,400 tokens per conversation.</p></li></ul><p>(These are illustrative assumptions. In production, you should replace them with actual token usage collected from your application.)</p><h3>System Requirements</h3><p>Our production system must meet seven requirements:</p><ul><li><p><strong>Cost:</strong> Keep model costs below a budget of $0.02 per conversation. Determine your actual budget from revenue per successful conversation and required gross margin.</p></li><li><p><strong>Latency:</strong> Define service level objectives (<strong>SLOs</strong>) for each workload, including time to first token (<strong>TTFT</strong>) for interactive chat &amp; completion deadlines for asynchronous jobs.</p></li><li><p><strong>Availability:</strong> Maintain 99.9% uptime, including during model &amp; prompt updates.</p></li><li><p><strong>Safe deployments:</strong> Support model changes with a reliable rollback mechanism.</p></li><li><p><strong>Observability:</strong> Record token usage, cost, latency &amp; model information for each request.</p></li><li><p><strong>Feedback:</strong> Collect user feedback &amp; incorporate reviewed examples into evaluation datasets.</p></li><li><p><strong>Cost forecasting:</strong> Estimate the financial impact of every change before deployment.</p></li></ul><h3>Our Approach</h3><p>We&#8217;ll make five major design decisions:</p><ol><li><p><strong>Cost engineering:</strong> Reduce model costs by 50% to 80% through model routing, semantic caching, and prompt optimization.</p></li><li><p><strong>Inference optimization:</strong> Explore quantization, GPU utilization, and serving frameworks to determine when self-hosting makes financial and technical sense.</p></li><li><p><strong>Production infrastructure:</strong> Handle concurrent traffic, control overload, and deploy model updates without disrupting users.</p></li><li><p><strong>Data flywheels:</strong> Use production feedback to improve evaluation datasets &amp; model quality over time.</p></li><li><p><strong>Capacity and cost estimation:</strong> Calculate infrastructure requirements &amp; monthly costs at 10,000, 100,000, and one million daily users.</p></li></ol><p>We&#8217;ll start with cost engineering because the budget per request influences every infrastructure decision that follows&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Part 1: Cost Engineering</h2><p>Let&#8217;s dive in!</p><h3>Three Types of Token Costs</h3><p>Every request to a language model creates costs based on token usage.</p><p>For this example, we&#8217;ll focus on three types:</p><ul><li><p><strong>Uncached input tokens:</strong> Tokens you send to the model, including the system prompt, conversation history, and user message, without a cached-input discount.</p></li><li><p><strong>Cached input tokens:</strong> Previously processed input prefixes that the provider reuses at a discounted rate.</p></li><li><p><strong>Output tokens:</strong> Tokens the model generates, including any billable reasoning tokens.</p></li></ul><p>Output tokens typically cost more than input tokens because generating tokens one at a time (decode) has lower throughput than processing input tokens in parallel (prefill).</p><p>Some providers charge separately for extra features:</p><ul><li><p><strong>Cache writes:</strong> Anthropic charges approximately 1.25 to 2 times the standard input rate to create a cache entry, depending on its duration. Cache reads cost approximately 10% of the standard input rate.</p></li><li><p><strong>Tool usage:</strong> Certain tools or external services introduce extra charges.</p></li><li><p><strong>Priority processing:</strong> Higher-priority inference tiers could have different pricing.</p></li><li><p><strong>Data residency:</strong> Regional processing requirements could affect the final bill.</p></li></ul><p>So check your provider&#8217;s billing structure before estimating production costs.</p><p>For the two OpenAI models below, output tokens cost <em>six times </em>as much as uncached input tokens. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o0ez!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o0ez!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1263650,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/219568117?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!o0ez!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Standard short-context token prices for GPT-5.4 and GPT-5.4-mini as of 2026.</figcaption></figure></div><p>These prices are a historical snapshot&#8230; Model availability &amp; pricing change over time, so verify the latest rates before making deployment decisions.</p><p>Next, let&#8217;s use these token prices to calculate the monthly cost of serving thousands/millions of conversations.</p><h3>Estimation Funnel</h3><p>Estimate costs before building the system.</p><p>Start with requests per day, estimate input, output, and cached-input tokens per request, then apply their respective rates. Multiply the daily cost by the number of days to get the monthly bill.</p><p>The arithmetic is straightforward&#8230;The challenge is accounting for every cost.</p><p>Retries &amp; failed calls increase usage.</p><p>Agent loops multiply model calls per task. Embeddings and reranking add separate costs. Image and video processing introduce media-specific charges.</p><p>Semantic caching adds infrastructure costs, while provider-side prompt caching may introduce cache-write charges. Storage, network egress, observability, and idle GPU capacity when self-hosting also contribute to the total.</p><p>Even a complete cost estimate does not tell you whether the system produces useful answers. Track cost per successful task alongside total spending to measure <em>efficiency</em>.</p><h3>Cost per Successful Task</h3><p>Cost per successful task measures total spending divided by the number of tasks completed successfully.</p><p>Track it alongside quality and latency to understand the actual cost of delivering useful results. For example, suppose each conversation costs $0.064 on average. If 10% of conversations fail, the cost per successful conversation increases to approximately $0.071, assuming the average cost already includes failed attempts and retries.</p><p>The same principle applies to self-hosted models. Estimate the required token throughput, translate it into GPU capacity &amp; calculate infrastructure costs.</p><p>H100 GPU rentals may cost around $2 to $6 per GPU-hour, depending on the provider, region, and rental terms. Newer Blackwell-class accelerators may have higher hourly rental prices.</p><p>But GPU rental prices alone do not determine inference cost:</p><p>Utilization, batching efficiency, memory requirements &amp; model quality also affect the cost per successful task.</p><h3>Faster or Cheaper, and When You Get Both</h3><p>Latency &amp; cost typically involve tradeoffs.</p><p>More powerful GPUs and lower batching levels reduce response times but increase cost per request.</p><p>Some optimizations improve both.</p><p>Smaller models require fewer resources, while shorter prompts reduce input processing. Prompt caching, quantization, and efficient attention kernels also reduce latency and cost, depending on the workload.</p><p>Streaming lets users see the response as it&#8217;s generated.</p><p>This improves perceived responsiveness without necessarily reducing total computation. Measure time to first token (<strong>TTFT</strong>), total response time &amp; stream reliability separately.</p><p>Batching improves GPU utilization by processing multiple requests together.</p><p>Yet excessive batching can increase tail latency (p99). So interactive applications need different batching configurations from background workloads.</p><p>For tasks that do not require immediate responses, consider a provider&#8217;s Batch API. These asynchronous endpoints process requests within a specified window at a lower price.</p><p>OpenAI&#8217;s Batch API offers a 50% discount on supported workloads with a 24-hour completion window. Other providers have different pricing and processing limits.</p><h3>Reasoning-Token Line Item</h3><p>Some reasoning models generate internal reasoning tokens that users never see.</p><p>These tokens count toward output usage &amp; get billed at output token rates.</p><p>This increases costs when switching models. Different models use different default reasoning-effort settings. If you leave the setting unspecified, a model upgrade could generate more reasoning tokens and increase the bill, even when the visible response stays the same.</p><p>Set reasoning effort explicitly where supported.</p><p>Track reasoning-token usage and total output costs for each request. Increase reasoning effort only when evaluations show enough improvement in answer quality to justify the extra cost.</p><h3>The Anchor: 100K Conversations a Day</h3><p>Picture an AI assistant handling 100,000 conversations per day, with eight model requests per conversation.</p><p>Each request uses 1,424 input tokens and 300 billed output tokens.</p><p>Over 30 days, the system processes 34.176 billion input tokens and 7.2 billion output tokens.</p><p>At GPT-5.4 rates of $2.50 per million input tokens and $15 per million output tokens, the monthly cost is:</p><ul><li><p>Input: $85,440</p></li><li><p>Output: $108,000</p></li><li><p>Total: $193,440 or $0.064 per conversation.</p></li></ul><p>Suppose 70% of requests use GPT-5.4-mini, which costs $0.75 per million input tokens and $4.50 per million output tokens.</p><p>Assuming identical token usage across both models, routing reduces the monthly bill to approximately $98,635, a 49% reduction.</p><p>Plus, adding semantic caching, provider-side prompt caching, and shorter prompts could further reduce costs. Under a scenario with a 30% semantic-cache hit rate and additional prompt optimizations, the monthly bill could approach $48,000.</p><p>That represents approximately 75% savings compared with the original system.</p><p>Actual savings depend on traffic patterns, cache hit rates, token usage &amp; model quality. Validate these assumptions against production measurements before relying on the estimate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!35RP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!35RP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 424w, https://substackcdn.com/image/fetch/$s_!35RP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 848w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1272w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png" width="1456" height="707" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:707,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!35RP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 424w, https://substackcdn.com/image/fetch/$s_!35RP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 848w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1272w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">At 100K daily conversations, modeled workload produces 34.176B input and 7.2B billed output tokens per month. Routing, caching, and prompt trimming reduce the model-token estimate from $193,000 to $48,000, excluding retry overhead and adjacent infrastructure costs.</figcaption></figure></div><h3>Model Routing</h3><p>Model routing sends simpler requests to a cheaper model &amp; complex requests to a more capable model.</p><p>A lightweight classifier or a smaller language model could decide which model should handle each request.</p><p>At scale, this significantly reduces inference costs. For example, routing 70% of requests to a cheaper model could lower the monthly bill. But the actual split depends on your workload and should come from production traffic &amp; evaluation results.</p><p>The biggest risk is routing a complex request to a model that cannot handle it reliably. The smaller model may produce a confident but incorrect answer, reducing quality without an obvious failure.</p><p>To prevent this, evaluate the route system against the original system using a representative test dataset. Measure task success, factual accuracy, relevance, and other application-specific metrics.</p><p>The router should reduce costs while keeping quality within predefined acceptance thresholds. Track routing accuracy and cost per successful task to verify that the savings are worthwhile.</p><h3>Semantic Caching</h3><p>Model routing reduces costs by sending simpler requests to cheaper models.</p><p>Semantic caching goes further by reusing previously generated answers for similar questions, thus avoiding repeated model inference.</p><p>Semantic caching uses embeddings to find previously answered questions with similar meanings. If a cached answer passes the similarity and validity checks, the system returns it without calling the language model.</p><p>GPTCache is one open-source library for implementing this approach.</p><p>Cache effectiveness depends on traffic patterns. Frequently repeated questions, such as FAQs, produce higher hit rates, while unique or context-dependent queries benefit less.</p><p>Yet two failure modes require attention:</p><p><strong>1. False cache hit</strong></p><p>Two questions may have similar embeddings but require different answers.</p><p>Reusing an incorrect or outdated response silently reduces answer quality. Similarity thresholds, time-to-live (<strong>TTL</strong>) policies, and extra validation help reduce this risk.</p><p><strong>2. Cross-user data leakage</strong></p><p>Cache entries must be isolated by tenant &amp; authorization scope.</p><p>Cache validity should account for relevant prompt, model, and retrieval-index versions, along with data freshness requirements. Authorization checks must remain enforced even when a cached answer exists.</p><p>Personalized responses should only be cached within properly isolated scopes.</p><p>Requests that perform actions or modify data must execute the required operations rather than replay a cached response.</p><p>Finally, semantic caching has its own costs, including embedding generation, vector search, and cache storage. So measure cache hit rate, false-hit rate, latency, and net cost savings to determine whether it improves the system.</p><h3>Prompt Optimization</h3><p>The system prompt gets included in every model request.</p><p>So its length directly affects input-token usage and cost. In our example, the static prefix accounts for nearly three-quarters of each request&#8217;s input tokens.</p><p>Shortening instructions and removing unnecessary few-shot examples reduce token usage. But the actual savings depend on how much of the prompt already benefits from caching. Plus, removing important instructions reduces answer quality, so evaluate every change before deployment.</p><p>Prompt caching introduces another consideration:</p><p>Providers reuse previously processed input when requests share an identical token prefix. To maximize cache hits, place reusable instructions and examples first, followed by dynamic content such as user questions and retrieved documents.</p><p>For OpenAI&#8217;s automatic prompt caching, eligible prompts must contain at least 1,024 tokens. Shortening a reusable prefix below this threshold eliminates its caching benefit and potentially increases costs, even when the prompt becomes shorter.</p><p>In our cost example, we retain the 1,024-token static prefix and optimize the dynamic portion instead. This preserves the opportunity for prompt-cache savings while reducing unnecessary input tokens.</p><p>The goal is to minimize total input cost without sacrificing response quality.</p><p>Compare cached-token usage, total spending, and evaluation results before deciding which prompt version performs best.</p><h3>When Smaller Models Are Good Enough</h3><p>Smaller models significantly reduce inference costs, but only if they maintain acceptable answer quality.</p><p>Evaluate each candidate model against a representative test dataset that includes common requests, complex queries, and edge cases. Measure task success, factual accuracy, relevance, and other application-specific metrics.</p><p>If the smaller model meets predefined quality thresholds, it passes the quality gate. Before deployment, it must also satisfy latency, reliability, security &amp; rollback requirements.</p><p>Use evaluation results to decide when a smaller model is sufficient rather than relying on model size or benchmark rankings alone.</p><p>Model routing reduces average inference costs by selecting cheaper models, while semantic caching avoids repeated model calls.</p><p>The next step is optimizing the inference stack itself to reduce the computational cost of generating each token&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work or business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity, and Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Part 2: Inference Optimization and Self-Hosting</h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Claude Code on Autopilot: Schedule It Once and Walk Away]]></title><description><![CDATA[#188: Part 4 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Tue, 06 Oct 2026 14:08:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0470935b-085f-4f9d-9b1e-0b455c0164bc_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Every task you give Claude runs while you sit there &amp; watch it.</span></p><p><span>But some work does not need your presence at all&#8230; You can check your website for availability issues daily, watch a repo for changes, or let Claude send you a weekly report via Slack.</span></p><p><span>Anthropic created two different features for this:</span></p><ul><li><p><span>Claude Code calls them </span><strong><span>Routines</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>,</span></p></li><li><p><span>Cowork</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> calls them </span><strong><span>Scheduled Tasks</span></strong><span>.</span></p></li></ul><p><span>You could create them from scratch or simply by prompting Claude.</span></p><p><span>Some of these automations run on your laptop. To make sure they work, your </span>laptop<span> needs to stay awake. But you can also run your code in the cloud on Anthropic&#8217;s servers. This works even when your laptop is closed.</span></p><p><span>Let&#8217;s build two of them in this newsletter &amp; explore their limitations.</span></p><p><span>At the end, we&#8217;ll also look at guardrails, because we all know that conversations between us and AI can leak, and we should take steps to make them safer.</span></p><p><span>Let&#8217;s get started!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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;:1098056,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Oct 7 (FREE)</a></strong> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>What a schedule changes about an agent.</strong> Routines in Claude Code, Scheduled Tasks in Cowork, and why a job that runs without you is a different kind of worker than one you watch.</p></li><li><p><strong>Where your automation actually runs.</strong> Local routines that need your computer awake, cloud routines that keep running with the laptop closed, and the triggers (schedule, Git event, API) and delivery options (push, email, Slack) the cloud version adds.</p></li><li><p><strong>Headless mode, the engine underneath.</strong> <code>claude -p</code> runs Claude with no chat window at all, and every scheduled job is built on it.</p></li><li><p><strong>Two routines you can build, and how to reach them from anywhere.</strong> A morning site check and a GitHub watcher, each created from a single prompt, then dispatched from your phone with reports landing in Slack or a custom Telegram bot.</p></li><li><p><strong>How to trust a job you were asleep for.</strong> Guardrails on permissions, keys, and connectors, a validation harness where tests and hooks check the agent&#8217;s work, and reports worth reading.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What routines actually are</span></h2><p><span>Everything Claude does normally starts with you!</span></p><p><span>You type, it works, and when you leave the desk, the work stops&#8230;</span></p><p><span>A schedule </span><em><span>breaks</span></em><span> this link... The agent stops being an extension of your hands and becomes a worker in your absence, since the job now runs whether you are there/not. And that changes what you use it for, because the tasks worth scheduling are the ones you kept forgetting/postponing.</span></p><p><span>Routines let Claude work on a schedule you define.</span></p><p><span>They have two different modes:</span></p><ul><li><p><span>Local</span></p></li><li><p><span>Cloud</span></p></li></ul><p><span>(We&#8217;ll cover both in the next sections.)</span></p><p><span>Let&#8217;s first create a routine manually&#8230;</span></p><h3><span>Manual</span></h3><p><span>To create a routine, open your Claude app, click on &#8220;Routines&#8221; and &#8220;New routine&#8221;.</span></p><p><span>You will see two options:</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_!uVs2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uVs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 424w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 848w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1272w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png" width="1456" height="797" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:797,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uVs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 424w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 848w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1272w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><span>Local</span></h4><p><span>Click on </span><strong><span>Local</span></strong><span>.</span></p><p><span>You can choose the model, set permissions &amp; schedule when you want the routine to run.</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_!D5Hn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 424w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 848w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1272w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png" width="1456" height="1112" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1112,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 424w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 848w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1272w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><span>Cloud</span></h4><p><span>Now let&#8217;s check the cloud version.</span></p><p><span>This version lets you customize a lot more.</span></p><p><span>First, you can select a trigger: </span><strong><span>Schedule, Git Event, or API.</span></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZJy1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 424w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 848w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1272w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png" width="1456" height="1561" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1561,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 424w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 848w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1272w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Next, click </span><strong><span>Notifications</span></strong><span> to choose how the report is delivered to you.</span></p><p><span>The options are </span><strong><span>push notifications in the app, email, or Slack.</span></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bG0U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bG0U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 424w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 848w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1272w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png" width="1456" height="638" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2935fd72-1f15-44e1-b314-28768115633a_1506x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:638,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bG0U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 424w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 848w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1272w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>You can also enable &#8220;Auto-fix&#8221; for pull requests.</span></p><p><span>This way Claude watches CI and review comments and pushes fixes automatically.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hGV0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 424w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 848w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1272w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png" width="1456" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hGV0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 424w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 848w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1272w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div></figure></div><h3><span>Create Routine by prompting</span></h3><p><span>Let&#8217;s create one routine by </span><em><span>prompting</span></em><span>.</span></p><p><span>Here is a site I run&#8230; I change it often, so pages break sometimes, and I check them by hand.</span></p><p><span>Follow along with any site you run, since the prompt only needs a URL.</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_!blI-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!blI-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 424w, https://substackcdn.com/image/fetch/$s_!blI-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 848w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png" width="1456" height="739" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:739,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!blI-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 424w, https://substackcdn.com/image/fetch/$s_!blI-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 848w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Let&#8217;s hand this task off to Claude Code to save </span><em><span>time</span></em><span>.</span></p><p><span>Here is the prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;5834099d-ca31-4e20-bf48-526b3ba82569&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Create a routine that runs every morning at 8.
It opens my AI Labs and AI Academy pages in Chrome,
checks for broken links, layout problems, and console errors.

If everything is fine, report one line saying clean.
Otherwise, list only the real issues to Slack.</code></pre></div><p><span>After pasting this prompt, Claude asks for my approval.</span></p><p><span>The first approval is to list the scheduled tasks.</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_!mer0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mer0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 424w, https://substackcdn.com/image/fetch/$s_!mer0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 848w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1272w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png" width="1456" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mer0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 424w, https://substackcdn.com/image/fetch/$s_!mer0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 848w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1272w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Next, it asks a couple of questions&#8230;</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_!LDL7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LDL7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 424w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 848w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1272w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png" width="1456" height="730" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:730,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LDL7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 424w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 848w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1272w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>After my answers, it started working on it&#8230;</span></p><p><span>Then it asked the final question before creating this routine.</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_!uPgR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uPgR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 424w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 848w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1272w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uPgR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 424w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 848w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1272w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>I allowed &amp; it created the routine.</span></p><p><span>When I went back to the routine tab, I saw mine.</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_!RY5l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RY5l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 424w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 848w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1272w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png" width="1456" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RY5l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 424w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 848w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1272w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><span>Testing The Routine</span></h3><p><span>I clicked on the routine and &#8220;Run now&#8221;.</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_!5a0y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5a0y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 424w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 848w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png" width="1456" height="684" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:684,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5a0y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 424w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 848w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>And I saw this notification:</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_!Jgh4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 424w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 848w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1272w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 424w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 848w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1272w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>To see more details, you need to click on History. (I clicked it twice by mistake.)</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_!8fg-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8fg-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 424w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 848w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png" width="1456" height="810" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc2b1280-218e-4875-8339-e853b9652788_2048x1140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:810,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8fg-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 424w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 848w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>And Claude took control of my laptop &amp; started testing&#8230;</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_!hWXs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hWXs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 424w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 848w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1272w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png" width="1456" height="838" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:838,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hWXs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 424w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 848w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1272w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>When I check Claude app, I see Claude took screenshots &amp; analyzed the pages.</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_!4LFn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4LFn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 424w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 848w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png" width="1456" height="1440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1440,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4LFn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 424w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 848w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>A couple of minutes later, I got this Slack message:</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_!ypMs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ypMs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 424w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 848w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png" width="1456" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ypMs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 424w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 848w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>&#8220;Clean&#8221;, simple yet effective.</span></p><p><span>Here is a more detailed report:</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_!GwDr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GwDr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 424w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 848w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1272w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png" width="1456" height="1221" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1221,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GwDr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 424w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 848w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1272w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Routine vs scheduled</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[64 AI Concepts Every Software Engineer Should Know]]></title><description><![CDATA[#187: Part 1 - Generative AI, RAG, AI Agents, and 14 others.]]></description><link>https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 05 Oct 2026 13:44:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f0daa132-5989-4780-8c01-725680a43fde_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>You ask an AI assistant a question&#8230;</p><p>&#8230;it answers in <em>seconds</em>!</p><p>But what actually happened between your question &amp; the answer?</p><p>Behind that simple interaction sits a stack of models, tokens, context, retrieval, tools, evaluations, and infrastructure.</p><p>These 64 concepts<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> will help you understand how modern AI systems actually work, from the neural networks underneath them to agents &amp; applications built on top.</p><p>Curious to know how many were new to you:</p><ol><li><p>Large language models,</p></li><li><p>Generative AI,</p></li><li><p>Machine learning,</p></li><li><p>Deep learning,</p></li><li><p>Neural networks,</p></li><li><p>Retrieval augmented generation,</p></li><li><p>AI agents &amp; agentic workflows,</p></li><li><p>Prompt engineering,</p></li><li><p>Transformers and self-attention,</p></li><li><p>Embeddings,</p></li><li><p>Tool &amp; function calling,</p></li><li><p>Model evaluation and evaluation-driven development,</p></li><li><p>Context engineering,</p></li><li><p>Multimodal AI,</p></li><li><p>Fine tuning and instruction tuning,</p></li><li><p>Tokenization,</p></li><li><p>Reasoning &amp; chain-of-thought.</p></li></ol><p>( &#8230;and much more in Parts 2, 3 &amp; 4!)</p><p>For each, I&#8217;ll share:</p><ul><li><p>What it means and how it works,</p></li><li><p>A real-world analogy where useful,</p></li><li><p>A common mistake to avoid,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s dive in!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><strong><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <strong><a href="https://link.svix.com/system-01">Svix</a></strong> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>1. Large Language Models</strong></h2><blockquote><p>A large language model (<strong>LLM</strong>) is an AI model trained on vast amounts of text to learn language patterns.</p></blockquote><p>You type <em>&#8220;Why is the sky blue?&#8221;</em> into a chatbot &amp; hit Enter.</p><p>The model processes your question as small pieces of text called <strong>tokens</strong>. A token could be a word, part of a word, or punctuation. A typical text-generating LLM selects the next token based on your question and the text it has produced so far.</p><p>Then it repeats. Token by token, the answer appears&#8230;</p><p>During training, the model adjusted internal numerical values called <strong>weights</strong>. Those weights capture patterns useful for language tasks, from sentence structure to relationships between ideas.</p><p>Your prompt gives the model context for its response.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wtQ-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of autocomplete on your phone:</p><p>You type <em>&#8220;See you,&#8221;</em> and the keyboard suggests &#8220;<em>soon</em>.&#8221; An LLM takes this idea much further, using the available conversation to produce paragraphs, explanations, or code.</p><p>Predicting a plausible continuation still leaves room for a wrong answer.</p><h3><strong>Common mistake</strong></h3><p>Trusting an answer simply because it sounds <em>confident</em>.</p><p>Suppose you ask for code to resize an image. The model could suggest a function with a sensible name that the library doesn&#8217;t provide. Check the documentation &amp; run the code before you rely on it.</p><h3><strong>Why it matters</strong></h3><p>You don&#8217;t need a separate model for every language task.</p><p>Different instructions let the same LLM summarize a document, explain an error, or draft a reply.</p><p>That flexibility makes LLMs useful across many software products.</p><h2><strong>2. Generative AI</strong></h2><blockquote><p>Generative AI produces content such as text, images, audio &amp; video from patterns learned during training.</p></blockquote><p>Ask an image generator for <em>&#8220;a red bicycle outside a bakery.&#8221;</em></p><p>Your description guides the model toward a result. Some image models begin with random noise and refine it step by step into an image. A text model uses a different process, typically selecting tokens in sequence.</p><p>Both produce content from learned patterns.</p><p>Generative AI is the broader category&#8230; Text-generating LLMs are one example; image and audio generators are others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lCDy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lCDy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lCDy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a cook who has learned from hundreds of recipes:</p><p>You ask for a spicy vegetable dish. The cook draws on familiar ingredients and techniques to prepare something that fits your request.</p><p>You still taste the dish before you serve it.</p><h3><strong>Common mistake</strong></h3><p>Assuming the generated content is ready to use.</p><p>An image could contain unreadable labels. A summary could leave out a key decision. Review the result against your original request and check factual details against the source.</p><h3><strong>Why it matters</strong></h3><p>Generative AI helps you get from a blank page to a first draft.</p><p>A few notes become an email, a description becomes an illustration, or a specification becomes starter code.</p><p>The next step is to check whether the draft does the job.</p><h2><strong>3. Machine Learning</strong></h2><blockquote><p>Machine Learning (<strong>ML</strong>) is a branch of AI in which systems learn from data to perform tasks without explicit rules for every situation.</p></blockquote><p>Think about the spam folder in your inbox:</p><p>You could write a rule to block every email containing <em>&#8220;free money.&#8221;</em> But a spammer could change the wording; also, a legitimate email could contain the same phrase. A model learns from examples &amp; considers several clues together.</p><p>Those clues help it assess a new message.</p><p>For a spam filter, training examples typically include the correct label:<em> spam or legitimate</em>. The training algorithm adjusts the model to reduce classification errors.</p><p>This approach is called <strong>supervised learning</strong>.</p><p>Other approaches discover patterns in unlabeled data or learn through rewards after actions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9-tF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9-tF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9-tF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think about how you learn to choose ripe fruit:</p><p>Someone shows you a few good examples &amp; a few bad ones. Over time, you connect color, firmness, and smell with ripeness.</p><p>You use those clues on your next trip to the market.</p><h3><strong>Common mistake</strong></h3><p>Testing the model with the same examples it learned from.</p><p>That&#8217;s like giving a student the practice questions again and calling it a final exam. Reserve separate examples to check whether the model handles unfamiliar data.</p><h3><strong>Why it matters</strong></h3><p>ML helps when a task involves more patterns than you could reasonably capture in hand-written rules. It powers uses such as spam filters, fraud detection, and product recommendations.</p><p>The goal is useful predictions on new data.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>4. Deep Learning</strong></h2><blockquote><p>Deep learning (<strong>DL</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>) is a type of ML that uses multiple layers of a neural network to learn complex patterns.</p></blockquote><p>Show a model a photograph of a bicycle.</p><p>The model receives numbers representing the image&#8217;s pixels. Early layers often detect simple features, such as edges &amp; textures. Later layers combine these features into more complex shapes &amp; object parts.</p><p>Together, the layers help the model recognize the bicycle.</p><p>The word &#8220;deep&#8221; refers to these multiple layers. During training, the model adjusts them to improve its predictions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HfUv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HfUv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HfUv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a sketch as someone draws it:</p><p>First, you see a few lines and circles. Add a frame, handlebars, and pedals, and the shapes start to make sense together.</p><p>A deep network also combines simpler features into more complex patterns.</p><h3><strong>Common mistake</strong></h3><p>Assuming every problem needs deep learning.</p><p>For a small spreadsheet of house sizes and prices, a simpler model could do the job well. Test a basic approach first, then compare whether a deep network earns its extra cost and complexity.</p><h3><strong>Why it matters</strong></h3><p>Images, speech &amp; language contain patterns which are difficult to describe with fixed rules. Deep learning helps models learn useful features from these inputs.</p><p>It underpins tools such as speech recognition &amp; image classification.</p><h2><strong>5. Neural Networks</strong></h2><blockquote><p>A neural network<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> is a model made of connected mathematical units that transform inputs into an output.</p></blockquote><p>Let&#8217;s look inside the layers we just discussed:</p><p>Each unit receives numbers, combines them, and passes a result onward. Connections have adjustable values called weights, which control how much each input contributes. Layers also apply transformations, so the network learns more complex relationships.</p><p>The final layer produces the model&#8217;s output.</p><p>During training, an error measure tells the system how far its predictions are from the target. The training algorithm uses this feedback to adjust weights and other values across the network.</p><p>Tiny adjustments, repeated across many examples, change its predictions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3ju9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3ju9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3ju9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of the controls on a sound mixing desk:</p><p>One control increases the voice; another reduces the drums. Changing the controls changes the final sound.</p><p>Weights play a similar role in how a network combines its inputs.</p><h3><strong>Common mistake</strong></h3><p>Taking the word &#8220;neural&#8221; too literally.</p><p>The name draws inspiration from the brain, but these units perform mathematical operations. A network&#8217;s ability to recognize a face or produce a sentence doesn&#8217;t establish human-like thought.</p><h3><strong>Why it matters</strong></h3><p>Neural networks provide the structure behind deep learning.</p><p>Understanding weights also explains what training changes: numerical values a model uses to turn an input into a prediction.</p><h2><strong>6. Retrieval-Augmented Generation</strong></h2><blockquote><p>RAG is an approach that retrieves relevant information &amp; supplies it to a model to help generate an answer.</p></blockquote><p>Ask a company assistant, <em>&#8220;How long do I have to return this order?&#8221;</em></p><p>The application searches the company&#8217;s documents for the relevant return policy. It places matching passages alongside your question. The model uses those passages to write its response.</p><p>The answer has information from the company&#8217;s documents.</p><p>Updating those documents gives the application new material to retrieve. It doesn&#8217;t require a new training run for every policy change.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kftM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kftM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!kftM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kftM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!kftM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of an open-book exam:</p><p>You find the relevant pages before you answer. Your result depends on both finding the right material &amp; interpreting it correctly.</p><h3><strong>Common mistake</strong></h3><p>Assuming retrieval guarantees a correct answer.</p><p>The search could return an outdated policy and/or miss an exception. So check the retrieved passages &amp; final response. When the evidence is missing, the assistant should say so.</p><h3><strong>Why it matters</strong></h3><p>RAG helps assistants answer questions about private or frequently updated information. Also it gives readers source material to check against the answer.</p><h2><strong>7. AI Agents and Agentic Workflows</strong></h2><blockquote><p>An AI agent uses a model to choose actions toward a goal and respond to the results. Agentic workflows organize model and tool steps into a process.</p></blockquote><p>Ask an assistant to investigate a failed software test.</p><p>An agent would inspect the error, open a file, make an edit, and rerun the tests. The result helps it decide what to do next. A fixed workflow follows a prewritten sequence, such as &#8220;<em>summarize the ticket, classify it, then route it.</em>&#8221;</p><p>The difference is how much control the model has over the next step.</p><p>The term &#8220;agentic workflow&#8221; covers a range of designs. Some follow mostly fixed steps; others give the model more freedom to choose.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rMan!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rMan!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!rMan!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rMan!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!rMan!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Think of a technician with a checklist:</p><p>For a routine inspection, the checklist determines the order. For an unfamiliar fault, the technician chooses the next check based on what the previous one revealed.</p><h3><strong>Common mistake</strong></h3><p>Giving an agent tools without clear limits.</p><p>A failed action could trigger repeated retries/unwanted changes. So set permissions, spending limits, and stopping conditions. Plus, require approval before consequential actions, such as a payment/deletion.</p><h3><strong>Why it matters</strong></h3><p>Agents help with tasks whose steps depend on discoveries along the way.</p><p>Fixed workflows work when the sequence is known and predictable execution matters.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work or business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity, and Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>8. Prompt Engineering</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Vector Database Search Billions of Vectors in Milliseconds]]></title><description><![CDATA[#186: Understand HNSW Graphs, Approximate Nearest Neighbor Search, and Key Parameters Engineers Tune in Production]]></description><link>https://newsletter.systemdesign.one/p/hnsw-vector-search-explained</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/hnsw-vector-search-explained</guid><dc:creator><![CDATA[Avani Chaskar]]></dc:creator><pubDate>Sun, 04 Oct 2026 11:15:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4565e04a-0d72-47f2-840f-cf7f3ad78b61_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="callout-block" data-callout="true"><h3><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">Download the &#8220;Agentic AI&#8221; e-book for free</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hI46!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!hI46!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:543468,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217297135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!hI46!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!hI46!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a></strong> isn&#8217;t winning the AI race with the smartest model. It&#8217;s winning by owning everything that surrounds the model. Six layers. Sixty-plus services. <br><br>But how do you actually put all those pieces together?<br><br><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a> asked 15+ data and AI leaders from companies including PayPal, Siemens, Morgan Stanley, and Sanofi how they are approaching agentic AI in the enterprise. <br><br>The result is The Agentic Enterprise: a 16-chapter e-book covering practical topics such as:</p><ul><li><p>Building, monitoring, and governing reliable AI agents</p></li><li><p>Improving agent performance and scalability</p></li><li><p>Implementing guardrails throughout the AI lifecycle</p></li><li><p>Moving agentic systems toward production </p></li></ul><p>If you&#8217;re working on AI agents beyond the prototype stage, it&#8217;s worth a read.</p><p><strong><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el"><mark data-color="rgb(255, 255, 0)" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Download the e-book for free here &#187;</mark></a></strong></p><p><em>(Thanks to <a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a> for partnering on this newsletter.)</em></p></div><p><span>Imagine you&#8217;re building Shazam</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>.</span></p><p><span>A user hums a 10-second song clip&#8230;Your system has 100 million songs.</span></p><p><span>Your job is simple: </span><em><span>find the most similar songs in less than 50 milliseconds.</span></em></p><p><span>So how&#8217;d you do it?</span></p><p><span>Here&#8217;s the obvious solution: </span><em><span>compare the user&#8217;s song with each song in the database.</span></em></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;96a4fe8d-0ef5-4dc4-b423-922aa50901ff&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Query song
   &#8595;
Song 1
Song 2
Song 3
...
Song 100,000,000</code></pre></div><p><span>Yet this does NOT work at </span><em><span>scale</span></em><span>.</span></p><p><span>Even if each comparison is fast, 100 million comparisons are &#8220;expensive&#8221;.</span></p><p><span>When you search documents in a Retrieval-Augmented Generation (</span><strong><span>RAG</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>) system, find similar images, or generate recommendations, the system is doing the same thing:</span></p><blockquote><p><span>Find the most similar items in a massive collection.</span></p></blockquote><p><span>This is where Hierarchical Navigable Small World (</span><strong><span>HNSW</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>) comes in&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>I want to introduce </span><a href="https://www.linkedin.com/in/avani-chaskar/"><span>Avani</span></a><strong><a href="https://www.linkedin.com/in/avani-chaskar/"><span> </span></a></strong><a href="https://www.linkedin.com/in/avani-chaskar/"><span>Chaskar</span></a><strong><span> </span></strong><span>as the guest author.</span></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="http://avanichaskar.substack.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dWym!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 424w, https://substackcdn.com/image/fetch/$s_!dWym!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 848w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1272w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png" width="1456" height="291" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:291,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;http://avanichaskar.substack.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dWym!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 424w, https://substackcdn.com/image/fetch/$s_!dWym!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 848w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1272w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><span>She writes technical guides on building, evaluating &amp; scaling deterministic AI systems.</span></p><p><span>Subscribe to her </span><strong><a href="http://avanichaskar.substack.com/welcome"><span>newsletter</span></a></strong><span> to join developers receiving her latest engineering breakdowns.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>The Idea: Search Only What Matters</h2><p><span>The idea behind HNSW is simple:</span></p><blockquote><p><span>Instead of comparing against every item, build shortcuts that lead you close to the answer.</span></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_!z3qI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z3qI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg&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;:487117,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217040199?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!z3qI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Think about finding a coffee shop in a city you do not know.</p><p><span>You would not walk down every street&#8230;Instead, you&#8217;d:</span></p><ol><li><p><span>Use highways to reach the right area.</span></p></li><li><p><span>Take the main road to get closer.</span></p></li><li><p><span>Then use local streets to find the exact place.</span></p></li></ol><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>First Attempt: Build a Graph</h2><p><span>Let&#8217;s go back to our 100 million songs.</span></p><p><span>Suppose each song is connected to </span><em><span>similar</span></em><span> songs:</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_!EAqj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EAqj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png" width="502" height="334.7815934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:502,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EAqj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>If Song B is similar to Song E, we connect them&#8230;</span></p><p><span>So instead of checking every song, we can jump from one song to another.</span></p><p><span>Start somewhere:</span></p><ul><li><p><span>Move to a neighbor that is closer to the query,</span></p></li><li><p><span>Then repeat.</span></p></li></ul><p><span>This is much faster!..</span></p><p><span>But there is still a problem: </span><em><span>a graph with 100 million nodes still requires &#8220;many&#8221; hops.</span></em></p><p><span>i.e., we need a faster way to move&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>But What Does &#8220;Similar&#8221; Actually Mean?</strong></h2><p><span>Before HNSW navigates the graph, it needs a way to measure how close two vectors</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> are.</span></p><p><span>Here are the most common distance or similarity metrics:</span></p><ul><li><p><strong><span>Cosine similarity:</span></strong><span> Measures the angle between vectors. A smaller angle means higher similarity. It ignores vector length, making it ideal for </span><em><span>text </span></em><span>and</span><em><span> NLP</span></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>.</span></p></li><li><p><strong><span>Dot product/inner product:</span></strong><span> Multiplies &amp; sums elements. A larger positive value means higher similarity (it grows with both alignment and length). It&#8217;s commonly used in </span><em><span>recommendation systems</span></em><span>.</span></p></li><li><p><strong><span>Euclidean distance (L2):</span></strong><span> Measures straight-line distance. A smaller distance means higher similarity. It captures absolute size differences, making it great for </span><em><span>images</span></em><span>.</span></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XQG5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XQG5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png" width="1200" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XQG5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>So the right similarity metric depends on the embedding model</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> &amp; use case.</span></p><p><span>For HNSW, the important idea is simple:</span></p><blockquote><p>The closer a vector is to the query according to the chosen metric, the better the match.</p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>Exact Search vs Approximate Search</strong></h2><p><span>There are two ways to find the nearest vectors:</span></p><ul><li><p><strong><span>Exact search</span></strong><span>: Compares the query against every vector &amp; returns the mathematically closest results. That gives us the true nearest neighbors, but at 100 million or a billion vectors, checking everything is &#8220;expensive&#8221;.</span></p></li><li><p><strong><span>Approximate Nearest Neighbor (ANN):</span></strong><span> Instead of examining the entire dataset, it explores the most promising clusters of the index and returns results that are </span><em><span>very likely</span></em><span> to be the true nearest neighbors.</span></p></li></ul><blockquote><p><span>HNSW is an ANN algorithm.</span></p></blockquote><p><span>Yet this creates an important tradeoff:</span></p><ul><li><p>Explore more &#8594; higher recall<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>, higher latency.</p></li><li><p>Explore less &#8594; lower latency, potentially lower recall.</p></li></ul><p><span>To measure search effectiveness, we use </span><strong><span>Recall@k</span></strong><span>.</span></p><p><span>It measures how many of the true top-k nearest neighbors an approximate search actually retrieves.</span></p><blockquote><p>HNSW<em><span> </span></em><span>gives us a way to search a tiny fraction of the dataset while still achieving high recall.</span></p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>The Real Trick: Add Layers</span></strong></h2><p><span>This is the key idea behind HNSW:</span></p><blockquote><p>HNSW builds many layers of graphs<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>.</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_!BEy5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BEy5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg" width="1456" height="973" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:973,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1069804,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217040199?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BEy5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>The bottom layer contains every song.</span></p><p><span>Higher layers contain </span><em><span>fewer</span></em><span> songs. The higher you go, the fewer nodes exist. These upper layers create long-distance shortcuts.</span></p><p><span>This makes HNSW fast!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>How HNSW Search Works</span></strong></h2><p>Here&#8217;s how:</p><ul><li><p><span>A user hums a song: the system converts it into a vector.</span></p><ul><li><p><span>A vector is simply a list of numbers: </span><code>[0.12, 0.87, 0.34, 0.91, ...]</code><span>.</span></p></li><li><p><span>Songs with similar vectors sound similar.</span></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wav8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wav8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 424w, https://substackcdn.com/image/fetch/$s_!wav8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 848w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1272w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png" width="1408" height="1117" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/beb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1117,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wav8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 424w, https://substackcdn.com/image/fetch/$s_!wav8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 848w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1272w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li></ul><ol start="2"><li><p><span>Now the search begins&#8230;</span></p><ul><li><p><strong><span>Step 1 (Top Layer):</span></strong><span> Performs a high-level traversal on a sparse graph (</span><code>A &#8594; C &#8594; D</code><span>) to locate the general neighborhood rapidly.</span></p></li><li><p><strong><span>Step 2 (Middle Layers):</span></strong><span> Drops down through denser layers (</span><code>D &#8594; F &#8594; G</code><span>), narrowing the distance to refine the search space.</span></p></li><li><p><strong><span>Step 3 (Bottom Layer):</span></strong><span> Executes a targeted, local search among millions of nodes- exploring only a tiny fraction of the dataset to return Approximate Nearest Neighbors.</span></p></li></ul></li></ol><div class="callout-block" data-callout="true"><h4><strong>Key Insight</strong></h4><p>HNSW does not make 100 million comparisons faster.</p><p>It avoids making 100 million comparisons in the first place.</p><p>That is the entire trick.</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why the &#8220;Small World&#8221; Matters</span></strong></h2><p><span>Think about social networks:</span></p><p><em><span>You know someone. That person knows someone else. After a few connections, you could reach almost anybody.</span></em></p><p><span>Graphs with this property are called </span><strong><span>small-world graphs</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span>.</span></p><p><span>HNSW uses this idea:</span></p><p><em><span>Most connections are local&#8230;some connections jump far.</span></em></p><p><span>Together, they create short paths through huge datasets.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why &#8220;Hierarchical&#8221;?</span></strong></h2><p><span>Because there are layers&#8230;</span></p><p><span>Each higher layer contains exponentially fewer nodes.</span></p><p><span>Think of it like this:</span></p><ul><li><p><span>Layer 3: Highways</span></p></li><li><p><span>Layer 2: Major roads</span></p></li><li><p><span>Layer 1: Streets</span></p></li><li><p><span>Layer 0: Every location</span></p></li></ul><p><span>Search starts &#8220;</span><em><span>fast&#8221;</span></em><span>&#8230;then becomes &#8220;</span><em><span>precise</span></em><span>&#8221;.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>How Layers Get Built?</strong></h2><p><span>When inserting a new vector into an HNSW index:</span></p><ul><li><p><span>The algorithm assigns the vector a maximum height layer based on a decaying probability distribution</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p></li><li><p><span>Most vectors reside exclusively on Layer 0.</span></p></li><li><p><span>A small fraction are promoted to middle layers, and only a tiny minority reach the sparse top layer.</span></p></li></ul><p><span>This is similar to a data structure called a </span><strong><span>skip list</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span>.</span></p><p><span>Skip lists let you jump over many elements.</span></p><p><span>HNSW applies the same idea to vectors.</span></p><blockquote><p>Randomness creates shortcuts &#8594; Those shortcuts make navigation efficient.</p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>How HNSW Builds the Graph</strong></h2><p><span>When a new vector gets inserted, HNSW searches the existing graph to find </span><em><span>promising</span></em><span> neighbors.</span></p><p><span>It does NOT simply connect the new vector to the closest M vectors it happens to find. Instead, a neighbor-selection heuristic tries to keep connections useful and diverse, avoiding too many redundant links.</span></p><p><span>The process looks roughly like this:</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_!UHlE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHlE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png" width="420" height="406.1189801699717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1059,&quot;resizeWidth&quot;:420,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UHlE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>This is where efConstruction</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span> matters:</span></p><ul><li><p><span>A higher efConstruction means the algorithm considers a larger candidate set while building the graph. That usually produces a better-connected graph, but indexing takes longer.</span></p></li><li><p><span>A lower value makes construction faster, but the resulting graph may provide fewer useful paths during search.</span></p></li></ul><p><span>Good graph construction matters because graph quality directly affects both search speed &amp; recall.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Share this letter &amp; I&#8217;ll send you some rewards for the referrals.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>Three Knobs Engineers Tune</strong></h2><p><span>In production systems, these three parameters matter most:</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_!kmfE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kmfE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 424w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 848w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1272w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png" width="1456" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kmfE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 424w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 848w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1272w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><strong><span>1. M</span></strong></h4><p><span>M controls how many connections each node has.</span></p><p><span>More connections mean:</span></p><ul><li><p><span>Better search quality</span></p></li><li><p><span>More memory usage</span></p></li></ul><p><em><span>Think of it as building more roads:</span></em></p><ul><li><p><span>More roads improve navigation.</span></p></li><li><p><span>But roads are expensive.</span></p></li></ul><h4><strong><span>2. efConstruction</span></strong></h4><p><span>This controls how carefully the graph gets built.</span></p><p><span>Higher values mean:</span></p><ul><li><p><span>Better graph quality</span></p></li><li><p><span>Slower indexing</span></p></li></ul><p><span>Lower values mean:</span></p><ul><li><p><span>Faster indexing</span></p></li><li><p><span>Slightly lower search quality</span></p></li></ul><p><span>This matters if you insert data </span><em><span>frequently</span></em><span>.</span></p><h4><strong><span>3. efSearch</span></strong></h4><p><span>This determines how many candidate nodes the system explores during the search.</span></p><p><span>Higher values mean:</span></p><ul><li><p><span>Better recall</span></p></li><li><p><span>Higher latency</span></p></li></ul><p><span>Lower values mean:</span></p><ul><li><p><span>Faster queries</span></p></li><li><p><span>Lower recall</span></p></li></ul><p><span>For example:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6ff819ad-310a-4625-910c-1da95b578c89&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">efSearch = 50
&gt;Recall = 92%
&gt;Latency = 8 ms


efSearch = 200
&gt;Recall = 98%
&gt;Latency = 20 ms</code></pre></div><p><span>The exact values depend on the dataset...this is an engineering </span><em><span>tradeoff</span></em><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why HNSW Uses So Much Memory</span></strong></h2><p><span>HNSW stores:</span></p><ul><li><p><span>Vectors,</span></p></li><li><p><span>Graph connections,</span></p></li><li><p><span>Metadata.</span></p></li></ul><p><span>The graph itself could become large&#8230;for millions/billions of vectors, memory usage grows quickly&#8230;</span></p><p><span>So many systems combine HNSW with compression techniques such as:</span></p><ul><li><p><strong><span>Scalar Quantization (SQ8):</span></strong><span> Compresses float32 vectors down to int8, reducing RAM footprint by ~75% with minimal recall impact.</span></p></li><li><p><strong><span>Product Quantization</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><strong><span> (PQ):</span></strong><span> Segments vectors into sub-vectors and quantizes them into cluster centroids, unlocking extreme memory savings for billion-scale indexes.</span></p></li></ul><div class="callout-block" data-callout="true"><h4><strong>Key Insight</strong></h4><p>Compression reduces memory usage.</p><p>So you lose a little precision.</p><p>But you save a ton of space.</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>When to Use HNSW</span></strong></h2><p><span>HNSW is a good choice when:</span></p><ul><li><p><strong><span>Search speed matters</span></strong><span>: get results in milliseconds at large scale.</span></p></li><li><p><strong><span>High recall matters</span></strong><span>: for the search to capture most of the truly similar results.</span></p></li><li><p><strong><span>The dataset fits in memory</span></strong><span>: larger datasets demand more RAM, since HNSW keeps its graph in memory</span></p></li><li><p><strong><span>Data updates are moderate</span></strong><span>: HNSW works best when vectors get added occasionally, and not constantly.</span></p></li></ul><p><span>Best use cases:</span></p><ul><li><p><span>RAG systems,</span></p></li><li><p><span>Image search,</span></p></li><li><p><span>Audio matching,</span></p></li><li><p><span>Semantic search,</span></p></li><li><p>Recommendations.</p></li></ul><p><span>But HNSW is NOT ideal when:</span></p><ul><li><p><strong><span>Memory is very limited</span></strong><span>: Graph connections add significant RAM overhead.</span></p></li><li><p><strong><span>Data changes constantly</span></strong><span>: Frequent updates make the graph expensive to maintain.</span></p></li><li><p><strong><span>Exact nearest neighbors are required</span></strong><span>: HNSW is approximate, so it occasionally misses the mathematically closest match.</span></p></li></ul><blockquote><p><span>No algorithm is free &#8594; HNSW trades memory for speed &amp; search quality.</span></p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>The HNSW Mental Model</span></strong></h2><p><span>HNSW is built around one simple idea:</span></p><blockquote><p><span>Don&#8217;t make the search </span><em><span>faster</span></em><span>&#8230;Make the search </span><em><span>smaller</span></em><span>.</span></p></blockquote><p><span>Instead of looking at every vector, build a structure that tells you where to look.</span></p><p><span>The idea is simple&#8230;The scale it unlocks is not.</span></p><p><span>Millions of vectors. Billions of vectors. Milliseconds.</span></p><p><span>That&#8217;s the power of HNSW.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I&#8217;d like to thank <strong><a href="https://www.linkedin.com/in/avani-chaskar/">Avani Chaskar</a> </strong>for writing this newsletter.</p><p>She writes technical guides on building, evaluating &amp; scaling deterministic AI systems.</p><p>Subscribe to her <a href="http://avanichaskar.substack.com/welcome">newsletter</a> for more such quick reads on AI Engineering topics.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p style="text-align: center;"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If you&#8217;re serious about AI engineering, you really can&#8217;t miss out on the footnotes:</span></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Get Instant Access Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Get Instant Access Now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 17 October. Consider sharing this letter with your friends &amp; get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>
      <p>
          <a href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[API design was HARD until I learned these 33 concepts]]></title><description><![CDATA[#185: Part 2 - JWT, WebSockets, OpenAPI, and 13 others.]]></description><link>https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sat, 03 Oct 2026 12:03:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b7316f51-56b4-493c-8eee-3cc309440dfb_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>No time for small talk today:</p><p>The following is the second of a premium 2-part newsletter... if you&#8217;re serious about API design in 2026, then this newsletter is for YOU.</p><p>On with part 2 of the newsletter:</p><p>===</p><p>Some of these API design concepts are <em>foundational</em>, and some are <em>advanced</em>. ALL of them are super useful to software engineers building scalable APIs.</p><p>Curious to know how many were new to you:</p><ol start="18"><li><p>JSON Web Token,</p></li><li><p>Throttling,</p></li><li><p>Endpoint,</p></li><li><p>Request-Response,</p></li><li><p>Headers,</p></li><li><p>OpenAPI,</p></li><li><p>Timeouts,</p></li><li><p>Microservices,</p></li><li><p>WebSockets,</p></li><li><p>CORS,</p></li><li><p>HTTPS and TLS,</p></li><li><p>Filtering &amp; Sorting,</p></li><li><p>Retries with Backoff,</p></li><li><p>Load Balancing,</p></li><li><p>Circuit Breaker,</p></li><li><p>Error Handling.</p></li></ol><p>For each, I&#8217;ll share:</p><ul><li><p>What it is &amp; how it works (in plain English),</p></li><li><p>A real-world analogy (if I found one),</p></li><li><p>Tradeoffs,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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;:1098056,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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_!Nfs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Oct 7 (FREE)</a> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>18. JSON Web Token</strong></h2><blockquote><p>JSON Web Token (<strong>JWT</strong>) is a signed token that contains claims about the caller.</p></blockquote><p>Three parts, separated by dots.</p><ul><li><p><strong>Header</strong> names the algorithm.</p></li><li><p><strong>Payload</strong> holds the claims: <em>this is user 42, they expire at noon, and have the admin role.</em></p></li><li><p><strong>Signature</strong> proves nobody altered the first two parts. The server verifies signature with a key it already holds, reads the claims, and answers the request without touching a session store.</p></li></ul><p>The token carries its own proof, so verification costs no database call.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FU66!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FU66!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FU66!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!FU66!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FU66!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A festival wristband.</p><p>It says which zones you may enter and which day it dies. Security reads it in a glance without radioing the ticket office. If you tamper with it, the seal breaks, so the guard knows.</p><h3><strong>Tradeoff</strong></h3><p>You cannot easily revoke a token.</p><p>Fire an employee at nine, and their token still opens doors until it expires. The payload is signed, not encrypted, so anyone holding the token can read every claim inside it.</p><p>So keep expiry short, keep secrets out of payload, and use a refresh token to renew.</p><h3><strong>Why it matters</strong></h3><p>Stateless authentication across microservices, and the access token most OAuth providers hand back.</p><p>Its structure is fixed by a public specification, which is why every language has a library for it. Pair it with Authentication, which is the job it exists to do.</p><h2><strong>19. Throttling</strong></h2><blockquote><p>Throttling slows down a caller instead of turning them away.</p></blockquote><p>Rate limiting &amp; throttling get used interchangeably, and they do different things.</p><p>A rate limiter counts requests and rejects the ones over the cap with a <code>429</code>. A throttle accepts the request and delays it. It queues the call, releases it when capacity frees up, or answers with a <code>Retry-After</code> that asks the client to come back shortly. The work still happens, just later and more slowly.</p><p>Rejection protects the server&#8230;Throttling protects the server &amp; keeps the caller alive.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SZyD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SZyD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!SZyD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A metered on-ramp to a motorway.</p><p>The light drips cars onto the carriageway one at a time. Nobody is sent home. The queue on the ramp is annoying, and it's why the motorway itself keeps moving at seventy.</p><h3><strong>Tradeoff</strong></h3><p>A queued request holds a connection, and enough of them exhaust the very resource you were protecting.</p><p>Plus, delay hides the problem, so a service that has been struggling for an hour looks merely sluggish. So cap the queue &amp; alert on the delay rather than the errors.</p><h3><strong>Why it matters</strong></h3><p>Expensive operations, shared infrastructure, and any burst you would rather absorb than reject.</p><p>Envoy, Kong, and most message queues implement it. Pair it with rate limiting, and be explicit in your documentation about which one you are doing.</p><h2><strong>20. Endpoint</strong></h2><blockquote><p>An endpoint is a uniform resource locator (<strong>URL</strong>) that points to one resource on your server.</p></blockquote><p>It&#8217;s the address you aim a request at.</p><ul><li><p><code>/users</code> is the collection.</p></li><li><p><code>/users/42</code> is one user.</p></li><li><p><code>/users/42/orders</code> is that user&#8217;s orders.</p></li></ul><p>The path names the resource &amp; the method names the action; together, they define one operation. Get the path wrong, and you receive a <code>404</code> rather than the data you meant to ask for.</p><p>Read a good endpoint aloud, and it explains itself.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tdcm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A street address.</p><p>The number and the road identify one door out of a million. Post a letter to the wrong number, and it arrives somewhere real, which is worse than it not arriving at all.</p><h3><strong>Tradeoff</strong></h3><p>Endpoint names drift as the API grows.</p><p>One person writes <code>/users</code>, the next writes <code>/getUser</code>, and six months later your API reads like it was designed by a committee that never met.</p><p>Use plural nouns for collections and let the verb live in the method.</p><h3><strong>Why it matters</strong></h3><p>The first thing anybody learns about your API, and the thing they will curse if you got it wrong.</p><p>Every REST framework routes on them. Pair it with OpenAPI, which turns your endpoint list into documentation nobody has to maintain by hand.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2><strong>21. Request-Response</strong></h2><blockquote><p>The request-response cycle is the basic way clients &amp; servers communicate. The client sends a request, and server returns a response.</p></blockquote><p>Every call follows the same simple script.</p><p>A request names what you want and where: <em>a method, a path, a few headers, a body when there is one to send</em>. The server reads it, does the work, and answers with a status code and usually a body of its own. The exchange is synchronous, so the client holds the line open and waits for that single reply before it does anything else.</p><p>Send, wait, read the reply. That is the entire cycle.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oo9k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oo9k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!oo9k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Posting a letter and waiting by the mailbox.</p><p>You write the address on the envelope, the details inside, and a return address on the back. Then you stand there. Nothing else happens until the reply lands.</p><h3><strong>Tradeoff</strong></h3><p>The client blocks and a slow server holds that connection, and work that takes two minutes leaves a user staring at a spinner. Nothing comes back until everything comes back.</p><p>Accept the request, return a <code>202</code>, and finish the work in the background.</p><h3><strong>Why it matters</strong></h3><p>The foundation under REST, GraphQL, and almost every API you will build.</p><p>Its rules are set by the HTTP specification. Pair it with Webhooks and WebSockets, the two answers for when waiting is the wrong shape.</p><div class="callout-block" data-callout="true"><p><strong>Want life to feel a little easier?</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://benmeer.com/yearofsystems/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ql7g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg" width="1200" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:627,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:25651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:&quot;https://benmeer.com/yearofsystems/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ql7g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Ben Meer&#8217;s new book, <em>How to Be Good at Life</em>, is packed with practical systems for work, health, money, relationships, home, and more.</p><p><strong><a href="https://benmeer.com/yearofsystems/">Get the book &#8594;</a></strong></p></div><h2><strong>22. Headers</strong></h2><blockquote><p>Headers are key-value pairs that carry information about a request/response, separate from the body.</p></blockquote><p>They describe the message rather than contain it.</p><ul><li><p><code>Content-Type</code> says what format the body is in.</p></li><li><p><code>Authorization</code> carries the credential.</p></li><li><p><code>Cache-Control</code> tells every cache along the path how long to keep a copy.</p></li><li><p><code>Accept</code> states what the client can understand.</p></li><li><p><code>User-Agent</code> names the software that called.</p></li></ul><p>Servers, proxies, and browsers all read them before touching the body.</p><p>Metadata belongs on the outside.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sm2Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>The outside of an envelope.</p><p>Stamps, postcodes, fragile stickers, return address. Every courier along the route reads the outside and acts on it. None of them open the letter.</p><h3><strong>Tradeoff</strong></h3><p>Headers are easy to forget, which is why so many bugs end in a <code>Content-Type</code> nobody set.</p><p>Sizes are capped, casing rules surprise people, and a header stripped by a proxy fails silently rather than loudly. So log the headers you rely on, and set <code>Content-Type</code> explicitly every time.</p><h3><strong>Why it matters</strong></h3><p>Authentication, caching, versioning, compression, and cross-origin rules all ride on them.</p><p>Any browser&#8217;s network tab shows you every one. Pair it with Caching, which does nothing at all unless the headers say so.</p><h2><strong>23. OpenAPI</strong></h2><blockquote><p>OpenAPI is a standard file that describes every endpoint, parameter, and response of your API in one place.</p></blockquote><p>You write it in YAML/JSON, and machines read it.</p><p>From that one file, you generate interactive documentation, client libraries in eight languages, a mock server for the front end to build against, and a test suite that catches the day your response shape quietly changed. The specification becomes the contract, and the contract becomes the source of truth.</p><p>Write it once &amp; stop maintaining documentation by hand.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JtQh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JtQh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JtQh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>An architect&#8217;s blueprint.</p><p>The plumber, electrician, and joiner all work from the same drawing without ever meeting. Change the drawing, and everyone sees the change. Change the wall without changing the drawing, and somebody drills through a pipe.</p><h3><strong>Tradeoff</strong></h3><p>A hand-written spec drifts from the code within weeks, and a spec that lies is worse than no spec at all. The file grows long, and reviewing a two-thousand-line YAML diff is nobody&#8217;s favorite afternoon.</p><p>Generate the spec from your code, or test your code against the spec.</p><h3><strong>Why it matters</strong></h3><p>Public APIs, partner integrations, and any backend whose consumers sit in a different room.</p><p>Swagger UI, Redoc, and Stoplight render it. Pair it with API Versioning, since each version deserves its own contract.</p><h2><strong>24. Timeouts</strong></h2><blockquote><p>A timeout is the longest a caller will wait for a response before giving up.</p></blockquote><p>Without one, a caller waits forever.</p><p>Set a connect timeout for reaching the server and a read timeout for hearing back. When a downstream service hangs, your request fails in two seconds instead of hanging alongside it. This matters because every waiting request holds a thread, a connection, and a slot in your pool. Enough of them &amp; your healthy service falls over next to the sick one.</p><p>A fast failure beats a slow hang.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r84S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r84S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r84S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!r84S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r84S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>Hanging up after thirty seconds of ringing.</p><p>Nobody is home. Listening to the ringtone for an hour won't make them answer, and it stops you from calling anybody else.</p><h3><strong>Tradeoff</strong></h3><p>Set one too tight, and you kill healthy requests that were simply slow; then you retry them, and you have doubled the load on a service that was only having a bad minute.</p><p>Measure your ninety-ninth percentile, then set the timeout above it.</p><h3><strong>Why it matters</strong></h3><p>Every network call you make is the first line of defense against a cascading failure.</p><p>Every HTTP client has a default, and the default is usually wrong. Pair it with Circuit Breaker, which you reach for when timeouts stop being occasional.</p><h2><strong>25. Microservices</strong></h2><blockquote><p>Microservices split one application into small, independent services that talk to each other over APIs.</p></blockquote><p>Each service owns one job and its own data.</p><p>The <code>orders</code> service owns the orders table. The <code>payments</code> service owns payments. Neither reaches into the other&#8217;s database. They call each other&#8217;s APIs, deploy on their own schedule, and scale independently, so a search feature under load gets more servers without anybody touching checkout.</p><p>Independence is the whole point, and the network is the whole cost.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6OM1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6OM1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6OM1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Analogy</strong></h3><p>A food court instead of one enormous kitchen.</p><p>Each unit runs its own stoves, staff, and menu. The pizza place closes for a refit, and everyone else keeps serving. Ordering a meal from three units means three queues.</p><h3><strong>Tradeoff</strong></h3><p>Every function call you used to make in memory is now a network call that can time out, arrive twice, or never arrive.</p><p>A bug spans four services and six log files. Keeping data consistent across services is a hard problem with no free answer. So start with a monolith, and split it when the pain is real, not theoretical.</p><h3><strong>Why it matters</strong></h3><p>Large systems, large organizations, and any codebase where two changes cannot ship without waiting for each other.</p><p>The patterns that make it survivable deserve an article of their own. Pair it with API Gateway and gRPC, which keep the pieces reachable and fast.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>26. WebSockets</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[I struggled with "API design" until I learned these 33 concepts]]></title><description><![CDATA[#184: Part 1 - REST, GraphQL, Authentication, and 14 others.]]></description><link>https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Fri, 02 Oct 2026 11:26:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3bdb59b8-00d3-488b-8950-31d822edcc06_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p style="text-align: center;"></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Some of these API design concepts are </span><em><span>foundational</span></em><span>, and some are </span><em><span>advanced</span></em><span>. ALL of them are super useful to software engineers building scalable APIs.</span></p><p><span>Curious to know how many were new to you:</span></p><ol><li><p><span>REST,</span></p></li><li><p><span>GraphQL,</span></p></li><li><p><span>Authentication,</span></p></li><li><p><span>Authorization,</span></p></li><li><p><span>Rate Limiting,</span></p></li><li><p><span>Caching,</span></p></li><li><p><span>Pagination,</span></p></li><li><p><span>Status Codes,</span></p></li><li><p><span>Webhooks,</span></p></li><li><p><span>Idempotency,</span></p></li><li><p><span>API Gateway,</span></p></li><li><p><span>API Versioning,</span></p></li><li><p><span>JSON,</span></p></li><li><p><span>OAuth 2.0,</span></p></li><li><p><span>HTTP Methods,</span></p></li><li><p><span>gRPC,</span></p></li><li><p><span>API Keys.</span></p></li></ol><p>(&#8230;and much more in Part 2!)</p><p><span>For each, I&#8217;ll share:</span></p><ul><li><p><span>What it is &amp; how it works (in plain English),</span></p></li><li><p><span>A real-world analogy (if I found one),</span></p></li><li><p><span>Tradeoffs,</span></p></li><li><p><span>Why it matters.</span></p></li></ul><p><span>Let&#8217;s go!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Beyond the Coding Agent: Building at Enterprise Scale (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gdg5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg" width="1456" height="765" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:765,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5731269,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/209402880?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gdg5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Coding agents made individual tasks faster. They didn&#8217;t remove the coordination, validation, and handoffs that actually determine how fast enterprise software ships.</p><p><a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Join Sid, CTO and Co-founder of Blitzy, for a live session</a> on what changes when a system can hold context across an entire codebase, not just a single file or function. Sid will walk through a real project in Blitzy, covering everything from reverse engineering and tech spec generation to the Agent Action Plan, code generation, and PR Review. You&#8217;ll see what happens at each stage and where human review gates the process.</p><p><strong>What you&#8217;ll see:</strong></p><ul><li><p>Reverse engineering and tech spec generation on a real codebase</p></li><li><p>Where human review sits in an autonomous build: sign-off at the plan stage, approval at the merge stage</p></li><li><p>Enterprise modernization results</p></li></ul><p>We&#8217;ll close with an open Q&amp;A, so bring your questions on agent orchestration and governance at scale.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true&quot;,&quot;text&quot;:&quot;Save Your Seat&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true"><span>Save Your Seat</span></a></p><p><em>(Thanks to <a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Blitzy</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. REST</span></strong></h2><blockquote><p><span>Representational State Transfer (</span><strong><span>REST</span></strong><span>) is a way to build APIs that organizes data as resources and uses standard HTTP methods to work with them.</span></p></blockquote><p><span>Every resource gets its own address.</span></p><p>Each resource has its own URL. For example, a user is at <code>/users/42</code> and an order is at <code>/orders/17</code>. </p><p>Use:</p><ul><li><p><code>GET</code> to read it, </p></li><li><p><code>POST</code> to create it, </p></li><li><p><code>PUT</code> to replace it,</p></li><li><p><code>DELETE</code> to remove it.</p></li></ul><p>The HTTP method defines the action, and the URL identifies the resource. Both the client and server follow the same contract.</p><p><span>REST also stays stateless, so any server can answer any request.</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_!5o2X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5o2X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png" width="1402" height="1122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5o2X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A library with a fixed shelf number for every book:</span></p><p><span>You hand the librarian a shelf number and say borrow, return, or replace. They never ask what you meant.</span></p><p><span>The number identifies the book; the verb identifies the action; they leave no room for guessing.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>REST wastes requests &amp; bandwidth.</span></p><p><span>One screen may need a user, their orders, and their payment method, which costs three round trips. Ask for a user, and the server sends every field, including the twenty you ignore. Add a field for one client, and you risk breaking another.</span></p><p><span>So keep your resources small and reach for GraphQL when clients need to shape their own responses.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Public APIs, mobile and web clients, anything cached at the edge, and any service where a new developer should guess the right endpoint on the first try.</span></p><p><span>Spring, Express, Django REST Framework, and FastAPI all lean on it. Pair it with OpenAPI so the contract stays readable, and with API Versioning so today&#8217;s shape survives tomorrow&#8217;s change.</span></p><h2><strong><span>2. GraphQL</span></strong></h2><blockquote><p><span>GraphQL is a query language for APIs that lets clients request exactly the data they need in a single response.</span></p></blockquote><p><span>There is one endpoint instead of dozens.</span></p><p><span>Client sends a query that names the fields it needs. The server walks the query, fetches each field, and returns a response shaped like the request. Queries read data, mutations change it, and subscriptions stream updates as they happen. Ask for three things at once, and you get one round trip.</span></p><p><span>The client decides the shape, so the server stops guessing.</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_!LIKl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LIKl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png" width="1402" height="1122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LIKl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A sandwich counter where you name every ingredient:</span></p><p><span>A fixed combo hands you the pickles you scrape off and skips the extra cheese you wanted. Naming each ingredient gets you the sandwich you meant to order, in one pass down the counter.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>GraphQL costs you more.</span></p><p><span>Caching gets harder because every query is a </span><code>POST</code><span> to the same URL. Plus one careless nested query could walk your database for a minute. You carry a schema, a resolver for every field, and a plan for the N+1 problem.</span></p><p><span>So set a depth limit and a query cost budget on day one.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Mobile clients on slow networks, screens that stitch together several resources, and front ends that change faster than the backend.</span></p><p><span>Apollo, Relay, Hasura, and graphql-js are common choices. Pair it with Rate Limiting, because a single expensive query can cost more than a thousand REST calls.</span></p><h2><strong><span>3. Authentication</span></strong></h2><blockquote><p><span>Authentication proves &#8220;who&#8221; is calling your API.</span></p></blockquote><p><span>The caller presents a credential &amp; server checks it.</span></p><p><span>That credential could be a password, an API key, or a signed token. The server verifies it against something it trusts, then attaches an identity to the request. Everything downstream reads that identity.</span></p><p><span>A caller who fails the check gets a </span><code>401</code><span> and never reaches the business logic.</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_!bcnS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bcnS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bcnS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>Showing your passport at the border desk.</span></p><p><span>The officer compares the photo to your face &amp; the name to a list. They are not deciding where you may travel inside the country. They only confirm you are the person on the document.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Each check costs a lookup/signature verification.</span></p><p><span>Secrets leak through logs, screenshots, and public repositories. Sessions expire at the worst moment for the user.</span></p><p><span>So rotate credentials on a schedule &amp; keep them out of your URLs.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Every API that touches private data, money, or a user account.</span></p><p><span>Auth0, Okta, Keycloak, and Firebase Auth handle the hard parts. Pair it with Authorization, because proving who you are says nothing about what you may do.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2><strong><span>4. Authorization</span></strong></h2><blockquote><p><span>Authorization decides what a proven caller is allowed to do.</span></p></blockquote><p><span>Authentication runs first, then authorization runs.</span></p><p><span>The server knows the identity &amp; now checks the rules:</span></p><ul><li><p><em><span>Does this user own this order?</span></em></p></li><li><p><em><span>Does this token carry the write scope?</span></em></p></li><li><p><em><span>Does this role permit a delete?</span></em></p></li></ul><p><span>A caller who fails the check gets a </span><code>403</code><span> i.e., the server knows exactly who you are and still says no.</span></p><p><span>Authorization answers a second question: </span><em><span>what may you touch?</span></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oF1F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oF1F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oF1F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A hotel keycard.</span></p><p><span>The card proves nothing about your name. It opens your room and the gym on the third floor. It stays dead against the manager&#8217;s office and the room next door, no matter how many times you tap it.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Rules sprawl across the codebase, and one missing check becomes a breach.</span></p><p><span>Test the negative cases, because a passing test that proves a user can read their own order says nothing about whether they can read somebody else&#8217;s.</span></p><p><span>So check ownership at the data layer &amp; at the route.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Multi-tenant systems, admin panels, and any endpoint where one user&#8217;s record sits next to another&#8217;s.</span></p><p><span>Role-based access control and attribute-based access control are the two common models. Pair it with OAuth 2.0, whose scopes carry authorization decisions across service boundaries.</span></p><h2><strong><span>5. Rate Limiting</span></strong></h2><blockquote><p><span>Rate limiting caps how many requests one caller can send in a </span>time <span>window.</span></p></blockquote><p><span>The server counts &amp; past the cap, refuses them.</span></p><p><span>A common limit is a hundred requests per minute per API key. Cross it, and the server returns </span><code>429 Too Many Requests</code><span> along with a </span><code>Retry-After</code><span> header. Response headers usually report the ceiling and how much of it you have left, so a well-behaved client slows itself down before it gets refused.</span></p><p><span>One noisy caller stops starving everyone else.</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_!xuKL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xuKL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xuKL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A nightclub with a counter at the door.</span></p><p><span>The room holds four hundred people. The doorman counts everyone in &amp; everyone out. When the room is full, the next person waits outside, and the people already dancing keep enjoying the music.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Limits frustrate honest heavy users, and a limit that seems generous in testing looks tight during a launch.</span></p><p><span>Counting across many servers means shared state, which is one more thing that can go down. Token bucket handles bursts better than a fixed window.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Public APIs, free tiers, login endpoints, and any expensive operations like search or export.</span></p><p><span>Redis backs most implementations, and NGINX, Envoy, and Kong ship it built in. Pair it with throttling, which slows a caller instead of turning them away.</span></p><h2><strong><span>6. Caching</span></strong></h2><blockquote><p><span>Caching stores a copy of the response so next identical request skips extra work.</span></p></blockquote><p><span>The fastest request is the one your server never handles.</span></p><p><span>A cache sits between the client and the origin and holds recent responses. When a matching request arrives, the cache answers from memory in a millisecond. </span><code>Cache-Control</code><span> headers say how long a copy stays fresh. An </span><code>ETag</code><span> lets the client ask whether its copy is still good, and the server answers </span><code>304 Not Modified</code><span> without sending the body again.</span></p><p><span>Read-heavy APIs live/die on this.</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_!k2qv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k2qv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k2qv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A barista who writes your usual on a card.</span></p><p><span>You walk in; they glance at the card, and the drink is ready before you finish greeting them. They only ask again when you tell them your order has changed.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Cached data goes stale, and a user who updates their profile &amp; still sees the old name loses trust immediately. Knowing when to throw a copy away is one of the hard problems in computing.</span></p><p><span>So cache aggressively on data that rarely changes. Plus, never cache a private response in a </span><em><span>shared</span></em><span> layer.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Product catalogs, public profiles, search results, and anything a thousand people read for every one person who writes.</span></p><p><span>Redis, Memcached, Varnish, and any content delivery network do this well. Pair it with Headers, which carry every instruction a cache obeys.</span></p><h2><strong><span>7. Pagination</span></strong></h2><blockquote><p><span>Pagination returns large datasets in smaller pages instead of sending ALL results in one response.</span></p></blockquote><p><span>The client asks for a slice and gets a pointer to the next one.</span></p><ul><li><p><strong><span>Offset pagination</span></strong><span> takes a page number &amp; size, then skips ahead.</span></p></li><li><p><strong><span>Cursor pagination</span></strong><span> hands back an opaque marker that says where you stopped, and you pass it back to continue.</span></p></li></ul><p><span>Both return the rows plus enough information to fetch the following page&#8230;Your database, your network, and the client&#8217;s memory will thank you.</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_!h4TT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h4TT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 424w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 848w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1272w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png" width="1456" height="777" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h4TT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 424w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 848w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1272w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong><span>Analogy</span></strong></h3><p><span>A book with a bookmark.</span></p><p><span>Nobody reads a thousand pages in one sitting. You read twenty, slide the ribbon in, and close the cover. Tomorrow you open straight to the ribbon rather than counting pages from the front.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Offset pagination </span><em><span>drifts</span></em><span>&#8230;Insert a row while somebody reads page two, and they see a duplicate on page three.</span></p><p><span>Cursor pagination gives up the ability to jump anywhere except forward &amp; back.</span></p><p><span>So use cursors for feeds &amp; offsets for admin tables.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Every list endpoint, every feed, and every export.</span></p><p><span>Stripe, GitHub, and Slack all publish cursor-based APIs. Pair it with Filtering and Sorting, which decide what lands on the page before you slice it.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>8. Status Codes</span></strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to create a good LLM judge]]></title><description><![CDATA[#183: Build a judge from expert examples and measure the mistakes it makes]]></description><link>https://newsletter.systemdesign.one/p/how-to-build-llm-judge</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/how-to-build-llm-judge</guid><dc:creator><![CDATA[Hamel Husain]]></dc:creator><pubDate>Wed, 30 Sep 2026 12:10:40 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/262dde06-f927-400d-ac1f-661006c82d30_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="callout-block" data-callout="true"><h3><a href="https://blog.jetbrains.com/blog/2026/09/22/introducing-jetbrains-air/"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">We are in the middle of the agentic coding era, please take advantage of it (Partner)</span></a></h3><p>Coding agents are changing what it means to be a software engineer.</p><p>Typing code on a screen used to be a big part of the job. But now AI agents can handle more of that work.</p><p>The pattern of technological change is familiar:</p><p><em>The mechanical part of work gets automated &amp; human role moves up a layer.</em></p><p>For software engineers, I think it means 3 things:</p><ol><li><p><em>You need to know what good looks like.</em></p><p>An agent can create a feature, fix a bug, and/or refactor code. But if you don&#8217;t know what good implementation looks like, you cannot tell whether the work should ship. The faster agents write code, the more your judgment matters.</p></li><li><p><em>You need to learn how to manage multiple agents.</em></p><p>One developer can already give different tasks to different coding agents. That changes the job. You become responsible for:</p><ul><li><p>giving context to agents,</p></li><li><p>directing their work,</p></li><li><p>checking results.</p></li></ul></li><li><p><em>You need a way to control this across the company.</em></p><p>Imagine all engineers in your company working this way&#8230;You need to know:</p><ul><li><p>which &#8220;agents&#8221; people use,</p></li><li><p>what they&#8217;re doing &amp; what they cost,</p></li><li><p>what happens when something goes wrong.</p></li></ul></li></ol><p>This is why I&#8217;m genuinely excited about JetBrains Air.</p><p>It gives you an environment for directing multiple coding agents &amp; reviewing their work. So you can delegate more coding work without losing visibility/control.</p><p>Plus...</p><ul><li><p>JetBrains Air Teams lets you coordinate software delivery workflows across engineers &amp; agents. So engineering teams can manage agentic work across the development process.</p></li><li><p>JetBrains Air Governance gives organizations policies, visibility, auditability &amp; cost management. So they can control how agents get used &amp; maintain accountability for what ships.</p></li></ul><p>And this works in a world where engineers use different agents &amp; models.</p><p>i.e., you don&#8217;t have to bet everything on one provider.</p><p><strong><a href="https://blog.jetbrains.com/blog/2026/09/22/introducing-jetbrains-air/"><mark data-color="rgb(255, 255, 0)" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Read more about JetBrains Air &#187;</mark></a></strong></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>Many AI outputs require subjective/domain-specific judgment.</span></p><p><span>A useful support response or a faithful summary is hard to grade with fixed rules in code</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>. People have to read &amp; interpret these outputs. So repeating that review across many outputs takes time.</span></p><p><span>To reduce this review work, you can ask a large language model (</span><strong><span>LLM</span></strong><span>) to evaluate another model&#8217;s output. This use of a model is called </span><em><span>LLM-as-a-judge</span></em><span>. You give the judge the output &amp; your evaluation criteria. It returns a decision, often with an explanation. This ability to automate subjective checks makes LLM-as-a-judge a &#8220;workhorse&#8221; in evals.</span></p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://hamel.dev/">Hamel Husain</a></strong> as a guest author.</p><p>Hamel writes about AI evaluations and teaches the <strong><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7">AI Evals course</a></strong> with Shreya Shankar. In this newsletter, he explains how to build an LLM judge and check its decisions against human labels.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what&#8217;s inside this newsletter:</em></p><ul><li><p><strong>A high judge score can still hide a broken evaluator.</strong> Why a judge that looks accurate could completely miss the failures you actually care about.</p></li><li><p><strong>Your human labels become the standard.</strong> The decisions, critiques &amp; rubrics that determine what your LLM judge should call Pass or Fail.</p></li><li><p><strong>The examples your judge sees change its decisions.</strong> Why some examples belong inside the prompt, while others must stay hidden until the final test.</p></li><li><p><strong>One number won&#8217;t tell you whether your judge works.</strong> The measurements that reveal how often it misses real failures &amp; incorrectly flags good outputs.</p></li><li><p><strong>Your judge gets stale as your AI product changes.</strong> What happens to your evals when models, user behavior &amp; evaluation criteria change over time.</p></li><li><p><strong>A 6-step process takes you from real failures to a validated LLM judge.</strong> The complete framework for choosing what to evaluate, defining the human standard, building the judge &amp; checking whether you can trust its decisions.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>The judge can work alongside code-based checks:</span></p><ul><li><p><span>Use code for checks with clear rules, such as whether an output follows the required format.</span></p></li><li><p><span>Use the judge for decisions that depend on meaning/context.</span></p></li></ul><p><span>For example, code can check whether a support response contains the words </span><em><span>&#8220;I am sorry.&#8221;</span></em></p><p><span>An LLM judge can assess whether the response addresses the customer&#8217;s frustration. Give the judge examples of acceptable responses so it can apply your support team&#8217;s standards.</span></p><p><span>Also code can check whether an answer includes a source link.</span></p><p><span>An LLM judge can compare the answer with the source to check whether the source supports the claim. Give the judge the source text so it has the evidence it needs.</span></p><p><span>For either task, the judge can make mistakes.</span></p><p><span>Before you rely on it, test whether its decisions match human judgments.</span></p><p><span>Even high agreement can hide these mistakes. If an error occurs in 5% of examples, a judge that always predicts Pass still has 95% agreement while detecting none of the errors.</span></p><p><span>To avoid this false confidence, measure whether the judge catches the failures that matter.</span></p><p><span>This newsletter starts with finding those failures and defining the human standard. It then shows how to build a judge prompt &amp; test its decisions against that standard</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. Choose a failure worth judging</span></strong></h2><p><span>When you start building evals, it is tempting to use a metric</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> someone else has already written.</span></p><p><span>Eval libraries offer ready-made scores for qualities such as helpfulness and coherence. You can run them on your outputs and get a score before deciding what a good result means for your product.</span></p><p><span>These metrics measure abstract qualities that may not matter for your use case.</span></p><p><span>Good scores on them do not mean your system works. For example, an answer might receive a high helpfulness score even though its sources do not support its claims</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>. You need a check for this specific failure.</span></p><p><span>Generic scores</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> can still help you choose outputs to review&#8230;</span></p><p><span>For example, sort outputs by helpfulness &amp; read some low-scoring examples. You may find a recurring problem worth checking. Read the outputs yourself to decide whether there is a failure and describe it. Keep some random examples in each review batch so you can find problems the generic score misses.</span></p><p><span>To decide which specific failures to check, review actual interactions and write notes about each problem. Then group similar problems into categories. This process is called </span><strong><span>error analysis</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>. Error analysis helps you decide what evals to write in the first place.</span></p><p><span>To understand an incorrect answer, you may need to see what happened before it.</span></p><p><span>Review the complete record of the user session, called a </span><strong><span>trace</span></strong><span>. It includes the user&#8217;s request &amp; the model&#8217;s response, along with any tool calls and their results.</span></p><p><span>For example, several answers may include sources that do not support their claims. Group these cases under one failure category, such as &#8220;unsupported claims.&#8221; You can then decide whether that failure needs an automated check.</span></p><p><span>To find these patterns:</span></p><ol><li><p><span>Gather about 100 traces that cover </span><em><span>different</span></em><span> users &amp; workflows.</span></p></li><li><p><span>Then review at least 30 traces yourself.</span></p></li><li><p><span>As you read, write free-text notes about anything that seems &#8220;wrong&#8221; from the user&#8217;s perspective.</span></p></li></ol><p><span>Do this initial review before reading an agent&#8217;s suggestions.</span></p><p><span>The agent may lack the product context you use to judge a good user experience. Its suggestions can direct your attention toward the problems it recognizes, causing you to miss failures it does not recognize.</span></p><p><span>After reviewing the first 30 traces, group similar failures and count the number in each category. Use your notes to ask the agent to search the remaining pool for similar examples. Review every suggestion yourself.</span></p><p><span>Continue until new traces stop revealing types of failure or changing your categories</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>.</span></p><p><span>The counts help you choose which failures to address first. For each failure, decide whether to fix it directly or build an automated check, often called an evaluator/eval.</span></p><p><span>Focus automated evaluators on failures that persist after fixing your prompts.</span></p><p><span>Teams sometimes discover their LLM doesn&#8217;t meet preferences they never specified, such as wanting short responses or a particular format.</span></p><p><span>Fix these obvious gaps first</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span>.</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_!in2i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!in2i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!in2i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg&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;:306826,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/216784604?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!in2i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!in2i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Only build expensive evaluators for problems you&#8217;ll iterate on repeatedly.</em></figcaption></figure></div><p><span>Plus, choose the simplest check that can detect the failure.</span></p><p><span>For example, you can run generated code to check whether it produces the expected result. Use an LLM judge when the check requires human judgment.</span></p><p><span>An LLM judge needs labeled examples and ongoing maintenance</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span>.</span></p><p><span>Before you can automate this judgment, you need a consistent human standard&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>2. Establish the human standard</span></strong></h2><p><span>After choosing a failure to evaluate, you need to decide which outputs should &#8220;pass&#8221;.</span></p><p><span>People can disagree about whether the same output is acceptable. To establish a consistent standard, find the person who understands what a good result looks like for your product. A customer service director might be the right expert for a support assistant. An educational tool may need a teacher/curriculum developer.</span></p><p><span>For a small team, choose </span><em><span>one</span></em><span> domain expert to make final decisions about quality.</span></p><p><span>This reduces the work of coordinating several reviewers &amp; resolving conflicting labels. The expert can incorporate input and feedback from others, but they drive the process. You then have a consistent standard to use when building and testing the judge.</span></p><p><span>The expert&#8217;s critiques also help uncover expectations people have not yet put into words. Use those critiques to define what the judge should check. If you are an independent developer with the relevant expertise, you can fill this role yourself.</span></p><p><span>Give the expert the information they need to evaluate each interaction.</span></p><p><span>That includes the user&#8217;s request &amp; the model&#8217;s response. Depending on the task, they may also need results from tools or relevant information about the user. Present the relevant evidence together so they can review it without switching between several systems</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p><h3><strong><span>Use Pass and Fail, with a critique</span></strong></h3><p><span>The expert needs a way to record each decision.</span></p><p><span>A 1-to-5 rating may seem useful for capturing degrees of quality. But the difference between adjacent points, like 3 versus 4, is often subjective and inconsistent across people labeling the outputs.</span></p><p><span>People can also default to middle values to avoid making a hard decision. Ask the expert to mark each example as </span><code>Pass</code><span> or </span><code>Fail</code><span> for the specific problem you are checking.</span></p><p><span>An evaluation with two possible labels is called </span><em><span>binary</span></em><span>.</span></p><p><span>Binary evaluations force clearer thinking &amp; more consistent labeling. Besides the pass/fail decision, the domain expert should write a critique explaining their reasoning.</span></p><p><span>Use the same </span><code>Pass</code><span> or </span><code>Fail</code><span> outcomes for the judge. Each decision should answer one specific question about the output. A critique explains the decision; a middle score can leave it unclear whether the output is acceptable.</span></p><p><span>The critique identifies what caused the output to pass or fail and records the expectations the judge needs to follow.</span></p><p><span>You can still measure gradual improvement.</span></p><p><span>For example, you can track whether each expected fact appears in an answer. An answer that includes four of five expected facts passes four specific checks</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span>.</span></p><h3><strong><span>Expect your criteria to change</span></strong></h3><p><span>Your evaluation criteria can change as you review outputs &amp; discover expectations you hadn&#8217;t considered. (Shreya Shankar &amp; her colleagues call this &#8220;criteria drift</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span>.&#8221;)</span></p><p><span>Reviewing the judge&#8217;s critiques can help the expert notice inconsistencies in how they evaluate edge cases.</span></p><p><span>If several people label examples, check whether they apply the same standard&#8230;</span></p><p><span>Have these annotators label the same examples independently before they discuss them. Measure agreement and collect the cases where their labels differ. Discuss the rules for deciding Pass or Fail. These written rules are your rubric.</span></p><p><span>Update the rubric with a definition or example that covers the disputed case. Then relabel affected examples. If the annotators still disagree, assign a domain expert to make the final decision and record the reason</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><span>.</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_!5zF9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5zF9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png" width="1200" height="1500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1500,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5zF9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p style="text-align: center;"><em><span>Start with binary labels to understand what &#8220;bad&#8221; looks like.</span></em></p><p><span>The expert&#8217;s labels &amp; critiques give you the material for the judge&#8217;s prompt.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>3. Write a prompt from expert examples</span></strong></h2><p><span>Use the expert&#8217;s critiques &amp; evaluation rules to write the judge&#8217;s prompt.</span></p><p><span>Include labeled examples</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><span> showing how to apply the rules to actual outputs.</span></p><p><span>Consider an assistant that turns a user&#8217;s request into a query for searching application data. The judge checks whether the generated query answers the request.</span></p><p><span>A user asks, </span><em><span>&#8220;show me slowest trace.&#8221;</span></em></p><p><span>In this example, a trace records the steps an application takes to handle a request. The generated query found a maximum duration but didn&#8217;t group the data by each trace&#8217;s identifier.</span></p><p><span>It returned a duration without identifying the slowest trace</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a><span>.</span></p><p><span>This shortened prompt includes the query &amp; the expert&#8217;s critique.</span></p><p><span>Replace the placeholders with your application&#8217;s query-language information &amp; evaluation guidelines</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a><span>.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9f96fb06-6fd6-4a5b-92fb-2903c9648d4c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">You are a query evaluator.
Evaluate whether the generated query answers the user&#8217;s request.

Here is information about the query language:
{{query_language_info}}

Here are the evaluation guidelines:
{{guidelines}}

Example evaluation:
&lt;nlq&gt;show me slowest trace&lt;/nlq&gt;

&lt;query&gt;
{
  &#8220;calculations&#8221;: [{&#8221;column&#8221;: &#8220;duration_ms&#8221;, &#8220;op&#8221;: &#8220;MAX&#8221;}],
  &#8220;orders&#8221;: [{&#8221;column&#8221;: &#8220;duration_ms&#8221;, &#8220;op&#8221;: &#8220;MAX&#8221;,
              &#8220;order&#8221;: &#8220;descending&#8221;}],
  &#8220;limit&#8221;: 1
}
&lt;/query&gt;

&lt;critique&gt;
{
  &#8220;critique&#8221;: &#8220;While the query attempts to find the slowest trace
  using MAX(duration_ms) and ordering correctly, it fails to group
  by trace.trace_id. Without this grouping, the query only shows
  the MAX(duration_ms) measurement over time, not the actual
  slowest trace.&#8221;,
  &#8220;outcome&#8221;: &#8220;Fail&#8221;
}
&lt;/critique&gt;

For the following query, write a critique explaining your decision.
Then provide a Pass or Fail judgment in the same format as above.

&lt;nlq&gt;{{user_input}}&lt;/nlq&gt;
&lt;query&gt;{{generated_query}}&lt;/query&gt;</code></pre></div><p><span>Include clear Pass examples alongside Fail examples to show the distinctions in your rubric.</span></p><p><span>Examples included in a prompt are often called &#8220;few-shot examples.&#8221;</span></p><p><span>Keep separate examples for testing the judge (described in the next section).</span></p><p><span>Keep each judge focused on one type of failure. Use separate judges for unrelated failures so you can see which behavior needs fixing</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><span>.</span></p><p><span>To check whether the prompt captures the expert&#8217;s judgment, compare their decisions on the same queries.</span></p><p><span>Put each user request and generated query in a spreadsheet with the judge&#8217;s critique and decision. Ask the expert to add their own critique and decision.</span></p><p><span>Use the disagreements to improve the prompt</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><span>.</span></p><h3><strong><span>Give the judge the evidence it needs</span></strong></h3><p><span>Some disagreements come from missing evidence.</span></p><p><span>To check a claim against a database, the judge needs the database result alongside the model&#8217;s answer. Your examples should contain the same information you use to evaluate.</span></p><p><span>Give each judge only the parts of the trace relevant to the failure it checks. Extra context can make its decisions </span><em><span>less</span></em><span> accurate.</span></p><p><span>Test your choices by comparing the judge&#8217;s decisions with human labels. Then, inspect disagreements to see whether the judge lacked necessary evidence or was distracted by irrelevant information.</span></p><p><span>Remove one piece of information at a time and check how the results change against human labels. If performance stays the same/improves, you may be able to leave it out.</span></p><p><span>Long-running agents can produce traces longer than the judge can read in one request. In those cases, consider giving the judge a tool to search for the parts it needs. Add this only when necessary, because it introduces more complexity &amp; cost</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><span>.</span></p><p><span>You still need to check the judge on examples you did not use to develop its prompt.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>4. Check whether the judge catches failures</span></strong></h2><p><span>A convincing critique can contain an incorrect decision.</span></p><p><span>Before relying on the judge, check how often its decisions match your domain expert. This check is called </span><strong><span>validation</span></strong><span>.</span></p><p><span>Run the judge on labeled examples you kept out of the prompt &amp; inspect the mistakes</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a><span>.</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_!Y7Mh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 424w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 848w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png" width="668" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:668,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A monkey hiding when asked how the team can trust its LLM judge.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A monkey hiding when asked how the team can trust its LLM judge." title="A monkey hiding when asked how the team can trust its LLM judge." srcset="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 424w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 848w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Show how often the judge misses failures and flags acceptable outputs.</em></figcaption></figure></div><h3><strong><span>Separate prompt development from the final test</span></strong></h3><p><span>Repeated changes make a prompt work well on examples you use to develop it.</span></p><p><span>You also need to know how it performs on new examples&#8230; so keep a separate group for the final test.</span></p><p><span>The first 30 traces help you discover failures.</span></p><p><span>Yet testing the </span><em><span>judge</span></em><span> requires more labeled examples. Plan to label 100 to 200 examples for each type of failure. Reuse labeled traces from error discovery when they match that failure, then collect more until you reach that range. Include enough Pass &amp; Fail examples to measure how well the judge recognizes each.</span></p><p><span>Split the labeled examples before you start revising the judge prompt</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a><span>:</span></p><ul><li><p><span>Training set contains examples you may put in the prompt. Here, &#8220;training&#8221; means choosing prompt examples. You do not change the model itself. Choose clear Pass and Fail examples with useful critiques.</span></p></li><li><p><span>The development set (dev set) is where you compare the judge with human labels while refining the prompt. Keep these examples out of the prompt.</span></p></li><li><p><span>Test set stays hidden until you finish revising the prompt. Freeze the prompt and run the judge on the test set once. Use the result as your final estimate of the judge&#8217;s performance.</span></p></li></ul><p><span>Use 10 to 20 percent for train examples</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a><span> you may put in the prompt.</span></p><p><span>Use 40 to 45 percent for dev while refining the judge. Reserve the remaining 40 to 45 percent for one final test. The number of Pass and Fail examples is more useful than the percentage alone. Aim for 30 to 50 Pass examples and 30 to 50 Fail examples in both dev and test when possible.</span></p><p><span>A total of 100 examples cannot meet those targets for both dev &amp; test. Collect more when you need better estimates, especially when failures are rare</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a><span>.</span></p><p><span>On the dev set, read the disagreements. Check for missing rules or evidence. Clarify ambiguous examples and correct any mistaken human labels. Run the judge on the dev set again after each revision.</span></p><p><span>If you revise the prompt after seeing test results, those examples have become part of development. Reserve new examples for the next final check.</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_!hKvn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hKvn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png" width="1200" height="1500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1500,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hKvn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p style="text-align: center;"><em><span>The &gt;90% target shown here is an example. Set targets based on the cost of missed failures and false alarms in your application.</span></em></p><h3><strong><span>Measure failures and passes separately</span></strong></h3><p><span>The judge can miss a failure or incorrectly mark an acceptable output as Fail.</span></p><p><span>Measure these mistakes separately. Count Fail as a positive result because a failure is what you are trying to detect. Measure:</span></p><ul><li><p><span>True positive rate (</span><strong><span>TPR</span></strong><span>) is the fraction of human-labeled failures that the judge correctly marks Fail. This is also called </span><em><span>recall for failures</span></em><span>.</span></p></li><li><p><span>True negative rate (</span><strong><span>TNR</span></strong><span>) is the fraction of human-labeled passes that the judge correctly marks Pass.</span></p></li></ul><p><span>Suppose your test set contains 50 human-labeled failures and 50 human-labeled passes. These numbers illustrate the calculation.</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_!S_PV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S_PV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 424w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 848w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1272w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S_PV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 424w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 848w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1272w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>The judge catches 45 of 50 failures, so TPR is 90%.</span></p><p><span>It correctly passes 40 of 50 acceptable outputs, so TNR is 80%.</span></p><p><span>The judge from the opening, which always predicts Pass, has a TPR of 0% despite its 95% accuracy.</span></p><p><span>Report the counts alongside the rates.</span></p><p><span>A result based on a handful of failures gives you little evidence about performance on future failures. When using these rates to make decisions, include a range that accounts for uncertainty from testing only a sample.</span></p><p><span>If people review the outputs the judge flags, measure precision too. It answers, </span><em><span>&#8220;Of the examples flagged Fail, how many were failures according to the human?&#8221;</span></em><span> In the illustrative table, that is 45 out of 55, or about 82%. Precision also depends on how common failures are. A test set with equal numbers of passes and failures may produce a different precision from what you&#8217;ll see with real users</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><span>.</span></p><p><span>Your acceptable error rates depend on how you use the judge. Report TPR &amp; TNR separately.</span></p><p><span>Use these same tests to compare the models you could use as your judge.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>5. Choose the model using human labels</span></strong></h2><p><span>I like to use the most powerful model I can afford within my budget for cost &amp; response time.</span></p><p><span>This budget might be different than my primary model, depending on the number of examples I need to score.</span></p><p><span>Using the same model is usually fine because the judge is doing a different task than your main LLM. The judges I recommend make specific Pass or Fail decisions.</span></p><p><span>Compare the judge with human labels</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><span> to check whether it works</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a><span>.</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_!02yr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!02yr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!02yr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg" width="809" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:809,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;An unvalidated LLM judge awards a medal to an LLM output.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An unvalidated LLM judge awards a medal to an LLM output." title="An unvalidated LLM judge awards a medal to an LLM output." srcset="https://substackcdn.com/image/fetch/$s_!02yr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!02yr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p style="text-align: center;"><em><span>Check the judge against human labels, even when it uses a different model.</span></em></p><p><span>If the judge disagrees too often with human labels, inspect examples and prompt before trying another model.</span></p><p><span>You can optimize for cost later once you&#8217;ve established reliable evaluation criteria.</span></p><p><span>If prompt changes are not enough, you might consider further training the judge on labeled examples. This is called </span><em><span>fine-tuning</span></em><span>.</span></p><p><span>I prefer </span><em><span>not</span></em><span> to fine-tune LLM judges. I&#8217;d rather spend the effort fine-tuning the actual LLM instead</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a><span>.</span></p><h3><strong><span>What about TypeSafe&#8217;s Jev?</span></strong></h3><p><a href="https://typesafe.ai/"><span>TypeSafe&#8217;s Jev</span></a><span> has been very popular recently.</span></p><p><span>You may be wondering how it fits into this process. Jev returns decisions with probabilities, which makes it a useful example of how the same evaluation approach applies to different models.</span></p><p><span>An LLM judge is ultimately a &#8220;classifier&#8221;.</span></p><p><span>A classifier assigns an input to a category. In this newsletter, the input is an output you want to evaluate, and the categories are Pass and Fail. Choosing between two categories makes this a binary classifier.</span></p><p><span>You can use any approach you want to make those decisions, including Jev.</span></p><p><span>Validate the classifier against human labels so you know how well it works. Compare candidates on the same examples and measure TPR and TNR. You can then make a deliberate tradeoff between the mistakes each classifier makes and what it costs to run. For example, you might accept more missed failures for a lower cost, if those failures are inexpensive to fix.</span></p><p><span>Once the judge meets your requirements, keep checking it as your application changes.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>6. Keep the judge useful</span></strong></h2><p><span>Changes to your application can produce outputs absent from the examples used to test the judge</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-28" href="#footnote-28" target="_self">28</a><span>.</span></p><p><span>So continue to check the judge against human labels as you use it to review new interactions. Read the failures it identifies to decide what to fix in your application.</span></p><p><span>I conduct this human review at regular intervals and whenever something material changes. For example, if I update a model, I&#8217;ll rerun the process. Your product&#8217;s criteria can also change as you see more outputs. Update the rubric and relabel affected examples when that happens.</span></p><p><span>Have the expert review a sample that reflects the interactions your users have. Give extra attention to cases where the judge is least reliable.</span></p><p><span>For example, if I find an error, I&#8217;ll search for more examples I think might trigger the same error. However, I also do a bit of random sampling. Use the random sample to estimate how often users encounter errors.</span></p><p><span>Eval datasets naturally get stale as your product and users change. Review new interactions to find problems and update your examples or reference answers</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-29" href="#footnote-29" target="_self">29</a><span>.</span></p><p><span>As your eval set changes, its scores may no longer be directly comparable with older scores. Track what changed before interpreting a higher or lower pass rate.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Before you rely on the judge</span></strong></h2><p><span>Check these points before using the judge&#8217;s scores to make product decisions:</span></p><ul><li><p><span>Choose a specific failure you have observed in real outputs.</span></p></li><li><p><span>Have a domain expert label examples Pass or Fail and explain each decision.</span></p></li><li><p><span>Build the prompt from those rules and examples. Keep separate examples for the final test.</span></p></li><li><p><span>Measure how often the judge catches failures and accepts good outputs. Report the counts with the rates.</span></p></li><li><p><span>Repeat human review when your application or evaluation criteria change.</span></p></li></ul><p><span>If the judge misses too many failures or flags too many acceptable outputs, review the disagreements before using its scores.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>Thanks to </span><strong><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7"><span>Hamel</span></a></strong><span> for writing this newsletter.</span></p><p><span>Read his </span><a href="https://hamel.dev/blog/posts/llm-judge/"><span>LLM judge guide</span></a><span> and </span><a href="https://hamel.dev/blog/posts/evals-faq/"><span>Evals FAQ</span></a><span> for more examples. He teaches the </span><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7"><span>AI Evals course</span></a><span> with Shreya Shankar.</span></p><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 7 October. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><strong>Code</strong> means traditional software logic written with explicit rules.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>A<strong> metric</strong> measures some quality of an AI output and turns it into a <strong>score/result</strong>.</p><ul><li><p><strong>Helpfulness:</strong> How useful is the answer?</p></li><li><p><strong>Coherence:</strong> Does the answer make sense?</p></li><li><p><strong>Faithfulness:</strong> Does the answer stay supported by the provided source?</p></li><li><p><strong>Relevance:</strong> Does the answer address the question?</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Because <strong>&#8220;helpfulness&#8221; and &#8220;source support&#8221; measure different properties</strong>.</p><p>Imagine the user asks:</p><blockquote><p><em>&#8220;Why did our database latency increase?&#8221;</em></p></blockquote><p>AI answers:</p><blockquote><p><em>&#8220;The latency increased because traffic doubled during the deployment. Adding read replicas would reduce the load.&#8221;</em></p></blockquote><p>That answer could look clear, relevant, and actionable. A generic <strong>helpfulness evaluator</strong> could therefore give it a high score.</p><p>But provided source only says:</p><blockquote><p><em>&#8220;Database latency increased from 50 ms to 120 ms.&#8221;</em></p></blockquote><p>The source says nothing about traffic doubling or read replicas. AI invented the explanation.</p><p>So you could have:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;7427f06f-7aa3-41b8-bb63-9ff6a008b3d2&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Helpfulness check &#8594; Pass
The response appears useful.

Source-support check &#8594; Fail
The source does not support the response&#8217;s claims.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Think of a generic score as a <em>filter that helps you decide what to inspect first.</em></p><p>Say you have 1,000 AI responses. A helpfulness score marks 50 of them as low quality.</p><p>Read some of those 50 yourself. You could notice the same failure several times, such as answers that ignore part of the user&#8217;s question. Now you have found a specific problem worth checking with an eval.</p><p>But the helpfulness score could miss other problems. So also review some random responses to discover failures the score did not catch.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>Imagine you have an AI customer support agent. You review 100 real conversations and write down every problem you see:</p><ul><li><p>8 responses gave the wrong refund policy.</p></li><li><p>5 responses ignored part of the customer&#8217;s question.</p></li><li><p>4 responses invented information.</p></li><li><p>3 responses were too long.</p></li></ul><p>You then group similar problems into categories such as wrong policy, incomplete answer, and unsupported claims.</p><p>This process is <strong>error analysis</strong>.</p><p>It tells you which problems actually occur in your AI system. You then create <strong>evals</strong> to detect the important problems automatically.</p><p>So the flow is:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;4d9d8cf1-b3aa-4f2e-a819-a05b8b24574f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Review real interactions &#8594; find problems &#8594; group similar problems &#8594; create evals for those failures.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/why-is-error-analysis-so-important-in-llm-evals-and-how-is-it-performed.html">Why error analysis is important and how to perform it</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>TLDR--Choose a failure worth judging (Personal notes from Neo):</p><ul><li><p>Start with real failures, rather than generic metrics, such as helpfulness or coherence.</p></li><li><p>Review real traces &amp; use error analysis to group recurring problems into failure categories.</p></li><li><p>Start with about 100 traces and manually review at least 30 before using an agent to help find similar failures.</p></li><li><p>Prioritize failures by how often they occur. Fix obvious prompt problems first.</p></li><li><p>Build an automated eval only for important failures that persist and require repeated checking.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/should-i-build-automated-evaluators-for-every-failure-mode-i-find.html">Should I build automated evaluators for every failure mode?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>TLDR--Establish the human standard (Personal notes from Neo):</p><ul><li><p>Choose one domain expert to define what good output looks like &amp; make final quality decisions.</p></li><li><p>Use binary Pass/Fail labels for each specific failure, plus a critique explaining the decision.</p></li><li><p>Turn the expert&#8217;s decisions and critiques into a rubric the LLM judge should follow.</p></li><li><p>Expect criteria drift as you discover new cases. Update the rubric and relabel affected examples.</p></li><li><p>If annotators disagree, discuss the cases, refine the rubric, and let the domain expert make the final decision.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/why-do-you-recommend-binary-passfail-evaluations-instead-of-1-5-ratings-likert-scales.html">Why use binary evaluations instead of 1-to-5 ratings?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/field-guide/">A field guide to rapidly improving AI products</a>, discussing Shreya Shankar and colleagues' research on criteria drift.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-many-people-should-annotate-my-llm-outputs.html">How many people should annotate outputs?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>Think of the <strong>judge&#8217;s prompt</strong> as an instruction manual for the LLM judge.</p><ul><li><p><strong>Evaluation rules:</strong> The rules that define what counts as Pass or Fail.</p><ul><li><p>Example: &#8220;The generated query must answer the user&#8217;s full request.&#8221;</p></li><li><p>Example: &#8220;If the query misses required information, mark it Fail.&#8221;</p></li></ul></li><li><p><strong>Labeled examples:</strong> Real examples where a human expert has already decided the correct result.</p><ul><li><p>User asks: &#8220;Show me the slowest trace.&#8221;</p></li><li><p>Generated query fails to identify the trace.</p></li><li><p>Human label: Fail</p></li><li><p>Critique: &#8220;The query finds the maximum duration but does not identify which trace had it.&#8221;</p></li></ul></li></ul><p>The LLM judge learns from both:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;01b83dbd-de14-4e41-869f-a7f12338134d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Evaluation rules = what to look for
Labeled examples = what those rules look like in practice</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><p>Imagine you have an AI assistant that converts plain English into database queries.</p><p>You ask:</p><blockquote><p><em>&#8220;Show me the slowest trace.&#8221;</em></p></blockquote><p>A <strong>trace</strong> is the record of everything an application did while handling one request. Each trace has an ID and a duration.</p><p>Suppose the data looks like this:</p><pre><code><code>Trace A &#8594; 2 seconds
Trace B &#8594; 8 seconds
Trace C &#8594; 4 seconds</code></code></pre><p>The correct answer should identify:</p><blockquote><p>Trace B &#8594; 8 seconds</p></blockquote><p>But the generated query only calculates:</p><blockquote><p>Maximum duration &#8594; 8 seconds</p></blockquote><p>It does not return Trace B.</p><p>So the query found the longest duration, but it failed to answer which trace was the slowest. The LLM judge should therefore mark the query Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>It means giving each LLM judge one specific job.</p><p>Suppose your AI customer-support agent has three possible failures:</p><ul><li><p><strong>Judge 1: Factual accuracy</strong> &#8594; Did the response contain incorrect information?</p></li><li><p><strong>Judge 2: Completeness</strong> &#8594; Did it answer the user&#8217;s full question?</p></li><li><p><strong>Judge 3: Source support</strong> &#8594; Does the provided source support the claims?</p></li></ul><p>Instead of asking one judge:</p><blockquote><p>&#8220;Is this response good overall?&#8221;</p></blockquote><p>you run three focused judges. Then you could get:</p><pre><code><code>Factual accuracy &#8594; Pass
Completeness &#8594; Fail
Source support &#8594; Pass</code></code></pre></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><p>TLDR--Write a prompt from expert examples (Personal notes from Neo):</p><ul><li><p>Build the judge&#8217;s prompt from the expert&#8217;s evaluation rules, critiques &amp; labeled examples.</p></li><li><p>Include clear Pass &amp; Fail few-shot examples so the judge sees how to apply the rubric.</p></li><li><p>Keep each judge focused on one specific failure. Use separate judges for unrelated failures.</p></li><li><p>Compare the judge&#8217;s decisions with human labels &amp; use disagreements to improve the prompt.</p></li><li><p>Give the judge only the evidence it needs. Remove irrelevant context that could hurt accuracy.</p></li><li><p>Test the final judge on new examples you did not use to develop its prompt.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-much-of-a-trace-should-i-give-an-llm-judge.html">How much context should I give an LLM judge?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><p>TLDR--Check whether the judge catches failures (Personal notes from Neo):</p><ul><li><p>Validate the judge by comparing its decisions with human-labeled examples.</p></li><li><p>Split labeled examples into training, dev &amp; test sets before you start refining the prompt.</p></li><li><p>Use the training set for prompt examples, the dev set to improve the prompt &amp; the hidden test set for the final evaluation.</p></li><li><p>Measure failures &amp; passes separately with true positive rate (TPR) &amp; true negative rate (TNR). Add precision when you care about how many flagged outputs are real failures.</p></li><li><p>Inspect disagreements on the dev set to find missing rules, missing evidence &amp; incorrect human labels.</p></li><li><p>Keep the test set untouched. If you use its results to change the prompt, create a new test set for the next final evaluation.</p></li><li><p>Report sample counts alongside the metrics &amp; choose acceptable error rates based on the cost of missed failures and false alarms.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>Think of it like studying for an exam. You split your labeled examples into three groups:</p><ul><li><p><strong>Training set = examples you study from</strong></p><ul><li><p>Put some of these Pass/Fail examples directly in the judge&#8217;s prompt.</p></li><li><p>They teach the judge what good and bad outputs look like.</p></li><li><p>You are not training the LLM itself.</p></li></ul></li><li><p><strong>Development set = practice exam</strong></p><ul><li><p>Run the judge on these examples.</p></li><li><p>Compare its answers with the correct human labels.</p></li><li><p>When it makes mistakes, improve the prompt and try again.</p></li><li><p>Never put these examples into the prompt.</p></li></ul></li><li><p><strong>Test set = final exam</strong></p><ul><li><p>Keep these examples hidden while you improve the prompt.</p></li><li><p>Once you finish, freeze the prompt and run it on the test set.</p></li><li><p>This tells you how well the judge performs on unseen examples.</p></li></ul></li></ul><p>So the workflow is:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;381e9b92-8831-4e92-9398-9ff72c6bbfa4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Training set &#8594; build prompt &#8594; Dev set &#8594; improve prompt &#8594; Test set &#8594; measure final performance.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><p>It means the percentage of your total collection of human-labeled examples for that specific failure.</p><p>For example, suppose you have 200 labeled examples:</p><ul><li><p><strong>10&#8211;20% training set:</strong> 20&#8211;40 examples used to help build the judge prompt.</p></li><li><p><strong>40&#8211;45% dev set:</strong> 80&#8211;90 examples used to test and improve the prompt.</p></li><li><p><strong>40&#8211;45% test set:</strong> 80&#8211;90 examples kept hidden for the final evaluation.</p></li></ul><p>So if you choose 10/45/45:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;24289ea3-7e75-4899-abee-a37897577e7b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">200 total labeled examples &#8594; 20 train + 90 dev + 90 test</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-many-examples-do-i-need-for-an-eval.html">How many examples do I need for an eval?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/revenge/">The revenge of the data scientist</a> and the validation section of his <a href="https://hamel.dev/blog/posts/llm-judge/#how-do-you-validate-an-llm-judge-against-human-labels">LLM judge guide</a>. The 100-example table is illustrative arithmetic.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/can-i-use-the-same-model-for-both-the-main-task-and-evaluation.html">Can I use the same model for the task and evaluation?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><p>TLDR--Choose the model using human labels (Personal notes from Neo):</p><ul><li><p>Start with the most powerful judge model your cost &amp; response-time budget allows.</p></li><li><p>Validate every judge against the same human-labeled examples, even if you use a different model from your main LLM.</p></li><li><p>If the judge disagrees too often with humans, inspect the prompt &amp; examples before switching models.</p></li><li><p>Compare judge models using TPR &amp; TNR, then balance accuracy, cost &amp; response time.</p></li><li><p>Avoid fine-tuning the judge unless prompt improvements fail. Prioritize improving the main LLM instead.</p></li><li><p>Treat the judge in this guide as a binary classifier: it classifies each output as Pass or Fail.</p></li><li><p>Jev fits the same process. Validate its decisions against human labels &amp; compare its errors and cost with other judge models.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-28" href="#footnote-anchor-28" class="footnote-number" contenteditable="false" target="_self">28</a><div class="footnote-content"><p>TLDR--Keep the judge useful (Personal notes from Neo):</p><ul><li><p>Keep validating the judge against human labels as your application changes.</p></li><li><p>Rerun human reviews after major changes, such as switching the model.</p></li><li><p>Update the rubric &amp; relabel affected examples when your evaluation criteria change.</p></li><li><p>Review real user interactions, with extra attention to cases where the judge performs poorly.</p></li><li><p>Use targeted examples to investigate known errors &amp; random samples to discover unexpected ones.</p></li><li><p>Refresh stale eval datasets with new interactions, examples &amp; reference answers.</p></li><li><p>Track changes to your eval set because newer scores may not be directly comparable with older scores.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-29" href="#footnote-anchor-29" class="footnote-number" contenteditable="false" target="_self">29</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/what-should-i-do-when-my-gold-eval-dataset-becomes-stale.html">What should I do when my eval dataset becomes stale?</a></p></div></div>]]></content:encoded></item><item><title><![CDATA[Realtime AI Agent - A Deep Dive]]></title><description><![CDATA[#182: Infrastructure layer behind realtime agents]]></description><link>https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 28 Sep 2026 16:05:47 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d649188d-e900-4a3a-8875-d924ee083787_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><p><span>I&#8217;m happy to partner with </span><strong><a href="https://link.svix.com/system-01">Svix</a></strong><span> on this newsletter.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents are killing your apps with compounding polling across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p></div><p><span>If you&#8217;ve used an AI agent</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>, you&#8217;d have noticed how much it can do on its own&#8230;</span></p><p><span>Give it a task; it calls a few tools, then keeps going without you guiding every step.</span></p><p><span>But agents still are NOT good at one thing: </span><em><span>waiting</span></em><span>.</span></p><p><span>An agent would wait for someone to approve a request, a payment to go through, a deployment to finish, or a customer to reply. The agent has done its part, but what it&#8217;s waiting for might happen seconds later or not until tomorrow&#8230;</span></p><p><span>It could keep checking for an update every few seconds, but this&#8217;d become &#8220;wasteful&#8221; pretty quickly. i.e., the agent is still doing nothing except asking whether anything has changed.</span></p><p><span>A better approach is to let the system send an event when the change actually occurs. So the agent does not need to keep asking &amp; continues the workflow when the event arrives.</span></p><p><span>This is where &#8220;webhooks</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>&#8221; become useful.</span></p><p><span>It lets one system notify another when something happens, and it's been running behind many apps you use daily, long before AI agents needed it.</span></p><p><span>Now apply that to everything an agent would wait on: payments, deployments, customer replies, or human approval.</span></p><p><span>Plus, handling one of these events is easy. Yet handling thousands of them reliably across different customers &amp; external systems gets </span>extremely <span>HARD&#8230;</span></p><p><span>In this newsletter, we&#8217;ll use </span><strong><a href="https://link.svix.com/system-01"><span>Svix</span></a></strong><span> as a case study &amp;</span> look at how it <span>solves this problem.</span></p><p><span>(</span><a href="https://link.svix.com/system-01">Svix</a><span> is a webhook infrastructure platform for reliable event delivery.)</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Is a Real-Time AI Agent</span></h2><p><span>What changes with a real-time agent is not how it </span><em><span>thinks</span></em><span>, but what it </span><em><span>hears</span></em><span>.</span></p><p><span>Let&#8217;s start with what an agent needs before getting into real-time&#8230;</span></p><h3><span>Agent Fundamentals</span></h3><p><span>Agents (real-time or not) run on these same parts:</span></p><ul><li><p><span>A Large Language Model</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> (</span><strong><span>LLM</span></strong><span>) does the actual reasoning.</span></p></li><li><p><span>A decision loop</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> lets it plan a step, take it, check the result, and decide what comes next.</span></p></li><li><p><span>Tools &amp; integrations let it act beyond generating text, such as sending requests, running commands, and/or calling APIs.</span></p></li><li><p><span>State tracks where it is in a task, so it doesn&#8217;t lose the thread halfway through.</span></p></li></ul><p><span>Without these pieces, you&#8217;re getting closer to a simple model response than an agent that can carry out a task.</span></p><p><span>Real-time is the layer on top of this&#8230;</span></p><h3><span>What Makes an Agent Real-Time</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!51EX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!51EX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!51EX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!51EX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!51EX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>A typical agent workflow starts when you give it a task.</span></p><p><span>It works through steps, uses whatever tools it needs &amp; eventually finishes&#8230;</span></p><p>With a real-time agent, the work doesn&#8217;t end there. An external event could arrive after the original run ends, and the agent needs to resume the workflow when it does.</p><p><span>A payment could clear somewhere in the background a few minutes after the agent finished its original task. Instead of waiting for you to come back &amp; tell it, the agent could receive the event</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> and continue the workflow on its own.</span></p><p><span>It can pick a workflow back up without another prompt from you. Nobody needs to open a new chat/type anything. An agent does the asking instead.</span></p><p><span>And it can act on something arriving well after the original task ended. The original agent run might already be complete by the time the event arrives, </span>and the agent still has to do something with it.</p><p><span>Also this brings up &#8220;latency&#8221;&#8230;</span></p><p><span>A real-time agent is NOT necessarily instant.</span></p><p><span>Latency occurs at several points in the workflow:</span></p><ul><li><p>Network adds some delay,</p></li><li><p>Model takes time to reason,</p></li><li><p><span>Tools &amp; external APIs take time to respond.</span></p></li></ul><p><span>So when we talk about a real-time agent, we&#8217;re really talking about keeping the entire path &#8220;responsive&#8221;, not just getting a fast response from the model.</span></p><p><span>If you put these together, a real-time agent isn&#8217;t just running one job well. It&#8217;s also sitting ready for whatever comes in later, on somebody&#8217;s schedule.</span></p><p><span>Now let&#8217;s look at how these pieces actually work together inside the agent&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Real-Time AI Agent Architecture</span></h2><p><span>A real-time agent is not one piece of code that does everything.</span></p><p><span>Instead, it&#8217;s a handful of layers, each with a different job&#8230;</span></p><p><span>The model handles the reasoning, deciding what to do next based on what it currently knows. Everything else in the agent supports this decision. It takes in input, takes action, and catches external events as they happen.</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_!de_i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!de_i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!de_i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!de_i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!de_i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Here&#8217;s what each layer does:</span></p><ul><li><p><strong>Interaction</strong>: Receives input from you/another system.</p></li><li><p><strong>Agent &amp; reasoning</strong>: Runs the model &amp; its decision loop.</p></li><li><p><strong>Tool &amp; integration</strong>: Performs actions on external systems.</p></li><li><p><strong>Event delivery</strong>: Brings external events into agent workflow.</p></li></ul><p>The<em> agent &amp; reasoning</em><span> layer runs the model and its decision loop.</span></p><p><span>The other layers support it by bringing in input, carrying out actions &amp; delivering external events.</span></p><h3><span>Synchronous vs Asynchronous Workflows</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jOgK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jOgK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jOgK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Some operations finish immediately&#8230;</span></p><p><span>Ask to look up an order status &amp; tool call returns the result within the same run.</span></p><p><span>Other operations don't finish right away&#8230;</span></p><p><span>Processing a file could take a minute. A payment can take a few seconds to clear, sometimes longer. An approval can sit unread for two days.</span></p><p><span>Synchronous operations return their result within the same run, so the agent could use it right away. Asynchronous operations don&#8217;t, and the workflow needs to continue once the result becomes available later.</span></p><p><span>When the result becomes available, the event gets delivered to the application, which then updates/resumes the agent&#8217;s workflow.</span></p><p><span>Let&#8217;s see how the event actually reaches the agent in the first place&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How Real-Time AI Agents Connect to External Systems</span></h2><p><span>When an agent needs to react to something happening in another system, a webhook is one of the simplest ways to get the event to it.</span></p><p><span>One system notifies another when something happens. i.e., the receiving side does not need to check for changes repeatedly.</span></p><p><span>Webhooks are built for &#8220;discrete&#8221; events, not continuous streams of data.</span></p><p><span>A payment clearing counts as one. So does a build finishing or an approval landing in someone&#8217;s inbox. This is exactly the kind of event an agent needs to hear about to move a workflow forward.</span></p><p><span>The idea is simple, but it helps to see what actually happens when one of these events gets sent.</span></p><p><span>So let&#8217;s look at how webhooks work...</span></p><h3><span>How Webhooks Work</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p3md!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p3md!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!p3md!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p3md!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!p3md!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Here&#8217;s how:</span></p><ol><li><p><span>An event occurs in the source system.</span></p></li><li><p><span>Source sends an HTTP POST to a configured endpoint.</span></p></li><li><p><span>The receiving application verifies the event &amp; triggers the appropriate workflow.</span></p></li><li><p><span>Sender records</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> whether delivery succeeded/failed.</span></p></li></ol><p><span>Four steps, each depending on the last.</span></p><p><span>If you skip verification, anyone can send a fake event to the endpoint. Or if you skip recording the result, a failed delivery </span><em><span>disappears</span></em><span> without anybody noticing.</span></p><p><span>Webhooks work well for individual events, but real-time systems also deal with continuous </span>information <span>streams.</span></p><h3><span>Streaming vs Webhooks</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kogF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kogF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 424w, https://substackcdn.com/image/fetch/$s_!kogF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 848w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1272w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png" width="1456" height="625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:625,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kogF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 424w, https://substackcdn.com/image/fetch/$s_!kogF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 848w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1272w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Real-time systems typically handle information in 2 ways:</span></p><ul><li><p><span>It keeps flowing continuously,</span></p></li><li><p><span>Or it gets sent when a specific event happens.</span></p></li></ul><p><em><span>Streaming</span></em><span> is useful when information needs to keep flowing.</span></p><p><span>A voice conversation, a live transcript, or an agent response generated token by token all need a connection that can keep data flowing.</span></p><p><em><span>Webhooks</span></em><span> solve a different problem.</span></p><p><span>They&#8217;re useful when something happens outside the agent, and the agent needs to know about it. The event happens once, and the system sends a notification instead of making the agent keep checking.</span></p><p><span>For real-time AI agents, both matter.</span></p><ul><li><p><span>Streaming keeps the user interaction responsive.</span></p></li><li><p><span>Webhooks handle everything happening around the agent that needs a response later.</span></p></li></ul><p><span>As the number of events and external systems grows, delivering those events reliably becomes hard.</span></p><p><span>Someone has to handle failed requests, retries, duplicate deliveries, and track what was delivered &amp; what wasn&#8217;t.</span></p><p><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> handles this part of the stack&#8230;It provides the infrastructure for delivering webhook events to external systems, while the application stays focused on the agent itself.</span></p><p><span>Let&#8217;s understand the challenges of running webhook infrastructure reliably&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Challenges of Building Real-Time AI Agents</span></h2><p><span>A webhook integration usually works fine in testing&#8230;</span></p><p><span>You send an event, watch it arrive &amp; everything looks good, so you move on.</span></p><p><span>Once you put it into production, things change. Servers go down mid-deploy, networks drop packets for reasons that aren&#8217;t always obvious, and traffic suddenly comes in bursts instead of at a steady rate.</span></p><p><span>None of these things are unusual in production, but they expose problems that you simply don&#8217;t see when you&#8217;re testing with a handful of events.</span></p><p><span>Most of the problems fall into a few recurring areas.</span></p><p><span>Let&#8217;s dive in!</span></p><h3><span>1. Reliable Delivery</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ks37!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ks37!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ks37!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ks37!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ks37!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>An endpoint could go down during a production deploy&#8230;A webhook sent during that window then has nowhere to go.</span></p><p><span>You send it once and give up, and the event is gone. Whatever depended on it--an agent waiting to continue a workflow, or a customer expecting a receipt--never finds out anything happened at all.</span></p><p><span>Retries handle this; not by hammering the same failing endpoint over &amp; over.</span></p><p><span>Each attempt waits a little longer than the last, giving a struggling server time to recover before getting hit again. The event itself needs to sit somewhere durable while all this plays out too, so a crash on the sending side doesn&#8217;t erase it along the way.</span></p><p><span>And if every retry eventually runs out, the event needs somewhere to land instead of vanishing without a trace.</span></p><h3><span>2. Security and Verification</span></h3><p><span>Anyone who has the webhook endpoint&#8217;s URL could send a request.</span></p><p><span>Nothing about the endpoint itself tells the difference between a real event &amp; someone typing </span><code>curl</code><span> commands.</span></p><p><span>This is why legitimate events get signed before they&#8217;re sent. The receiving side checks the signature</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>. A mismatch rejects the event, thus preventing forged events. A timestamp on the request helps prevent an old, legitimate request from being captured &amp; resent later. Also signing secret needs to be managed &amp; rotated over time without breaking existing endpoints.</span></p><p><span>One risk lies on the sending side instead&#8230;</span></p><p><span>Sending a webhook means requesting a URL provided by someone else. An unchecked URL could point somewhere it should not, such as an internal system instead of a real customer endpoint.</span></p><p><span>Guarding against it matters as much as verifying what comes in.</span></p><h3><span>3. Idempotency and Duplicate Events</span></h3><p><span>Occasionally, an agent does everything right &amp; still sees the same event twice.</span></p><p><span>It is NOT a bug. A delivery succeeds at the receiving end, but the confirmation gets lost on its way back to the sender. The sender has no way to know the event actually landed, so it tries again, and the same event arrives twice.</span></p><p><span>For most systems, a duplicate log entry is harmless.</span></p><p><span>Yet for an agent taking real action, it isn&#8217;t. Processing the same payment confirmation twice can mean sending a receipt twice, or worse, acting on the same instruction twice. A stable ID attached to every event, unchanged across every retry, lets the consumer tell the difference.</span></p><p><span>See the same ID again, skip it &amp; move on.</span></p><h3><span>4. Backpressure, Traffic Bursts, and Isolation</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8eZP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8eZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 424w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 848w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1272w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png" width="1456" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8eZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 424w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 848w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1272w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Two hundred events landing over an </span><em><span>hour</span></em><span> looks nothing like two hundred events landing in the same </span><em><span>second</span></em><span>.</span></p><p>Agents create this kind of burst when they run many tasks in parallel.</p><p>An agent could start 200 tasks at once. If many finish around the same time, they could generate a burst of completion events instead of a steady stream.</p><p>A slow-responding endpoint quickly becomes a bottleneck.</p><p><span>Deliveries pile up, and the backlog can spread into the rest of the system. Throttling</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span> keeps this contained by limiting how fast events go out to any one destination.</span></p><p><span>Plus, isolating each endpoint from the others matters just as much, so a single customer&#8217;s bad day never becomes everyone else&#8217;s.</span></p><h3><span>5. Event Ordering</span></h3><p><span>Two letters mailed on the same morning don&#8217;t always arrive in the order they were sent&#8230;One gets held up somewhere, and the other doesn&#8217;t.</span></p><p><span>Webhook events work the same way.</span></p><p><span>Update a subscription, then cancel it a moment later. The update event might fail and get retried while the cancellation goes through immediately. The cancellation shows up first. An agent would assume events always arrive in </span><em><span>order</span></em><span>. If an update arrives late, it&#8217;ll process it last and believe a canceled subscription is still active.</span></p><p><span>Consumers shouldn&#8217;t assume events will always arrive in order.</span></p><p><span>Handling this well means checking each event&#8217;s timestamp/version number before acting. This is safer than trusting the order in which events arrive. When strict ordering matters, you can enforce it by controlling how events get processed.</span></p><p><span>This could add latency &amp; delay later events.</span></p><h3><span>6. Observability and Recovery</span></h3><p><em><span>When a customer says an agent never responded to their approval, what&#8217;s the actual answer?</span></em></p><p><span>Without logging, there isn&#8217;t one. Nobody can say whether the event got sent, whether it arrived, or what happened after. A working system tracks every delivery attempt, the response it got, and each endpoint's current status.</span></p><p><span>This turns a vague complaint into something checkable, an exact record of when an event went out, what came back, and how many times it was retried. And once whatever broke gets fixed, replay</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span> sends the same event again, closing the gap instead of leaving it there permanently.</span></p><p><span>Delivery, security, duplicates, bursts, ordering, visibility (and so on) need someone to solve each of these. You can build them yourself or use existing standards and infrastructure to handle the pieces you don&#8217;t want to own.</span></p><p><span>Let&#8217;s look at what a production-ready webhook needs to provide&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://link.svix.com/system-01">We are in the middle of the agentic AI era, please take advantage of it</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents can crush your app with compounding latency across workflows.</p><p>Your customers expect fast, efficient agent workflows. But if your agents keep polling for updates, you risk losing deals. Webhooks make workflows event-driven, but building reliable webhook infrastructure gets complicated fast.</p><p>If your homegrown webhooks have you waking up at 4 AM to fix failed deliveries, there&#8217;s a better way.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles retries, idempotency, security &amp; compliance for you.</p><p><em>Qualified startups get $12,000 in free credits.</em></p><p><strong><a href="https://link.svix.com/system-01"><mark data-color="#ffff00" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Get started for free &#187;</mark></a></strong></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Real-Time AI Agents Need to Stay Reliable</span></h2><p><span>You still need to handle all these problems when you put a real-time agent into production.</span></p><p><span>You need a consistent way to identify events, verify their source, and make sure old requests can&#8217;t be reused.</span></p><p><span>This is where standard webhooks help. It gives you a common way to handle the security and verification side of webhook delivery, instead of having to define your own format and rules.</span></p><p><span>Let&#8217;s start with how a webhook gets identified &amp; verified...</span></p><h3><span>Webhook Identity and Signatures</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ExL3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ExL3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 424w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 848w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1272w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png" width="1456" height="529" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fcda41ef-068f-4848-994e-433864bda036_1534x557.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:529,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ExL3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 424w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 848w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1272w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Every webhook carries a unique message ID, a timestamp showing when it was sent, and a signature that verifies its authenticity.</span></p><p><span>The signature itself uses </span><code>HMAC-SHA256</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p><p><span>It runs over the ID, timestamp, and raw payload</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span> together, using a secret known only to the sender and receiver. If you change even one character in the payload, then the signature no longer matches.</span></p><p><span>A receiver uses the same verification logic for any provider following the standard.</span></p><p><span>For an agent workflow, this means the application could verify an event before allowing it to trigger another action.</span></p><h3><span>Replay Protection and Key Rotation</span></h3><p><span>A valid signature proves a request came from the sender&#8230;yet it doesn&#8217;t prove the request is new&#8230;</span></p><p><span>Without a timestamp check, someone who captures a real request could resend it days later, and the signature would still pass. The receiver could enforce an acceptable timestamp window</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span>. This ensures a captured request eventually stops being usable.</span></p><p><span>Also secrets need to change occasionally, and a receiver still verifying against the old one shouldn&#8217;t break during the transition. The spec supports multiple signatures during secret rotation. This lets a receiver verify requests using either the old/new secret during the rotation window.</span></p><p><span>For an agent workflow, this matters when an event could trigger an action.</span></p><p><span>An old signed request shouldn&#8217;t be accepted as a new event just because its signature is still valid.</span></p><h3><span>Standardized Webhook Format</span></h3><p><span>A provider following the standard uses the </span><em><span>same</span></em><span> headers &amp; signing format.</span></p><p><span>Consumers could use one verification implementation across providers.</span></p><p><span>This is what makes interoperability</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><span> possible. A team building a receiver can use one verification path for events from different providers. There is no need to write custom logic for each one.</span></p><p><span>Following the spec doesn&#8217;t remove the need for infrastructure behind it, though. Something still has to run the queues, retries, and delivery logic day to day.</span></p><p><span>Let&#8217;s look at how </span><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> puts them into practice &amp; handles the infrastructure behind real-time AI agent events...</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Svix: Platform That Connects AI Agents to Outside World</span></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cH6K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cH6K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 424w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 848w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1272w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png" width="1456" height="547" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:547,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cH6K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 424w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 848w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1272w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Every piece covered so far, including retries, signing, replay, ordering, and observability, has to actually run somewhere. None of it is optional once real customers depend on your agent reacting to real events.</span></p><p><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> is built to be this somewhere.</span></p><p><span>Your application decides when something happened &amp; creates the event.</span></p><p><span>Svix handles delivery, including retries, security, and everything needed to get it to the right place reliably.</span></p><h3><span>How Svix Models Webhooks</span></h3><p><span>Svix tracks these for each webhook it sends</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><span>:</span></p><ul><li><p><span>Application: customer/tenant on your platform.</span></p></li><li><p><span>Endpoint: actual URL to which you&#8217;re sending the event.</span></p></li><li><p><span>Message: event itself.</span></p></li><li><p><span>Event type: kind of event, such as a payment clearing or a task finishing, and determines which endpoints receive it.</span></p></li></ul><p><span>An application could have many endpoints&#8230;One event can reach several destinations, and you can use event-type subscriptions to control which events an endpoint receives.</span></p><h3><span>How an Event Moves Through Svix</span></h3><p><span>There are two ways events move through a real-time agent system</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a><span>:</span></p><h4><span>1. O</span>utbound events</h4><p><span>The agent or application produces an event when something happens.</span></p><p><span>This could be a tool call finishing or a workflow reaching a new state. The application sends that event to Svix through the API, and Svix delivers it to the configured downstream endpoints.</span></p><h4>2. Inbound events</h4><p><span>Something happens in an external system, and it sends an event back to the application.</span></p><p><span>Svix Ingest</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a><span> receives incoming webhooks. The application then processes the event and decides what the agent should do next. This could mean starting a new workflow or continuing one that was waiting for that event.</span></p><p><span>In both cases, the delivery happens separately from the agent&#8217;s main workflow.</span></p><p><span>The application doesn&#8217;t need to keep a connection open while the event is being delivered. It can keep the workflow state &amp; handle the event when it arrives.</span></p><h3><span>Queues, Workers, and Storage</span></h3><p><span>Behind the scenes, events go into a queue</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><span> before they're delivered.</span></p><p><span>Once Svix accepts the event, separate workers handle delivery instead of making your application wait for it to finish.</span></p><p><span>The message &amp; its delivery state are stored along the way. This means a temporary problem at the destination doesn&#8217;t make the event disappear. You can retry or recover the delivery without keeping the original request open.</span></p><p><span>For an agent workflow that suddenly produces a hundred events at once, this matters.</span></p><p><span>Your application can hand those events to Svix without waiting for every downstream request to finish, while the delivery system works through them independently.</span></p><h3><span>How to implement Svix</span></h3><p><span>There are a couple of ways to get events into Svix</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><span>:</span></p><p><span>The simplest approach is to send them directly from your application whenever something happens. If you already have your own event system and/or queue, you don&#8217;t have to replace it. You could have the system forward the events to Svix when they&#8217;re ready to be delivered.</span></p><p><span>From there, you can create the applications, endpoints, and event types you need through the Svix API. The application represents the customer/tenant; endpoints define where their events should go, and event types describe the kinds of events they could receive.</span></p><p><span>Also you could give customers control over their own webhook setup through the Svix Application Portal. So they manage their endpoints and inspect delivery activity themselves, rather than coming back to your team every time something needs to change.</span></p><h3><span>Reliable Delivery</span></h3><p><span>The normal delivery path is straightforward when the destination is &#8220;healthy&#8221;&#8230;The harder part happens when it is not&#8230;</span></p><p><span>An endpoint could be down during a deployment, take too long to respond, or start returning errors for a while. </span><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> retries failed deliveries with backoff, giving the endpoint some time to recover instead of repeatedly sending requests at full speed.</span></p><p><span>If an endpoint keeps failing after retries are exhausted, you can recover the delivery once the underlying problem gets fixed.</span></p><h3><span>Security and Outbound Delivery</span></h3><p><span>Every event Svix sends gets signed&#8230;</span></p><p><span>So the receiving application could verify the webhook actually came from the expected sender &amp; has not been changed in transit. Also Svix includes a timestamp with the request. This could be checked along with the signature to prevent an old, valid request from being captured &amp; replayed later.</span></p><p><span>Signing secrets need to be changed from time to time as well.</span></p><p><span>Svix supports secret rotation by signing deliveries with both the old and new secret for 24 hours, thus giving endpoints time to switch to the new secret without interrupting delivery.</span></p><p><span>Also there is a risk on the other side of the connection.</span></p><p><span>Svix is making outbound requests to URLs provided by your customers, so those URLs can&#8217;t simply be trusted to point wherever they claim. Svix includes protections against server-side request forgery (</span><strong><span>SSRF</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><span>).</span></p><p><span>This helps prevent a webhook endpoint from reaching internal services or other destinations it shouldn&#8217;t be access</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a><span>.</span></p><h3><span>Observability and Scaling</span></h3><p><span>When a delivery fails, knowing that it failed is only the first part.</span></p><p><span>You also need to see what was sent, when it was sent, what the endpoint returned, and whether another attempt was made. Svix keeps a record of delivery attempts and their results, making it easier to see which endpoints are working &amp; which ones need attention.</span></p><p><span>As the number of events &amp; endpoints grow, some systems also need more control over how those events are delivered.</span></p><p><span>Svix supports ordered delivery when event order matters, throttling when a particular endpoint shouldn&#8217;t receive events too quickly, and payload transformations when different consumers need the same event in a different format.</span></p><p><span>Plus, it supports multi-region delivery for setups with regional or data residency</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a><span> requirements. These aren&#8217;t things every agent needs, but they become useful when the same event infrastructure has to serve larger or more distributed systems</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How Realtime AI Agents Handle Events and Actions</span></h2><p>Let&#8217;s look at what happens on the agent&#8217;s side once one of these events arrives&#8230;</p><h3><span>Tool Calling and Asynchronous Actions</span></h3><p><span>The model does not actually run the tool; your application does</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a><span>.</span></p><p><span>It decides which one to call &amp; what to pass into it. Most of the time, the result comes back before the model finishes forming its next sentence.</span></p><p><span>It isn&#8217;t always this quick, though&#8230;</span></p><p><span>Waiting on a slow third-party API or generating something heavy like a video can take minutes instead of seconds. And the application cannot keep the connection open for the entire process.</span></p><p><span>Once the result is ready, a completion event can tell the application to continue the workflow. The application can use the workflow/run ID stored with the agent&#8217;s state to find the right workflow and resume where it left off.</span></p><p><span>This event still needs reliable delivery to arrive successfully.</span></p><p><span>It uses the same durable delivery and retry logic covered earlier, but the trigger is a finished tool call instead of an external webhook.</span></p><h3><span>Agent Workflows and External Events</span></h3><p><span>An agent can also have workflows that depend on something happening outside its own application.</span></p><p><span>It might start a task and then wait for an external event before it can continue. Instead of constantly checking for updates, the agent can wait for that event and continue when it arrives.</span></p><p><span>For example, a coding agent might be waiting for an update to an issue before it can continue. Once that update arrives, the application can use the event to decide what the agent should do next.</span></p><p><span>Svix Ingest handles the incoming side of the workflow.</span></p><p><span>External systems send their webhooks to Ingest, which receives and verifies them before passing them to the application. The application can then use the event to start or continue the agent&#8217;s workflow.</span></p><p><span>As an agent works with more external systems, one place to handle incoming events means you don&#8217;t need separate webhook handling for each integration.</span></p><h3><span>Human-in-the-Loop Agents</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zQTd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zQTd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 424w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 848w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1272w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png" width="1456" height="369" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:369,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zQTd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 424w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 848w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1272w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Some decisions genuinely need a person behind them, not just an agent&#8217;s best guess</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><span>.</span></p><p><span>Say an agent drafts a refund &amp; needs someone to sign off before it actually goes out. It sends an event asking for approval and delivers it wherever the approver already works. This could be a Slack channel, an internal dashboard, or whatever&#8217;s already set up. The approval might not come for a day.</span></p><p><span>Once it does, the response comes back as an event too, and the workflow picks up right where it left off. Svix handles the delivery side by retrying failed deliveries and keeping a record of each attempt.</span></p><p><span>This means an approval sitting for a day doesn&#8217;t quietly vanish in transit.</span></p><h3><span>Local and Ephemeral Agents</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QNiA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QNiA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QNiA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Not every agent has a public URL sitting around waiting for traffic.</span></p><p><span>One running on somebody&#8217;s laptop, or spun up for a single task and torn down right after, usually has no stable endpoint for a provider to send a webhook to. Setting one up just for this rarely makes sense &amp; sometimes isn&#8217;t even possible depending on where the agent runs.</span></p><p><span>Polling gives the agent another option.</span></p><p><span>Events arrive through Ingest, but the agent retrieves them when it connects instead of exposing a public webhook endpoint. It reaches out on its own schedule, using an existing outbound connection.</span></p><p><span>And it pulls whatever is waiting instead of needing somewhere for events to land</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><span>.</span></p><h3><span>Designing Events for Agents</span></h3><p><span>Most of what an agent does internally never needs to become an event</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a><span>.</span></p><p><span>Whether a task actually finishes or an approval is requested matters more than every small decision along the way.</span></p><p><span>Naming matters here too:</span></p><p><code>agent.task.completed</code><span> tells anyone downstream exactly what happened. Something vague doesn&#8217;t, and now whoever&#8217;s consuming it is guessing. Svix keeps these event types in a catalog, so people integrating with your application can see which events are available &amp; what they represent.</span></p><p><span>Keep the payload limited to what a consumer actually needs. Version it if the shape changes, so existing consumers keep working.</span></p><p><span>All of this can be built by hand. At some point, though, it stops being a quick addition and turns into its own piece of infrastructure to maintain.</span></p><p><span>Let&#8217;s see how much of this infrastructure you actually want to own, and how much makes more sense to buy&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Build vs Buy for Realtime Agent Infrastructure</span></h2><p><span>Building a webhook endpoint yourself is not hard when it&#8217;s just your own systems talking to each other</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a><span>.</span></p><p><span>One service sends a request, another receives it, and if something breaks, you notice &amp; fix it. Yet once a customer is on the other end of this connection, the requirements start to change. Now they&#8217;re the ones who notice when a delivery fails, and they have no visibility into why or how to fix it.</span></p><p><span>A bug you&#8217;d normally get to eventually becomes a support ticket showing up today.</span></p><p><span>Handling a webhook for something internal is a tiny problem.</span></p><p><span>But handling it for a customer, reliably and at scale, is a much bigger problem. It&#8217;s worth being honest about which problem you&#8217;re actually solving before picking a path. The decision isn&#8217;t really about whether you can write a webhook endpoint.</span></p><p><span>It&#8217;s about how much of the surrounding infrastructure you want to own and maintain.</span></p><h3><span>Build Path</span></h3><p><span>Building your own makes sense in a few specific situations:</span></p><ul><li><p><span>Event volume is low, and only a handful of internal systems ever receive anything.</span></p></li><li><p><span>Requirements are specialized enough for no general-purpose tool to genuinely fit.</span></p></li><li><p><span>Reliability concerns, retries, durability, and observability are already handled by infrastructure you&#8217;re running for other reasons.</span></p></li><li><p><span>Webhook infrastructure itself is part of the core product you&#8217;re building, not something supporting it.</span></p></li></ul><p><span>None of these are edge cases nobody hits&#8230;Plenty of people genuinely sit in this exact spot, at least for a while.</span></p><h3><span>When Buying Makes Sense</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vdgk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>A simple webhook is enough for a small internal setup.</span></p><p><span>The need for managed infrastructure comes when those events become part of a customer-facing product &amp; you need more control over delivery:</span></p><ul><li><p><span>Customers receive these webhooks, not just an internal system.</span></p></li><li><p><span>Endpoints and integrations multiply past what&#8217;s easy to track by hand.</span></p></li><li><p><span>Reliability &amp; observability stop being nice extras and start being expected.</span></p></li><li><p><span>Engineering time spent maintaining webhook infrastructure is time not spent on your actual product.</span></p></li></ul><p><span>As the number of customers and integrations grows, so does the amount of infrastructure around each one.</span></p><p><span>Each customer has its own endpoint and delivery requirements. Also you need to handle delivery failures &amp; ensure events arrive reliably.</span></p><p><span>The first webhook endpoint is easy to build.</span></p><p><span>But the work piles up when you add retries, security, replay, observability, and a customer-facing portal. The challenge grows as you keep all those pieces working together. This cost doesn&#8217;t show up on day one. It shows up gradually, as more customers sign up and more reliability work gets pushed down the backlog.</span></p><p><span>It looks like nice-to-have work and never quite gets done.</span></p><p><span>Whichever path fits, the underlying job doesn&#8217;t change. Something still has to ensure an event actually reaches the agent when it&#8217;s supposed to.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Closing Thoughts</span></h2><p><span>A real-time agent feels almost ordinary once everything works.</span></p><p><span>It just seems to know what to do next, picking a workflow back up the moment something changes, with no one having to nudge it along.</span></p><p><span>But beneath that smoothness runs an entire delivery system quietly in the background. Every piece covered here exists to ensure an event reaches the agent every single time. No one needs to think about the machinery behind it.</span></p><p><span>At this point, you should have a clear picture of what&#8217;s actually holding this together:</span></p><ul><li><p><span>Webhooks are the mechanism, notifying the agent the moment something happens instead of making it check over and over</span></p></li><li><p><span>Reliable delivery, security, idempotency, ordering, and observability are what turn a single HTTP request into something production can actually depend on</span></p></li><li><p><span>Standard webhooks give senders and receivers a shared way to identify and verify events, instead of every provider inventing its own format.</span></p></li><li><p><span>Svix runs this entire delivery layer, so building an agent doesn&#8217;t also mean building a second system just to keep it connected to the world around it.</span></p></li></ul><p><span>Once you see it laid out this way, a real-time agent stops looking like one clever piece of code&#8230; It&#8217;s a model wired into a delivery system built specifically to make sure nothing it&#8217;s waiting on ever slips through.</span></p><p><span>Agents will only take on more of this over time.</span></p><p><span>They will wait for more things to happen outside the conversation. They will also react to more of them with nobody watching. And the more an agent takes on, the more its reliability depends on one thing nobody notices until it breaks.</span></p><p><span>The events it waits for must actually show up.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><a href="https://link.svix.com/system-01">Make your agents realtime</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Slow agent workflows kill the user experience &amp; can cost you deals.</p><p>Polling adds latency at every step. Webhooks let your agents react to events as they happen, but building reliable webhook infrastructure means dealing with retries, failed deliveries, security &amp; compliance.</p><p>If your homegrown webhooks keep breaking and waking you up at 4 AM, <strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles the hard parts for you.</p><p>Retries, idempotency, security &amp; compliance are built in.</p><p>Qualified startups get <strong>$</strong>12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p></div><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a> &amp; <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 7 October. Consider sharing this letter with your friends &amp; get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>An AI agent is a system that uses an AI model to reason about a task, decide what to do, and take actions through tools and/or external systems to achieve a goal. </p><p>You ask it something, and it doesn&#8217;t just answer once and stop. It reasons through the problem, decides what to do next, and keeps going until the task actually gets done. Along the way, it can call tools, read files, hit an API, or whatever the job needs.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>A mechanism that allows one system to automatically send an HTTP request to another system when a specific event happens, instead of requiring the source-receiving system to repeatedly check for changes.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>An AI model trained on large amounts of data that can understand and generate text. In AI agents, LLMs are used to reason about a task and decide what to do next.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>The repeated process an AI agent uses to decide what to do, perform an action, examine the result, and decide what to do next.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>A signal that something has happened, which can trigger an application or agent to take action without someone having to ask it again.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>The sender uses the HTTP response status to determine whether the delivery attempt succeeded or failed.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>A cryptographic value attached to a message that allows the receiver to verify that it came from the expected sender and was not modified.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>Throttling means limiting how fast requests or events are sent to a destination.</p><p>For example, suppose your system suddenly has 1,000 webhook events ready to send, but the receiving endpoint can safely handle only 100 requests per second.</p><p>Without throttling:</p><p><code>1,000 events &#8594; sent immediately &#8594; endpoint may overload</code></p><p>With throttling:</p><p><code>1,000 events &#8594; max 100/sec &#8594; endpoint</code></p><p>The remaining events wait and get delivered as capacity becomes available.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>The process of sending a previously delivered event again, usually to retry processing it after a failure or other issue has been fixed.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>A method for creating a cryptographic signature using a shared secret and the SHA-256 hashing algorithm. It allows the receiver to verify that a message came from someone who knows the shared secret and was not modified.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>The exact original data sent in a request before it is parsed, reformatted, or otherwise modified by the receiving application.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>An allowed period around the time a webhook was sent during which the receiver will accept the request. Requests outside this period can be rejected to reduce the risk of replay attacks.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>The ability of different systems or services to work together using shared standards or interfaces.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>Think of Svix like a mail delivery system for events.</p><p>Suppose your AI agent finishes a task and needs to notify a customer.</p><ul><li><p>Application = Who gets the mail<br>Usually represents a customer or tenant.<br>Example: <code>Acme</code></p></li><li><p>Endpoint = Where to send it<br>The customer&#8217;s webhook URL.<br>Example: <code>https://acme.com/webhooks</code></p></li><li><p>Message = What happened<br>The actual event and its data.<br>Example: <code>Task #123 finished</code></p></li><li><p>Event type = What kind of thing happened<br>A label describing the event.<br>Example: <code>agent.task.completed</code></p></li></ul><p>The event type also helps control which endpoints should receive which events.</p><ul><li><p><code>Acme</code> &#8594; Application</p></li><li><p><code>https://acme.com/webhooks</code> &#8594; Endpoint</p></li><li><p><code>Task #123 finished</code> &#8594; Message</p></li><li><p><code>agent.task.completed</code> &#8594; Event type</p></li></ul><p>Svix needs to know who should receive the event, where to send it, what happened, and what type of event it is.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><ul><li><p><strong>Outbound:</strong> Agent does something &#8594; app sends an event to Svix &#8594; Svix delivers it to other systems.</p></li><li><p><strong>Inbound:</strong> Something happens in another system &#8594; Svix Ingest receives the event &#8594; app gives it to the agent &#8594; agent starts or continues its work.</p></li><li><p><strong>Why this helps:</strong> The agent doesn&#8217;t need to wait with a connection open. The app saves the workflow state and continues when the event arrives.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>A Svix component for receiving incoming webhook events from external providers before they are passed into the application.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>Think of Svix like a delivery service with a waiting line:</p><ul><li><p><strong>Queue:</strong> Events wait here until they&#8217;re ready to be delivered.</p></li><li><p><strong>Workers:</strong> Pick events from the queue &amp; send them to the correct endpoints.</p></li><li><p><strong>Storage:</strong> Keeps the event and delivery status so they aren&#8217;t lost if something fails.</p></li><li><p><strong>Why it matters:</strong> Your app gives Svix the events and continues working. It doesn&#8217;t have to wait for every webhook to be delivered.</p></li><li><p><strong>If delivery fails:</strong> The event is still available, so delivery can be retried.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6b21577b-9e1c-49ea-821b-7c18e72b24f6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">App &#8594; Svix queue &#8594; Worker &#8594; Customer endpoint</code></pre></div><p>i.e., your app hands off the delivery work and moves on.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><ul><li><p><strong>Send events to Svix:</strong> Your app sends an event to Svix when something happens.</p></li><li><p><strong>Already have a queue?</strong> Keep it. Your queue can send events to Svix when they&#8217;re ready.</p></li><li><p><strong>Application:</strong> Usually represents your customer or tenant.</p></li><li><p><strong>Endpoint:</strong> The URL where that customer&#8217;s events should go.</p></li><li><p><strong>Event type:</strong> Describes what happened, such as <code>agent.task.completed</code>.</p></li><li><p><strong>Application Portal:</strong> Lets customers add/manage their own webhook endpoints and check deliveries.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;829919b2-631e-4a49-99a2-393f3c052a5a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Your app &#8594; Svix &#8594; Customer&#8217;s endpoint</code></pre></div><p>Svix handles the webhook delivery infrastructure for you.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p><strong>SSRF</strong> = Server-Side Request Forgery.</p><ul><li><p>A customer gives Svix a webhook URL.</p></li><li><p>Svix&#8217;s server sends HTTP requests to that URL.</p></li><li><p>A malicious customer could provide a URL pointing to a private/internal service instead of a legitimate webhook endpoint.</p></li><li><p>If Svix blindly sends the request, the attacker could use Svix to reach systems they couldn&#8217;t access directly.</p></li></ul><p>For example:</p><p><code>Attacker &#8594; malicious webhook URL &#8594; Svix server &#8594; private internal service</code></p><p>So SSRF protection checks/restricts where the server is allowed to send requests.</p><blockquote><p>A security vulnerability where an attacker tricks a server into making requests to URLs or internal services that the attacker normally wouldn't be able to access.</p></blockquote></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><ul><li><p><strong>Signature:</strong> Proves the webhook came from the expected sender &amp; wasn&#8217;t changed.</p></li><li><p><strong>Timestamp:</strong> Helps stop attackers from capturing a valid webhook &amp; sending it again later.</p></li><li><p><strong>Secret rotation:</strong> Lets you replace an old signing secret with a new one without breaking webhook delivery.</p></li><li><p><strong>SSRF protection:</strong> Stops malicious webhook URLs from making Svix access private/restricted systems.</p></li></ul><p>TLDR: Svix protects both the webhook receiver and the system sending the webhook.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>The requirement or practice of storing data within a specific geographic region or country, often because of legal, regulatory, or organizational requirements.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><ul><li><p><strong>Delivery logs:</strong> Show what Svix sent, when it sent it, what response came back, and whether it retried.</p></li><li><p><strong>Ordered delivery:</strong> Keeps events in the correct order when order matters.</p></li><li><p><strong>Throttling:</strong> Limits how quickly events are sent to an endpoint so it doesn&#8217;t get overwhelmed.</p></li><li><p><strong>Payload transformations:</strong> Changes an event&#8217;s format when different systems need different formats.</p></li><li><p><strong>Multi-region delivery:</strong> Helps deliver events across different geographic regions when needed.</p></li></ul><p>TLDR: Svix helps you see what happens to your webhooks and control how they&#8217;re delivered as your system grows.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><ul><li><p><strong>Model chooses the tool:</strong> It decides what tool to use and what information to send it.</p></li><li><p><strong>Application runs the tool:</strong> The application actually executes the tool call.</p></li><li><p><strong>Fast task:</strong> The result comes back quickly, and the agent continues.</p></li><li><p><strong>Slow task:</strong> Something like video generation could take minutes, so the workflow waits for the result.</p></li><li><p><strong>Completion event:</strong> When the task finishes, an event tells the application the result is ready.</p></li><li><p><strong>Resume:</strong> The application finds the saved workflow using its ID and continues the agent from where it stopped.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;7932170d-8269-45e7-a9e2-3661c980db03&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Agent &#8594; Start task &#8594; Wait &#8594; Completion event &#8594; Resume agent</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><ul><li><p><strong>Agent needs approval:</strong> Some actions are too important for the agent to decide alone.</p></li><li><p><strong>Agent asks a human:</strong> For example, it asks someone to approve a refund.</p></li><li><p><strong>Agent waits:</strong> The approval could take minutes, hours, or even a day.</p></li><li><p><strong>Human responds:</strong> The approval comes back as an event.</p></li><li><p><strong>Agent continues:</strong> The workflow resumes from where it stopped.</p></li><li><p><strong>Svix handles delivery:</strong> It retries failed webhook deliveries and tracks delivery attempts.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;af73141f-5acc-4c65-87d8-eac04a2999ab&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Agent &#8594; Ask for approval &#8594; Human decides &#8594; Approval event &#8594; Agent continues</code></pre></div><p>Svix is not inherently required for human-in-the-loop agents. You need it only if the approval workflow uses webhooks/events that need reliable delivery.</p><p>For your refund example, Svix could help in 2 places:</p><p><strong>1. Sending the approval request out</strong></p><p><code>Agent &#8594; Your app &#8594; Svix &#8594; Approval system</code></p><p>Svix makes sure the webhook reaches the external system. If delivery fails temporarily, Svix retries it.</p><p><strong>2. Receiving the approval back</strong></p><p>If you use Svix Ingest:</p><p><code>Approval system &#8594; Svix Ingest &#8594; Your app &#8594; Agent resumes</code></p><p>Svix Ingest receives the webhook &amp; reliably forwards it to your application.</p><p>So Svix&#8217;s job is event delivery, not approval logic. Your application still decides:</p><ul><li><p>when human approval is required</p></li><li><p>what the human is allowed to approve</p></li><li><p>how to save the paused workflow</p></li><li><p>what the agent does after approval</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><ul><li><p><strong>Problem:</strong> Some agents run on a laptop or exist only for a short time, so they don&#8217;t have a public URL where webhooks can reach them.</p></li><li><p><strong>External event happens:</strong> Event is received by Svix Ingest.</p></li><li><p><strong>Event waits:</strong> The local agent doesn&#8217;t need to be online when the event arrives.</p></li><li><p><strong>Agent checks for events:</strong> When the agent is ready, it connects outward to Svix &amp; retrieves the events waiting for it.</p></li><li><p><strong>Why this helps:</strong> You don&#8217;t need to expose your laptop or temporary agent to the internet with a public webhook endpoint.</p></li></ul><p>TLDR</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;52eb7af1-323b-429b-b8d7-ade717404261&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">External system &#8594; Svix Ingest &#8594; Event waits &#8594; Local agent retrieves it</code></pre></div><p>instead of:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;ef0eaaee-d0ad-401a-9aab-aee47e560ac3&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">External system &#8594; Public URL on your laptop &#8594; Agent</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><ul><li><p><strong>Don&#8217;t create events for everything:</strong> Only important changes need events, such as a task finishing or approval being requested.</p></li><li><p><strong>Use clear names:</strong> <code>agent.task.completed</code> clearly tells other systems what happened.</p></li><li><p><strong>Event catalog:</strong> Svix keeps a list of available event types so consumers know what events they can receive.</p></li><li><p><strong>Keep payloads small:</strong> Send only the data the receiving system needs.</p></li><li><p><strong>Version changes:</strong> If you change the event format, use versions so existing integrations don&#8217;t break.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><ul><li><p><strong>Internal webhooks are simpler:</strong> If both systems belong to you, you control both sides and can fix problems yourself.</p></li><li><p><strong>Customer webhooks are harder:</strong> Failed deliveries affect customers, so reliability matters much more.</p></li><li><p><strong>More infrastructure is needed:</strong> You may need retries, security, delivery logs, monitoring, and tools to recover failed events.</p></li><li><p><strong>Build:</strong> You create and maintain all of this infrastructure yourself.</p></li><li><p><strong>Buy:</strong> A webhook platform such as Svix handles much of the delivery infrastructure for you.</p></li></ul></div></div>]]></content:encoded></item><item><title><![CDATA[Spec Driven Development - A Deep Dive]]></title><description><![CDATA[#181: How AI Agents Build Enterprise Software at Scale]]></description><link>https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sun, 27 Sep 2026 10:41:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ee0924ba-6cd0-4ba9-b4af-376acd499583_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>AI agents can write code&#8230;</p><p>But enterprise software is where things get HARD.</p><p>Imagine you ask an AI agent to move task notifications to a new system while preserving users&#8217; existing notification preferences.</p><p>The AI agent writes code, runs tests&#8230;everything &#8220;passes&#8221;.</p><p>But a user who turned off email notifications now receives an email when someone assigns them a task.</p><p>The code passes tests, but it does NOT <em>behave</em> the way you want.</p><p>A simple fix is to give the AI agent<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> a <em>better</em> prompt:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;a85e344d-480e-4511-a6b2-9f1eebc379c0&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">- Keep current email behavior intact.
- Preserve existing notification preferences.
- Do not change unrelated notification flows.</code></pre></div><p>But a prompt has its limitations&#8230;</p><p>As the codebase gets bigger &amp; agent takes on extra work, it creates 3 new <em>serious problems</em>:</p><h4>1. Understand the existing system</h4><p>A prompt describes what you want.</p><p>But it does NOT automatically explain how an existing system works. The agent must understand the architecture, dependencies, business logic, feature flags, APIs, data models &amp; old behavior in the codebase (across repos).</p><p>Without this context, the agent would make a locally &#8220;correct change&#8221; that <em>breaks</em> something elsewhere&#8230;</p><h4>2. Build the right change</h4><p>If you add extra prompt instructions, the request becomes extremely difficult to manage.</p><p>The agent must then keep track of scope, constraints, edge cases, success criteria, &amp; dependencies across the entire task. While a vague/incomplete instruction can quietly turn into a wrong implementation.</p><p>This could multiply the mistake across many files and/or tasks&#8230;</p><h4>3. Trust autonomous work</h4><p>Agent autonomy = more work you trust it with.</p><p>The agent would read more code, call more tools<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, change more files, and run longer workflows. So you need controls on what it can access, what it can change, where it runs, how its output gets checked, and where a human must approve the work.</p><p>Yet a &#8220;longer prompt&#8221; does NOT solve any of these problems!&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Spec-Driven Development</h2><p>Spec-Driven Development (<strong>SDD</strong>) is a software development approach in which a specification defines intended behavior and guides planning, implementation &amp; validation.</p><p>i.e., you define &#8220;expected&#8221; behavior, scope, constraints &amp; success criteria <em>before</em> the agent starts to run.</p><p>Enterprise Agentic Software Development Lifecycle (Agentic <strong>SDLC</strong>) needs the exact same foundation:</p><ul><li><p>Full system context,</p></li><li><p>Clear specification,</p></li><li><p>Validation against intended result.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5FMg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5FMg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:897095,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5FMg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">SDD keeps intent connected to implementation.</figcaption></figure></div><p>I&#8217;ll use <strong><a href="https://blitzy.com/">Blitzy</a></strong> as the case study for this newsletter&#8230;</p><p>It&#8217;s an autonomous software development platform for the enterprise that turns what you want to build into a structured plan, then autonomously executes &amp; validates it.</p><p>i.e., you provide the requirements and intent, then review key decisions.</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> combines them with codebase context, creates the plan, executes the work with AI agents &amp; validates the result.</p><p>Let&#8217;s dive in!</p><h3>How Specification Guides Development</h3><p>Here are 3 roles<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> a specification plays in the software development lifecycle:</p><ul><li><p><strong>Spec-first:</strong> You write the specification before implementation begins, so you know what to build.</p></li><li><p><strong>Spec-anchored:</strong> You keep the specification connected to the software after implementation so it can guide future changes.</p></li><li><p><strong>Spec-as-source:</strong> You treat the specification as the human-edited source from which you can generate and/or regenerate downstream implementation artifacts (plans, tasks, tests).</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1S7Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.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;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A specification can guide development in three different ways.</figcaption></figure></div><p>Now let&#8217;s see how SDD<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> applies to our <em>notification system</em>&#8230;</p><p>You want to move task notifications to a new notification system. The request defines the goal, but the expected behavior still needs to be <em>explicit</em>.</p><p>So you define a specification:</p><ul><li><p><strong>Objective:</strong> Move task notifications to a new system.</p></li><li><p><strong>Scope:</strong> Move task-assignment &amp; task comment notifications. But leave billing notifications unchanged.</p></li><li><p><strong>Requirements:</strong> Preserve existing notification preferences &amp; delivery timing. And continue using the existing email service.</p></li><li><p><strong>Expected behavior:</strong> Check the user&#8217;s preferences before sending notifications. If email is enabled, queue an email through the new delivery path.</p></li><li><p><strong>Edge cases:</strong> Define what happens if delivery fails/assignee no longer belongs to the project.</p></li><li><p><strong>Acceptance criteria:</strong> Task notifications use the new system while existing user preferences continue to work correctly.</p></li></ul><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> combines these requirements with its understanding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> of the application across repositories.</p><p>Then it uses requirements &amp; codebase context to create an Agent Action Plan (<strong>AAP</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!glEO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!glEO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!glEO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1696981,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!glEO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!glEO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Requirements + system context &#8594; Agent Action Plan.</figcaption></figure></div><p>(We&#8217;ll learn how AAP works later&#8230;)</p><h3>Project Rules vs Generation Prompts</h3><p>A specification defines the change itself.</p><p>Yet agents need project-level instructions<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> on how to do the work&#8230;</p><p>Blitzy separates these concerns through Rules &amp; Generation prompts:</p><ul><li><p><strong>Rules:</strong> Project-wide instructions that apply whenever the agent works on the codebase, such as code style, testing &amp; security requirements.</p></li><li><p><strong>Generation prompt:</strong> Instructions for a specific change, such as its objective, scope, constraints, technical requirements &amp; success criteria.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aZN1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aZN1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3667328,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!aZN1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rules = reusable project-level instructions; Generation prompt = specific change to implement.</figcaption></figure></div><p>Here&#8217;s an example<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;b7865833-efbe-4b2e-9243-e7f903d8dbfe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Rule:
Every new piece of business logic must include tests.

Generation prompt:
Move task notifications to the new system while preserving
existing notification behavior and user preferences.</code></pre></div><h3>Requirements Clarification</h3><p>A BAD assumption gets exponentially <em>expensive</em> the further it travels&#8230;</p><p>An <em>unclear</em> requirement is easier to fix while the specification is still being edited. Otherwise, the agent would fill those gaps with &#8220;assumptions&#8221; and carry them into the plan &amp; implementation.</p><p>So you should look for these details:</p><ul><li><p>Who will use the feature,</p></li><li><p>How system should handle failures,</p></li><li><p>What falls inside &amp; outside the scope,</p></li><li><p>Which existing services should change,</p></li><li><p>What must remain backward compatible.</p></li></ul><p>This lets you separate unknowns from assumptions:</p><ul><li><p><strong>Unknown:</strong> You&#8217;re missing information to make a decision.</p></li><li><p><strong>Assumption:</strong> You make a guess because information is missing.</p></li></ul><p>Here&#8217;s a simple clarification process for you to follow:</p><ol><li><p>Draft the specification.</p></li><li><p>Identify missing/ambiguous requirements.</p></li><li><p>Resolve &amp; update the specification.</p></li><li><p>Review the updated specification.</p></li></ol><p>This process gives the agent clear requirements before it creates the implementation plan&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>1. Understand the Existing System</h2><p>The agent must first understand how the <em>existing</em> system works&#8230;</p><p>i.e., it needs the correct &#8220;system context<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a>&#8221;.</p><p>This is where Blitzy&#8217;s <em>Dynamic</em> <em>Knowledge Graph</em> becomes helpful.</p><p>It gives agents a global, dynamic understanding of the application across repositories&#8230; this includes architecture, dependencies &amp; code relationships.</p><p>Here&#8217;s how it works:</p><h3>Full System Context</h3><p>Imagine the <em>specification</em> says:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6d31569e-cb86-4f82-9cc8-44247723bde1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Task assignment should generate an in-app notification
for the assignee, unless the user has disabled that
notification type in their preferences.</code></pre></div><p>So the agent needs to find:</p><ul><li><p>Which components generate notifications</p></li><li><p>Where the system stores user preferences</p></li><li><p>Where the system handles task assignments</p></li><li><p>What depends on the current notification flow</p></li><li><p>Which services &amp; APIs connect these components</p></li></ul><p>&#8230; before changing the code.</p><p>And this becomes extremely HARD in large, complex existing<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a> codebases with many repos. Relevant logic could span services, background jobs, event listeners, feature flags, data models &amp; outdated documentation.</p><p>A larger context window is NOT enough&#8230; AI agent needs to identify &amp; retrieve parts of the codebase relevant to the requested change.</p><p><em>Here&#8217;s how Blitzy builds system-level understanding to solve this problem:</em></p><ol><li><p><strong>Analyze codebase:</strong> Blitzy analyzes code across multiple repositories to identify architecture, code patterns, terminology &amp; dependencies. (You can also exclude files &amp; directories with <code>.blitzyignore</code>.)</p></li><li><p><strong>Build a dynamic knowledge graph:</strong> Blitzy maps relationships across the codebase (relationships that span repos), including control flow, call graphs, inheritance hierarchies &amp; module dependencies.</p></li><li><p><strong>Generate a Technical Specification</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><strong>:</strong> Blitzy creates a current view of the codebase. This includes its architecture, dependencies, patterns &amp; domain terminology.</p></li></ol><p>The result is a global, dynamic understanding of the application that Blitzy&#8217;s agents can reference when planning, executing &amp; validating changes&#8230;</p><h3>Code Relationships</h3><p>Retrieval-Augmented Generation (<strong>RAG</strong>) retrieves relevant information &amp; adds it to the model&#8217;s context.</p><p>In a <em>codebase</em>, finding relevant files &amp; components is useful, but the agent also needs to understand how they connect!..</p><p>Consider the notification system that sends an email when someone gets assigned a task&#8230; Retrieval would find<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a>:</p><ul><li><p><code>Preferences</code></p></li><li><p><code>TaskAssignment</code></p></li><li><p><code>NotificationService</code></p></li></ul><p>You could represent their relationships using a <em><strong>dynamic</strong></em> <em><strong>knowledge graph</strong></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a>:</p><blockquote><p><em>Dynamic Knowledge graph</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><em> maps code components &amp; relationships such as calls, dependencies, inheritance, and control flow.</em></p></blockquote><p>Let&#8217;s look at how GraphRAG uses these relationships to retrieve context&#8230;</p><h4>Graph Retrieval-Augmented Generation</h4><p>&#8220;Relationships&#8221; become extremely useful when a single change affects <em>several parts</em> of the codebase.</p><p>Graph <span>Retrieval-Augmented Generation (</span><strong><span>GraphRAG</span></strong><span>) uses a graph to retrieve context based on the relationships between pieces of information</span>.</p><p>A traditional RAG would retrieve the relevant components&#8230;Each of them relevant on its own&#8230;</p><p>But graph-based retrieval shows &#8220;how they connect&#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_!aluC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aluC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!aluC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aluC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!aluC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><span>RAG retrieves similar chunks; GraphRAG retrieves connected context.</span></figcaption></figure></div><p>If the agent needs to change what happens when <em>&#8220;someone gets assigned a task&#8221;</em>, the graph could help it understand<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a>:</p><ul><li><p>What data it involves</p></li><li><p>Which components call each other</p></li><li><p>Which events flow through the system</p></li><li><p>Which downstream components it affects</p></li></ul><p>In an enterprise codebase with thousands of files across many repositories, finding these connections one file at a time is extremely HARD&#8230;</p><p>A graph gives the agent a simpler way to navigate the codebase &amp; retrieve the context<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a> it needs.</p><h4>Change Impact Analysis</h4><p>Finding the correct code is only one part of the problem&#8230;</p><p>The agent must also understand the <em>impact</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><em> of changing it</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Iq_6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:790798,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Retrieve the context that matters to the change.</figcaption></figure></div><p>Blitzy&#8217;s agents traverse Blitzy&#8217;s Dynamic Knowledge Graph in 2 directions:</p><ul><li><p><strong>Forward traversal</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><strong>:</strong> Starts from a function/component &amp; follows the call graph outward to understand what happens downstream.</p></li><li><p><strong>Reverse traversal</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><strong>:</strong> Moves backward through the graph to find which parts of the system call depend on a function/component.</p></li></ul><p>If the agent needs to change <code>NotificationService</code>, it can traverse forward to see what <code>NotificationService</code> calls and backward to see what calls/depends on <code>NotificationService</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3HDl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3HDl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1098511,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3HDl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Traverse both directions to understand change impact.</figcaption></figure></div><p>The key is understanding how the pieces connect, NOT just what exists.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>2. Build the Right Change</h2><p>The AI agent now needs to determine how to make the changes correctly...</p><p>i.e., it needs an &#8220;implementation plan&#8221;.</p><p><em>Ready for the best part?</em></p><h3>Agent Action Plan</h3><p>One BIG change can be broken into tiny tasks &amp; dependencies.</p><p>For notification system migration:</p><ul><li><p>Update the data model,</p></li><li><p>Update the delivery flow,</p></li><li><p>Integrate with task events,</p></li></ul><p>&#8230; and so on.</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> handles this with an Agent Action Plan<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a> (<strong>AAP</strong>).</p><p>It uses the generation request &amp; global codebase context from its Dynamic Knowledge Graph to construct the AAP. The Dynamic Knowledge Graph helps map dependencies &amp; analyze the impact of the proposed change before execution begins.</p><p>Blitzy then algorithmically sequences the work from the AAP based on those <em>dependencies</em>. This helps agents execute the required work in a &#8220;logical order&#8221;.</p><p>You can then review &amp; edit AAP before code generation begins.</p><p>This provides a checkpoint to catch incorrect assumptions, missing dependencies, and/or unnecessary changes before they become code.</p><h3>Scope and Blast Radius</h3><p>AAP defines what the agent should &amp; should NOT change.</p><p><em>Blast radius</em> describes which parts of the system a change/failure would affect. For example, changing <code>NotificationService</code> could affect every component that depends on it.</p><p>The specification can set scope boundaries<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a> for:</p><ul><li><p>Services,</p></li><li><p>Infrastructure,</p></li><li><p>Files &amp; directories,</p></li><li><p>Components that must remain unchanged.</p></li></ul><p>Blitzy supports these boundaries through generation requests &amp; repository exclusions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fy2Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:992217,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Blast radius shows which parts of the system a change would affect.</figcaption></figure></div><p>This helps keep the implementation within its intended scope&#8230;</p><h3>How Blitzy Agents Execute the Plan</h3><p>Once AAP is approved, Blitzy&#8217;s agents execute the planned work&#8230;</p><p>For a BIG change, Blitzy uses AAP to <em>sequence</em> work based on &#8220;task dependencies&#8221;.</p><p>Then independent tasks run in parallel, while dependent tasks wait until their prerequisites finish&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Znbw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Znbw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2219213,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Znbw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Run independent work in parallel. Respect task dependencies.</figcaption></figure></div><p>Each agent needs the context &amp; tools relevant to its task.</p><p>Also, agents need to stay aligned with requirements &amp; codebase context so their changes work together across repositories.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C6KY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C6KY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.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;:820028,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.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_!C6KY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An orchestrator distributes work across agents, manages dependencies &amp; combines results for validation.</figcaption></figure></div><p>Blitzy&#8217;s orchestration layer coordinates<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a> specialized agents across architecture, implementation, testing, debugging, validation &amp; integration.</p><p>The resulting changes then get combined &amp; checked as a complete implementation<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a>.</p><h3>Verification and Validation</h3><p><span>AI agent can implement the plan, pass tests, but still&nbsp;</span><em><span>miss</span></em><span>&nbsp;a &#8220;requirement.&#8221;</span></p><p>So the result needs to be checked against technical requirements &amp; intended use:</p><ul><li><p><strong>Verification:</strong> Check if implementation conforms to its defined requirements.</p></li><li><p><strong>Validation:</strong> Check if resulting software satisfies its intended use &amp; user needs.</p></li></ul><p>Testing can occur at different levels:</p><ul><li><p><strong>Unit tests:</strong> Check individual components.</p></li><li><p><strong>Integration tests:</strong> Check whether components work together.</p></li><li><p><strong>End-to-end tests:</strong> Check complete workflows.</p></li><li><p><strong>Acceptance tests:</strong> Check whether software meets defined requirements &amp; user/business needs.</p></li></ul><p>But automated tests only catch behaviors they actually check&#8230;</p><p>An extra review is needed to identify missing requirements and/or problems outside test coverage&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7D-g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7D-g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.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;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7D-g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Verification checks conformance to requirements, while validation checks whether software meets its intended use.</figcaption></figure></div><p>Blitzy combines human oversight with automated validation throughout the development process:</p><ul><li><p><strong>AAP review</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><strong>:</strong> You review implementation plan before code generation begins.</p></li><li><p><strong>Automated validation</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><strong>:</strong> Blitzy checks generated code using signals such as builds, tests, benchmarks &amp; CI checks<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a>.</p></li><li><p><strong>Project Guide &amp; code review:</strong> Blitzy generates a Project Guide<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a> with each pull request. This shows what got built, which requirements were addressed, and what work remains. <mark data-color="#ffe599" style="background-color: rgb(255, 229, 153); color: rgb(0, 0, 0);">PR Review</mark> then organizes changes into logical groups, explains why Blitzy made each change alongside the diff &amp; surfaces relevant testing and QA results. This helps you review what changed, why it changed &amp; how it was validated before deciding whether to merge.</p></li></ul><p>i.e., passing tests alone is NOT enough&#8230;</p><p>The final implementation should be reviewed against the original requirements, scope &amp; expected behavior.</p><h3>Drift Check</h3><p>As agents implement changes, code can <em>drift</em> from the original specification&#8230;</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> prevents this drift during execution by orchestrating spec-adherence agents that continuously check generated work against approved requirements. It validates outputs at multiple levels, from individual files through end-to-end testing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dM0k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dM0k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.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;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!dM0k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Compare what you approved with what Blitzy built.</figcaption></figure></div><p>This approach helps to find:</p><ul><li><p>Incomplete work,</p></li><li><p>Missing requirements,</p></li><li><p>Changes outside agreed scope,</p></li><li><p>Remaining work that needs attention.</p></li></ul><p>You make the final merge decision.</p><p>You review &amp; test the generated changes, identify remaining gaps, and decide whether to merge the pull request or request extra changes.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>3. Autonomous Work</h2><p>As AI agents take on more work autonomously, you need to control what they can access, what actions they can take &amp; when humans should step in.</p><p>Onward.</p><h3>Security and Governance</h3><p>Start with permissions:</p><ul><li><p><strong>Repository access:</strong> Limit which code agent can access.</p></li><li><p><strong>Tool access:</strong> Limit which tools &amp; operations it can use.</p></li><li><p><strong>Network access:</strong> Limit which external systems it can reach.</p></li><li><p><strong>Least privilege:</strong> Give AI agent only the permissions required for its task.</p></li></ul><p>The agent also needs to distinguish trusted instructions from <em>retrieved</em> content&#8230;</p><p>Code, comments &amp; documentation can contain instruction-like text. So treat retrieved content as data, and NOT trusted instructions. This reduces prompt injection<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-28" href="#footnote-28" target="_self">28</a> risk.</p><p>Plus controls must continue after deployment<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-29" href="#footnote-29" target="_self">29</a>&#8230; Monitoring helps detect <em>unexpected</em> behavior that only appears in production.</p><p><em>Blitzy applies several enterprise controls across its development workflow:</em></p><ul><li><p><strong>Data security:</strong> Customer data is encrypted in transit &amp; at rest. Customer code is not used for model training/stored directly.</p></li><li><p><strong>Isolated execution:</strong> Code generation runs in an air-gapped environment with an inbound-only VPC architecture<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-30" href="#footnote-30" target="_self">30</a>.</p></li><li><p><strong>Deployment options:</strong> Blitzy supports cloud, VPC, black-box VPC, on-premises &amp; black-box on-premises deployments.</p></li><li><p><strong>Human review:</strong> You review the Technical Specification, approve the AAP before code generation &amp; review generated changes before merge.</p></li><li><p><strong>QA:</strong> Multiple QA agents review generated work before delivery. Customers perform their own QA &amp; security testing before deployment.</p></li><li><p><strong>Compliance:</strong> Blitzy maintains SOC 2 Type II compliance &amp; ISO 27001 certification<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-31" href="#footnote-31" target="_self">31</a>.</p></li></ul><p>These controls put boundaries around what autonomous agents can access, execute &amp; ship&#8230;</p><h3>Human Oversight</h3><p>Human oversight defines when people need to review/intervene.</p><p>Here are two popular approaches:</p><ul><li><p><strong>Human-in-the-loop:</strong> A person must participate at specific decision points before the agent can continue.</p></li><li><p><strong><span>Human-on-the-loop:</span></strong><span>&nbsp;The agent operates more </span><em><span>autonomously</span></em><span> while a person supervises the process &amp; intervenes if necessary.</span></p></li></ul><p>A development workflow can use both&#8230;</p><p>You review specifications, approve the plan, review security-sensitive changes, &amp; make the final release decision.</p><p><em>Blitzy uses human review at key stages:</em></p><ul><li><p>Its Agent Action Plan creates a review point before code generation.</p></li><li><p>After generation, automated checks use tests, benchmarks, builds, and other signals to assess the result.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fhwl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.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;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">As risk increases, agent autonomy decreases &amp; human oversight increases.</figcaption></figure></div><p>Yet some changes need closer review because mistakes can have massive consequences:</p><ul><li><p>External system integrations</p></li><li><p>Data persistence &amp; migrations</p></li><li><p>Regulatory/contractual business logic</p></li><li><p>Authentication &amp; session management</p></li></ul><p>These areas benefit from review by engineers, architects and/or domain experts who understand the relevant system &amp; requirements.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Blitzy SDD Workflow</h2><p>You&#8217;ve now seen the key parts of the SDD workflow.</p><p><em>But how does Blitzy bring them together into one development process?</em></p><p>Here&#8217;s how:</p><ol><li><p><strong>Codebase Onboarding:</strong> Blitzy analyzes the existing codebase across multiple repositories &amp; builds a dynamic Knowledge Graph of its architecture, dependencies &amp; relationships.</p></li><li><p><strong>Technical Specification:</strong> Blitzy generates a living Technical Specification to give you a view of its understanding of the existing codebase across repositories.</p></li><li><p><strong>Requirements:</strong> You write a generation prompt to describe what you want to build/change in Blitzy&#8217;s Workspace. You define the objective, scope, technical requirements, constraints &amp; success criteria &amp; attach supporting files when needed. </p></li><li><p><strong>Agent Action Plan:</strong> Blitzy combines the generation request with <em>global</em> codebase context to create an AAP. This defines the implementation approach, scope, dependencies &amp; required code changes.</p></li><li><p><strong>Plan review:</strong> You review, edit &amp; approve AAP before code generation.</p></li><li><p><strong>Multi-agent execution:</strong> Blitzy orchestrates specialized AI agents across different models to implement the plan. The agents work on different parts of the project.</p></li><li><p><strong>Validation:</strong> Blitzy orchestrates spec-adherence agents during execution &amp; validates outputs at multiple levels, from individual files through end-to-end testing.</p></li><li><p><strong>Review handoff:</strong> Blitzy delivers the generated changes with a Project Guide that explains what was built &amp; what work remains.</p></li><li><p><strong><span>Human review:</span></strong><span>&nbsp;You review the results, perform any remaining tasks based on the next step guide &amp; decide whether the pull request reaches production.</span></p></li></ol><p>Thus the requirements remain connected to the implementation throughout the workflow&#8230; and help to prevent the original intent from getting lost&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Final Thoughts</span></h2><p>Blitzy shows what an SDD workflow can enable: <em>AI agents can take on enterprise software changes while you keep control of the outcome.</em></p><p>Blitzy connects these steps through codebase understanding, Agent Action Plans, multi-agent execution, validation &amp; review.</p><p>You can reuse these ideas to build AI agents&#8230;</p><p>But implementing them at enterprise scale is hard. This is why I loved using Blitzy<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-32" href="#footnote-32" target="_self">32</a>, and you should try it too.</p><div class="callout-block" data-callout="true"><p>Eligible organizations can try Blitzy at no cost with up to 1M lines of code reverse-engineered, 25K lines of code forward-engineered, and built-in Proactive Insights to identify and prioritize risks across the software estate.</p><p><strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Try Blitzy on your codebase &#187;</a></strong></p></div><p>Thank you for reading.</p><p>&#8211; Neo</p><div><hr></div><p>If you find this newsletter valuable, share it with a friend and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me on <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 29 September. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3>References</h3><ul><li><p><a href="https://docs.blitzy.com/introduction">Blitzy - Introduction - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/tech-spec-review">Blitzy - Tech Spec Review - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/aap-review">Blitzy - AAP Review - Blitzy Documentation</a></p></li><li><p><a href="https://arxiv.org/abs/2005.11401">Lewis, Patrick, et al. - Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks - arXiv:2005.11401</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/spec-driven.md">GitHub Spec Kit - Spec-Driven Development - GitHub</a></p></li><li><p><a href="https://github.github.io/spec-kit/reference/overview.html">GitHub Spec Kit - Reference - GitHub Pages</a></p></li><li><p><a href="https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/">Microsoft Research - GraphRAG: Unlocking LLM Discovery on Narrative Private Data - Microsoft</a></p></li><li><p><a href="https://genai.owasp.org/llm-top-10/">OWASP GenAI Security Project - OWASP Top 10 for LLM Applications 2025 - OWASP</a></p></li><li><p><a href="https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/">OWASP GenAI Security Project - OWASP Top 10 for Agentic Applications 2026 - OWASP</a></p></li><li><p><a href="https://blitzy.com/security">Blitzy - Security - Trusted AI Software - Blitzy</a></p></li><li><p><a href="https://docs.blitzy.com/prompt-engineering/generation">Blitzy - Generation - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/prompt-engineering/validation-checklist">Blitzy - Validation Checklist - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/project-guide-review">Blitzy - Project Guide Review - Blitzy Documentation</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/.specify/memory/constitution.md">GitHub Spec Kit - Constitution - GitHub</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/templates/commands/converge.md">GitHub Spec Kit - Converge Command - GitHub</a></p></li><li><p><a href="https://docs.blitzy.com/quickstart">Blitzy - Quickstart - Blitzy Documentation</a></p></li><li><p><a href="https://paper.blitzy.com/blitzy_system_2_ai_platform_topping_swe_bench_verified.pdf">Blitzy - System 2 AI Platform: Topping SWE-Bench Verified - Blitzy</a></p></li><li><p><a href="https://blitzy.com/blog/blitzy-scores-a-record-84-95-on-swe-bench-pro">Blitzy - Blitzy Scores a Record 84.95% on SWE-Bench Pro - Blitzy Blog</a></p></li><li><p><a href="https://www.cxotalk.com/episode/autonomous-software-development-at-enterprise-scale-inside-a-1-000-developer-pilot-with-blitzy">CXOTalk - Autonomous Software Development at Enterprise Scale: Inside a 1,000-Developer Pilot with Blitzy - Episode 918</a></p></li><li><p><a href="https://www.youtube.com/watch?v=FYwt9jKHFfc">YouTube - How Agentic SDLC Turned a 5-Month Project Into 5 Days with Brian Elliott and Tom Jackson</a></p></li><li><p><a href="https://blitzy.com/blog/taking-the-long-and-less-traveled-road-is-the-only-path-to-autonomy">Blitzy - Taking the Long and Less-Traveled Road Is the Only Path to Autonomy - Blitzy Blog</a></p></li><li><p><a href="https://www.tipranks.com/news/private-companies/blitzy-showcases-qad-case-study-highlighting-3x-5x-gains-in-software-development-velocity">TipRanks - Blitzy Showcases QAD Case Study Highlighting 3x-5x Gains in Software Development Velocity - TipRanks</a></p></li><li><p><a href="https://blitzy.com/blog/hello-world-the-blitzy-c-compiler-has-arrived">Blitzy - Hello World! The Blitzy C Compiler Has Arrived - Blitzy Blog</a></p></li><li><p><a href="https://blitzy.com/blog/a-quick-blitzy-chat-3-codebases-takes-on-prompting">Blitzy - A Quick Blitzy Chat: 3 Codebases Take on Prompting - Blitzy Blog</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/newsletters/2026-June.md">GitHub Spec Kit - June 2026 Newsletter</a></p></li><li><p><a href="https://arxiv.org/abs/2108.09293">Pearce, Hammond, et al. - Asleep at the Keyboard? Assessing the Security of GitHub Copilot&#8217;s Code Contributions - arXiv:2108.09293</a></p></li><li><p><a href="https://trust.blitzy.com/">Blitzy - Trust Center</a></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>An AI agent is a software system that uses an AI model to decide what actions to take, use tools &amp; execute multi-step tasks toward a goal.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Tool: An external capability an AI agent can call to retrieve information or perform an action.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Think of ordering a burger at a restaurant:</p><ul><li><p><strong>Spec-first:</strong> You place your order before the kitchen starts cooking.</p></li><li><p><strong>Spec-anchored:</strong> Your order remains the reference as the meal is prepared, and if the order changes.</p></li><li><p><strong>Spec-as-source:</strong> You change the order itself, and the kitchen uses the updated order to produce the meal again.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><h4>What SDD Still Hasn&#8217;t Solved</h4><p>SDD gives engineering teams a structured way to move from requirements to implementation, but some practical questions remain:</p><ul><li><p><strong>How much autonomy should an agent have?</strong> A reversible, low-risk change may need less oversight. A change to a critical system may require tighter limits and more human review.</p></li><li><p><strong>How do specifications stay aligned with code?</strong> If the implementation changes, the specification needs to change with it. When they disagree, someone still has to decide which one reflects the intended behavior.</p></li><li><p><strong>How do you provide the right context?</strong> The information an agent needs can vary significantly from one task to another. Teams need reliable ways to provide and maintain that context.</p></li><li><p><strong>How do you know SDD is working?</strong> Possible measures include correctness, development time, rework, defects, and human review effort. The challenge is deciding which ones matter for a particular team.</p></li><li><p><strong>Who owns all of this?</strong> SDD adds work beyond writing code. Specifications, system context, validation, and governance must be maintained alongside implementation. How teams divide those responsibilities will shape how SDD works in practice.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>The specification defines the behavior you want, but Blitzy also needs to understand the codebase it will change&#8230;</p><p>For an existing codebase, Blitzy first ingests the code &amp; builds a structured representation of its architecture, dependencies, and existing behavior. It also produces a living <strong>Technical Specification</strong> that gives you a reviewable view of its understanding of the system.</p><p>When you submit your requirements, Blitzy analyzes them against this codebase context.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><strong>Agent Action Plan (AAP)</strong> is Blitzy&#8217;s implementation blueprint that defines the code changes, dependencies, design decisions, and scope agents will follow during code generation.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Project-level instructions are reusable rules that apply across the project, rather than requirements for one specific feature.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>For notification migration, the generation prompt could define which task events create notifications, who receives them, which channels deliver them, and how the existing notification flow should behave during the migration.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Shows how the existing codebase works &amp; where the change fits.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>Brownfield development: the agent is working within an existing system rather than starting from scratch. You point an AI agent at your application&#8217;s repository (or repos).</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>Blitzy uses this context to provide a queryable view of the codebase&#8217;s architecture, dependencies, patterns, and conventions.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>TaskAssignment triggers an event. Another component handles the event and calls NotificationService. That service triggers EmailWorker, which checks Preferences before sending the email.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>A knowledge graph represents both:</p><ul><li><p>What exists</p></li><li><p>How those things connect</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>This gives the AI agent something closer to a map of the codebase than a list of files.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><p>This helps the agent understand the impact of a change: If it changes <code>TaskAssignment</code>, it can find which downstream components might be affected.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>Relevant components and the relationships between them.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>A component can be relevant because it calls the code being changed, consumes an event it produces, shares the same data model, or relies on its current behavior. Finding these relationships means understanding how different parts of the codebase connect, not simply reading more files.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><p>Blitzy describes this as following an execution thread forward from a seed function.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p>Blitzy describes this as useful for impact analysis.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><p>Agent Action Plan (<strong>AAP</strong>) is Blitzy&#8217;s implementation plan for a development task.</p><p>It defines how Blitzy&#8217;s agents will implement the requested change, including relevant code changes, files, dependencies, design decisions, and scope.</p><ul><li><p>Generation request = what you want changed</p></li><li><p>AAP = how Blitzy plans to make that change</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>The specification can define what the agent can change &amp; what must remain untouched.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><p>The orchestration layer can dynamically plan, spawn, and coordinate specialized agents, while parallelizing the Agent Action Plan into workstreams covering architecture, implementation, testing, debugging, validation, and integration.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><h4>Real-World Example: BCC</h4><p>Blitzy built <em>BCC, a Rust-based C compiler</em>, with 229,983 lines of Rust across 129 source files and 14 SIMD headers. The project coordinated <strong>3,600+ agents across 127 files</strong> and produced <strong>2,271 passing tests</strong>.</p><p>The example shows Blitzy&#8217;s multi-agent approach at project scale: agents work across different parts of the codebase, and testing validates the combined implementation.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><p><strong>AAP review:</strong> Before code generation, you review the plan for requirement coverage, scope, dependencies, design decisions, edge cases, and expected changes. An incomplete AAP can lead to incomplete code.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><p><strong>Build &amp; test:</strong> After code generation, you build &amp; test changes to verify the implementation behaves as described, rather than only checking whether the code compiles.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><p>CI checks: Automated Continuous Integration checks that verify code changes build, pass tests &amp; meet quality rules before they&#8217;re merged.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><p>The Project Guide makes this comparison more structured.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-28" href="#footnote-anchor-28" class="footnote-number" contenteditable="false" target="_self">28</a><div class="footnote-content"><p><strong>Prompt injection:</strong> Malicious or untrusted content that tries to manipulate an AI agent into following unintended instructions.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-29" href="#footnote-anchor-29" class="footnote-number" contenteditable="false" target="_self">29</a><div class="footnote-content"><p>NIST describes post-deployment monitoring as important for checking whether AI systems continue to operate as expected and for identifying unforeseen outputs and consequences.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-30" href="#footnote-anchor-30" class="footnote-number" contenteditable="false" target="_self">30</a><div class="footnote-content"><p><strong>Inbound-only Virtual Private Cloud (VPC) architecture:</strong> Your system can receive approved incoming connections, but it cannot freely connect out to the internet or external systems.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-31" href="#footnote-anchor-31" class="footnote-number" contenteditable="false" target="_self">31</a><div class="footnote-content"><ul><li><p><strong>SOC 2 Type II compliance:</strong> Shows a company&#8217;s security controls have been independently audited and found to operate effectively over a period of time.</p></li><li><p><strong>International Organization for Standardization (ISO) 27001 certification:</strong> Shows a company follows an independently audited standard for managing information security.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-32" href="#footnote-anchor-32" class="footnote-number" contenteditable="false" target="_self">32</a><div class="footnote-content"><p><em>Thanks to Blitzy for partnering on this newsletter and sharing highly valuable information.</em></p></div></div>]]></content:encoded></item><item><title><![CDATA[One Claude Is Not Enough. I Spawned an AI Team and Let It Manage Itself]]></title><description><![CDATA[#180: Part 3 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 21 Sep 2026 12:29:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e7e98f34-9872-4671-916d-7c56936ae656_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>You paste your prompt into Claude Code and wait for the answer.</span></p><p><span>i.e., one agent gets one task &amp; you wait for it to finish.</span></p><p><span>But what if your task is more complicated than this?</span></p><p><span>Let&#8217;s say you&#8217;re building a feature that needs both backend &amp; frontend code, connected to each other.</span></p><p><em><span>Did you know you can assign multiple agents with different instructions &amp; have them work in parallel?</span></em></p><p><span>Let&#8217;s get started with the fundamentals&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.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;:1099878,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/215411410?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1456w" sizes="auto, 100vw" loading="lazy" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Sep 23 (FREE)</a></strong> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>The two ways to run more than one Claude at once.</strong> Subagents and agent teams, and why they solve different kinds of problems.</p></li><li><p><strong>What a subagent actually gives you.</strong> An isolated worker with its own context window, plus the report-back model that keeps your main session clean and your token cost low.</p></li><li><p><strong>Why agent teams cost more, and when that&#8217;s worth it.</strong> The tradeoffs around token usage, coordination, and when tasks with real handoffs justify a full team instead of parallel subagents.</p></li><li><p><strong>What changes when agents need to share the same repo.</strong> Git worktrees, a shared CLAUDE.md as the coordination layer, and the enforcement that keeps three agents from stepping on each other&#8217;s files.</p></li><li><p><strong>Where hooks and the Writer/Reviewer pattern fit in.</strong> What they catch, when they fire, and how they compare with relying on CLAUDE.md alone when you need work validated automatically.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></em></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></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Subagents, isolated workers</span></h2><p><span>A subagent</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span> is a second Claude, with its own context window, its own limits, and its own set of instructions</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>.</span></p><p><span>It works independently &amp; returns the results. You can create it when you have a side task and/or when you want more than one specified Claude working in parallel.</span></p><p><span>Let&#8217;s say you&#8217;ll test your website, and you want to check two different things at once. One subagent tests </span><em><span>&#8220;AI Labs,&#8221;</span></em><span> and another tests </span><em><span>&#8220;AI Academy&#8221; </span></em><span>Page.</span></p><p><span>They run in parallel, each in its own window, and you read two short reports instead of one long mess.</span></p><p><span>Let me show you my website;</span> I improve its pages often.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PPNh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PPNh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 424w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 848w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png" width="1456" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PPNh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 424w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 848w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>So after every change, I assign two agents, one to each page, using this prompt.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;a9b074a2-6f60-4ff2-9556-ebb2275e1d30&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Create two subagents and run them in parallel.

One opens the AI Labs page in Chrome and reports layout or console problems,
the other does the same for AI Academy, and each reports its issues separately.</code></pre></div><p><span>After pasting the prompt, it assigns two agents that run in parallel.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lZK_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 424w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 848w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1272w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png" width="1456" height="154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:154,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lZK_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 424w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 848w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1272w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>They're testing websites as we speak.</span></p><p><span>They took screenshots, found issues, and solved them.</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_!kPXD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kPXD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 424w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 848w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1272w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png" width="1456" height="540" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:540,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kPXD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 424w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 848w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1272w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Here is the final report:</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1YDa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 424w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 848w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1272w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png" width="1456" height="304" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:304,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1YDa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 424w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 848w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1272w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>I approved the fixes.</span></p><p><span>But what if I want these agents to work in sequence and pass their work to one another? Then I should use </span><em><span>agent orchestration</span></em><span>&#8230;</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Agent Orchestration</span></h2><p><span>Agent orchestration</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> turns separate Claudes into a team.</span></p><p><span>It turns your Claude into the team, spawns teammates, hands out tasks, and collects the results. And here teammates talk to each other, share tasks, and pass work.</span></p><p><span>Agent teams</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> are experimental and off by default.</span></p><p><span>So if you have not enabled them yet, just tell Claude:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;64542ed3-a798-4270-827a-1f7b5385fcd8&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to my settings.json

if it is not set already, then confirm it is active.</code></pre></div><p><span>After you paste the prompt, Claude asks for your approval to change the file; once you approve it, you can use Claude agent orchestration.</span></p><p><span>Let&#8217;s create one, and a fun one:</span></p><p><span>Boids</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> is the classic flocking algorithm, where three simple rules make hundreds of dots move like a flock of birds. One teammate researches the rules, the second verifies every claim, and the third builds only from what survives.</span></p><p><span>Paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;70c01651-4bc8-4ca7-b139-b270376a6bb5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Spawn three teammates working in sequence.

The first researches the boids flocking algorithm
and its three rules from the original sources,
and writes the findings to findings.md.

The second waits,
verifies every claim in the file against the sources,
and marks each one as confirmed or wrong.

The third waits for the review,
then builds a single HTML page where hundreds of boids flock live on screen,
using only the confirmed.</code></pre></div><p><span>Now, Claude assigns the researcher agent first.</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_!fbCN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fbCN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 424w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 848w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png" width="1456" height="1259" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1259,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fbCN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 424w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 848w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>After approving it, I clicked </span><em><span>&#8220;Research boids algorithm,&#8221;</span></em><span> and it opened a side tab showing this agent&#8217;s instructions.</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_!AkWP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AkWP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 424w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 848w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png" width="1456" height="717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:717,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AkWP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 424w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 848w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>If you click on </span><em><span>&#8220;Browsed the web, used a tool&#8221;,</span></em><span> it&#8217;ll show you the progress.</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_!dpM7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dpM7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 424w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 848w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1272w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png" width="1456" height="1226" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1226,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dpM7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 424w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 848w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1272w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Step 1 is finished, and the research file is being created.</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_!Xw9r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>And next, the verifier starts working&#8230;</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_!Jetp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jetp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jetp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Now the builder starts building the app&#8230;</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_!CMVC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CMVC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CMVC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" class="icon-noB79L"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><span>Here is the full version of this website, visualizing the boids flocking algorithm:</span></p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;1586eb33-a98b-4e09-aaa9-621a44316d41&quot;,&quot;duration&quot;:null}"></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Subagents vs orchestration</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>