<?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[Fullstack Engineering]]></title><description><![CDATA[Simple system design for well-rounded engineers.]]></description><link>https://newsletter.fullstack.zip</link><image><url>https://substackcdn.com/image/fetch/$s_!34Kn!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cb884e3-ce55-4d1a-b2a5-59e41bf8c9c8_500x500.png</url><title>Fullstack Engineering</title><link>https://newsletter.fullstack.zip</link></image><generator>Substack</generator><lastBuildDate>Wed, 15 Apr 2026 16:18:10 GMT</lastBuildDate><atom:link href="https://newsletter.fullstack.zip/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Switchback Tech LLC]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[tyler@switchback.tech]]></webMaster><itunes:owner><itunes:email><![CDATA[tyler@switchback.tech]]></itunes:email><itunes:name><![CDATA[Tyler Dane]]></itunes:name></itunes:owner><itunes:author><![CDATA[Tyler Dane]]></itunes:author><googleplay:owner><![CDATA[tyler@switchback.tech]]></googleplay:owner><googleplay:email><![CDATA[tyler@switchback.tech]]></googleplay:email><googleplay:author><![CDATA[Tyler Dane]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Carry-on codebases]]></title><description><![CDATA[Travel lighter to go faster]]></description><link>https://newsletter.fullstack.zip/p/carry-on-codebases</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/carry-on-codebases</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Mon, 13 Apr 2026 00:27:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_yQc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_yQc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_yQc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_yQc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:908052,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/193924750?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.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_!_yQc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!_yQc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d37ce8-7904-4d55-aa1f-7afe9ca40555_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Devs love speed, which is why we&#8217;re obsessed with benchmarks and Rust. <strong>But speed is not just about acceleration; it&#8217;s also about mass.</strong>  </p><p>So what&#8217;s the heaviest part of our codebase? </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>Dependencies. </p><p>In other words, other people&#8217;s code that we rely on to make our code work. GitLab&#8217;s 2024 survey of 5,000 DevSecOps pros claims that over 25% of the code devs work on is from open-source. Those guys are either working on CLIs or lying. My <a href="https://github.com/SwitchbackTech/compass">calendar app&#8217;s codebase</a> has 10 million lines. <strong>I only wrote 116,351 lines &#8212; just 1.2% of the product. The other 98.8%? Other people&#8217;s code.</strong> </p><p>These numbers are insane, but not anomalous. Web apps are especially bloated these days. This is why we should spend less time looking at the speedometer and more time looking at the scale.</p><h3>Dependencies are weight</h3><p>Every dependency adds weight. The more you carry, the more every step costs, and the slower you move. Using minimal dependencies is like traveling internationally with a backpack. You might be going to the same destination as your buddy who brought two suitcases, but you&#8217;ll have vastly different experiences.</p><p>Let&#8217;s start with the heavy traveler, the one who has a &#8220;checked&#8221; codebase. What is his life like?</p><h3>Checked codebases</h3><p>The repo started small and grew quickly. Each dependency felt like a good idea at the time. Of course, you need an HTTP client (even though it comes with a bulky logger). Of course you need that component library with strong opinions about theming (even though you&#8217;ll only use five of its components). Of course you should start with <code>$FRAMEWORK_THAT_EVERYONE_IS_USING</code>.  </p><p>He started with a lot, added more along the way, and never stopped. The PMs were eager to add features, and no one slowed the sprawl. </p><p>Now the builds take forever, no one understands why half the packages are there, but they&#8217;re all too afraid to do anything about it. So instead of simplifying globally, everyone optimizes locally. He&#8217;s greasing the wheels of a 50-lb suitcase instead of taking out the 10-lb boots. He optimizes, but he&#8217;s still big and slow. </p><p>Traveling with a checked codebase is exhausting. It takes a lot of planning to do a little movement. Each implementation step is also laborious, as he has to check so many surfaces for downstream bugs. He&#8217;s forced to bring a month&#8217;s worth of clothes for a short weekend <s>getaway</s> hotfix.  By the end of the trip, he&#8217;s more exhausted than when he left. </p><h3>Carry-on codebases</h3><p>The minimalist is initially scoffed at as a simpleton, an irresponsible kid unprepared for the prod life. He sticks to what works, fights complexity vigorously, and has enough clout to be trusted. As a result, his dependency tree is minimal. Everyone knows what every package does. Sure, some teammates grumble about how a modern tool would be faster. But, on the whole, things are working. The builds are fast enough, newcomers can understand the code in days instead of weeks, and things get shipped. </p><p>Traveling with a carry-on codebase is chill. A POC gets demo&#8217;d. Builds pass. Merged. Done. There are fewer hotfixes, patches, docs, and meetings. The trips to Featureville actually feel energizing, and the team looks forward to the next experiment. </p><p>When the requirements change, it&#8217;s easy to recalibrate and move forward. Coding here feels like freedom. Not from bugs or feature creep, but from the weight that used to make overcoming those challenges so draining. </p><div class="pullquote"><blockquote><p>I like my code to be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide, the dependencies should be minimal to ease maintenance.<br>&#8212; Bjarne Stroustrup, inventor of C++</p></blockquote></div><h2>The reality of travel</h2><p>Traveling light has become even more important recently, because travel itself has remained complex. While the vibe coding narrative promises to collapse the SDL into a one-shot prompt, we know that there are still many steps to shipping real products.</p><p>Pull &#8594; install deps &#8594; run tests &#8594; wait for CI &#8594; deploy &#8594; retest &#8594; get design feedback &#8594; get PR feedback &#8594; repeat &#8594; deploy to prod &#8594; fix bugs &#8594; write docs.</p><p>The journey is long. At every stage, a heavier dependency graph adds time. Moreover, the dependencies themselves require attention. </p><p>We still need to <strong>upgrade</strong> them. This is like replacing a backpack with a hole at the bottom with a new one. </p><p>We&#8217;ll need to <strong>swap</strong> heavy deps for alternatives. This is like swapping a heavy cotton sweater with a light dry-fit one.</p><p>We&#8217;ll still need to <strong>remove</strong> third-party libs with built-ins. This is like leaving your glass tupperware at home when you learn the hotel provides some. </p><p>Like it or not, dealing with dependencies is still part of our lives, which means it&#8217;s still helpful to learn how to pack lightly. </p><p>A small dependency graph will not make your product automatically great. But it will make the product easier to build, easier to understand, easier to debug, and easier to adapt when reality changes.</p><p>A light traveler is a fast traveler.</p><p></p><h3>Story from the road</h3><p>I fly with this backpack instead of those rolly carry-ons that real adults use. It fits overhead and underneath. It lets me take the stairs at the hotel when the elevator line is long. It helps me blend in at a coffee shop. When the ski lifts shut down, it allowed me to haul my gear to the top for one last run. My fancy shoes don&#8217;t fit, which means I lose some fashion points. But I gain so much speed and lightness. Once you feel that freedom, it&#8217;s hard to go back.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uhSj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uhSj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uhSj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:477800,&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.fullstack.zip/i/193924750?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.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_!uhSj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uhSj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c50e6ac-01d2-4e77-900b-26f1878e4e8a_2046x1535.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div><hr></div><h2>More</h2><p><a href="https://www.scirp.org/journal/paperinformation?paperid=51631">On the Relationship between Software Complexity and Maintenance Costs</a> (2014). </p><p><a href="https://dl.acm.org/doi/epdf/10.1145/163359.163375">Software complexity and maintenance costs</a> (1993) | Analyzes Cobol maintenance projects in a large commercial bank.</p><p><a href="https://cse.unl.edu/~witty/papers/TSE_2008_11_0361_R1.pdf">Software Dependencies, Work Dependencies, and Their Impact on Failures</a> (2008) | How dependency measures relate to defects.</p><p><a href="https://about.gitlab.com/resources/developer-survey/2024/security-compliance">DevSecOps Report: Application security in the digital age</a> (2024) | GitLab&#8217;s survey</p><p></p><p>Do you think traveling light is always better, or are there exceptions?</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Why Claude writes simpler code]]></title><description><![CDATA[simplify.ts]]></description><link>https://newsletter.fullstack.zip/p/why-claude-writes-cleaner-code</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/why-claude-writes-cleaner-code</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 05 Apr 2026 16:03:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!osvr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!osvr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!osvr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!osvr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!osvr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!osvr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!osvr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:363044,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/193213003?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.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_!osvr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!osvr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!osvr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!osvr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27e6fa5c-f8a6-42a3-bbd9-b56a5f8584eb_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Anthropic accidentally leaked its Claude Code source code. Although the archived repo is easy to find, deeper analysis is not. The popular reactions are surface-level, while the technical reports read like a mindless doctor&#8217;s note written by Claude itself.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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><blockquote><p>&#8220;It&#8217;s just a Bash wrapper.&#8221;</p><p>&#8220;Wait, that&#8217;s it? This is so hack-y.&#8221;</p><p>&#8220;There&#8217;s an undercover pet!&#8221;</p><p>&#8220;It&#8217;s a CLI with multiple layers of abstractions.&#8221;</p></blockquote><p>I blame the lack of substance on the legal grey zone we&#8217;re in: linking the repo or sharing specifics would anger the copyright police. At least that&#8217;s what my $20/month lawyer/SWE tells me. </p><p>After reading through the repo, I nevertheless have to share this amazing fact:</p><p><strong>Claude Code has its own skill for simplifying code (</strong><code>simplify.ts</code><strong>).</strong> </p><p>That&#8217;s not as flashy as those other headlines, but it&#8217;s still important. </p><p>Coding with Gemini, Grok, or Cursor can feel like a game of whack-a-mole. They&#8217;ll add the feature I asked for and pass the tests&#8230;but they also litter the code with unnecessary comments, dependencies, and abstractions. Claude&#8217;s submissions feel more elegant &#8212; as if it spent some extra time refining away the rough edges first. </p><p>Well, that&#8217;s exactly what they&#8217;re doing, and it&#8217;s all documented in <code>simplify.ts</code>. Instead of pointing you to that file,  though, here is my own &#8220;simplify-code&#8221; <a href="https://github.com/SwitchbackTech/compass/blob/main/.claude/skills/simplify-code/SKILL.md">SKILL.md</a><code>,</code> which is spiritually equivalent to Claude&#8217;s. </p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">// Excerpt from my SKILL.md for simplifying code 
---
name: simplify-code
description: Simplifies code by minimizing complexity, eliminating duplication, and prioritizing legibility for contributors. Use when implementing features, fixing bugs, refactoring, or when the user asks to simplify, clean up, make DRY, reduce complexity, or improve maintainability.
---

# Simplify Code

Favor minimal, legible implementations. Fewer lines and clearer structure make code easier to understand and maintain.
...</code></pre></div><p>You and I aren&#8217;t the only ones who recognize the importance of this simple engineering philosophy. Claude is used by a whopping 75% of the smallest companies (ie, the ones that are free to use whatever they want) and is already the overall market leader, despite being released only 11 months ago. </p><p>It seems we agree:</p><p><strong>When it comes to code, </strong></p><p><strong>Less &gt; more.</strong> </p><p><strong>Simple &gt; complex. </strong></p><p>We&#8217;ve been willing to pay for simplicity with our wallets and our time all along. Now we finally know why. </p><div><hr></div><p>A few bonus observations:</p><p><strong>Mixed file names</strong>. You&#8217;ll see kebab-case, camel case, Pascal case, and lowercase all in the root directory alone. </p><p><strong>A few massive files</strong>. The entry point is 4600+ lines long, for example.</p><p><strong>Types, kinda</strong>. It&#8217;s 100% TypeScript, but they don&#8217;t rely on types very heavily. There are lots of optional properties, and types aren&#8217;t widely shared. </p><p>My instinct tells me these are less engineering conventions they settled on and more symptoms of an internal POC that rapidly evolved into a mainstream product. </p><p></p><p>What was your first reaction to the leaked code?</p><p></p><h3>More</h3><p><a href="https://newsletter.pragmaticengineer.com/p/ai-tooling-2026">AI Tooling for Software Engineers in 2026</a> | Pragmatic Engineer | usage stats</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[We're on YouTube!]]></title><description><![CDATA[The first 4 deep-dive videos]]></description><link>https://newsletter.fullstack.zip/p/were-on-youtube</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/were-on-youtube</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 01 Apr 2026 16:02:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WctG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>TL;DR &#8212; We launched a YouTube channel. First four videos below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WctG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WctG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!WctG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!WctG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!WctG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WctG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37e934ee-19d6-4496-a182-f89a521c11c0_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;:424403,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/192764455?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.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_!WctG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!WctG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!WctG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!WctG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37e934ee-19d6-4496-a182-f89a521c11c0_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"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Fullstack Engineering: The pour-over of tech content</figcaption></figure></div><h2>The format</h2><p>They&#8217;re system design case studies, featuring popular apps. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>Part I: Architecture</strong>. The stack, protocols, and main players that the featured app relies on.</p><p><strong>Part II: Feature Deep-Dive</strong>. How everything comes together in the app&#8217;s most interesting feature.</p><p><strong>Part III: Context</strong>. Where these ideas come from, and what they mean for regular devs like you and me. </p><h2>The backstory</h2><p>I broke down a few apps on my personal channel in 2024, and engineers seemed to like them. I got comments like this one:</p><blockquote><p>Big fan of this! Definitely wanna see more video breakdown apps! :)</p></blockquote><p>Of course, I ignored that feedback and instead uploaded 100 unrelated videos. When those flopped, I finally thought, &#8220;Maybe I should just give my audience what they want.&#8221;</p><p>I created &#8220;Fullstack Engineering&#8221; to be the strictly business vehicle for this educational content. </p><p>You&#8217;re probably familiar with the Fireship channel (4.1M subs as of today). If those videos are espresso, Fullstack Engineering is pour-over. They&#8217;re longer in format, but richer in context. </p><p>My goal with this channel is to give you something to watch during your WFH Friday lunch that educates and inspires. If you go back to the IDE excited, that&#8217;s a win. </p><p></p><p>Here are the first four. </p><p>Reply to LMK what app you wanna see next.</p><p></p><div id="youtube2-QymUdcqtB5E" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;QymUdcqtB5E&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/QymUdcqtB5E?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div id="youtube2-K9ZLsjAatKo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;K9ZLsjAatKo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/K9ZLsjAatKo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div id="youtube2-N2gdCnx9W2U" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;N2gdCnx9W2U&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/N2gdCnx9W2U?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div id="youtube2-mWqUnBX2PaI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;mWqUnBX2PaI&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/mWqUnBX2PaI?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Trim the stack]]></title><description><![CDATA[40 swaps for auth, storage, infra, and libraries]]></description><link>https://newsletter.fullstack.zip/p/trim-the-stack</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/trim-the-stack</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 29 Mar 2026 16:03:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bFQf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Problem: Things are too complex</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bFQf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bFQf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bFQf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/be5c66d7-aad8-4cb7-a809-3964bbce8e34_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;:120412,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/191710656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.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_!bFQf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!bFQf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe5c66d7-aad8-4cb7-a809-3964bbce8e34_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"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Before coding agents, a PR went through more checkpoints. You&#8217;d suggest a design pattern in an RFC or an issue comment. Your teammate would advocate for a different pattern. You&#8217;d go back and forth on the idea before committing to a tradeoff. After a day of POCing the first approach, you realized there&#8217;s an easier way, so you&#8217;d update the RFC or have another conversation. Then you&#8217;d submit a draft PR. More feedback from teammates who skimmed it with fresh eyes. They asked for more tests and told you how you could ditch that new library for a built-in. More refinement. By the time you make the PR public and everyone approves, your code is 2X simpler than the first version.  </p><p>Things are different now.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>Instead of clarifying our thinking in an RFC or issue, we prompt and get a PR. An agent reviews the code and auto-fixes major bugs. Another writes the PR description.</p><p>The end.</p><p>Sure, there&#8217;s a little back-and-forth between you and the agent, but only enough to make the tests green. Even reading the code is starting to feel like an inconvenience. </p><p><strong>Our velocity has skyrocketed, but so has the complexity of our codebases</strong>. Part of that complexity is inevitable. Yet more is a byproduct of accepting the agent&#8217;s defaults without scrutiny. The agent doesn&#8217;t want to waste tokens refining its already green solution, and we don&#8217;t want to waste time nitpicking. So extra libraries get added, nested if statements sneak in, and kludgey abstractions get overlooked.</p><p>Teams won&#8217;t care until their complexity debt starts to slow their velocity or introduce more bugs. At that point, it&#8217;ll be tempting to start from scratch with another prompt. But there might be a more pragmatic way out.</p><h2>Solution: Simpler tools</h2><p><strong>Replace complex tools with simple tools</strong>. Keep the requirements and tests, but replace one heavy tool with a lighter one.</p><p>To make this practical, here are 40 swaps to consider, organized by domain.</p><h2>Simpler Auth</h2><div class="pullquote"><p>The worst enemy of security is complexity<br>&#8212; Bruce Schneier, Cryptographer.</p></div><ol><li><p><strong>Auth0 / Clerk &#8594; </strong><code>express-session</code><strong> + bcrypt + a </strong><code>users</code><strong> table. </strong>Don&#8217;t lock yourself into a vendor for a personal project.</p></li><li><p><strong>OAuth &#8594; API keys. </strong>Trade the redirect dance with an API key in the header. Consider OAuth when your users can only auth with accounts they don&#8217;t control (rare). </p></li><li><p><strong>Username / password &#8594; Magic link. </strong>No hashing, strength enforcement, or reset forms.</p></li><li><p><strong>Per-route auth middleware &#8594; Single auth gateway. </strong>A single middleware that authenticates every request by default is easier than sprinkling  <code>requireAuth() </code>on each route.</p></li><li><p><strong>SSO &#8594; anything else</strong>. Add it when a paying customer asks for it. </p></li><li><p><strong>JWT everywhere </strong>&#8594; <strong>Server sessions</strong>. Easier to revoke and doesn&#8217;t require rotation.</p></li><li><p><strong>RBAC service &#8594; </strong><code>role</code><strong> column on a </strong><code>users</code><strong> table</strong>. Unless you&#8217;re an enterprise, <code>WHERE role = &#8216;admin&#8217;</code> in your middleware is fine. Consider a better abstraction when you have 3+ distinct roles.</p></li><li><p><strong>Third-party MFA service &#8594; TOTP + </strong><code>otplib</code>. It&#8217;s an open spec, and <code>otplib</code> generates and validates codes in ~10 lines. There&#8217;s a maintenance burden, but it might be cheaper than locking yourself in too early.</p></li><li><p><strong>Refresh token rotation &#8594; long-liven tokens + revocation list</strong>. If calls are inside your infra, you might not need to worry about refreshing yet. </p></li><li><p><code>passport.js</code><strong> &#8594; manual middleware.</strong> Passport adds 20+ files and a plugin ecosystem just to check a password and set a session. If you're not juggling multiple strategies, a <code>verifyPassword</code> function and a session check is 15 lines and nothing to maintain.</p></li></ol><h2>Simpler Storage</h2><div class="pullquote"><p>Adding technology to your company comes with a cost. As an abstract statement this is obvious: if we&#8217;re already using Ruby, adding Python to the mix doesn&#8217;t feel sensible [&#8230;]. But somehow when we&#8217;re talking about Python and Scala or MySQL and Redis people lose their minds, discard all constraints, and start raving about using the best tool for the job<br>&#8212; Dan Mckinley, Principal Architect @ Etsy</p></div><ol><li><p><strong>Redis queues &#8594; Postgres </strong><code>LISTEN/NOTIFY</code>. Postgres has a built-in pub/sub mechanism. <code>NOTIFY</code> sends a message on a named channel; <code>LISTEN</code> opens a persistent connection that receives those messages in real time. You can store messages in a <code>jobs</code> table and tell workers to pick it up on <code>NOTIFY</code>. Or use a lib like <a href="https://github.com/timgit/pg-boss">pg-boss</a> if you don&#8217;t wanna coordinate locks and retries yourself. This&#8217;ll last you until you get to a few hundred jobs / second.</p></li><li><p><strong>Trendy DB &#8594; SQLite.</strong> A single file, zero config, and it handles tens of thousands of reads per second. Upgrade to Postgres when you need concurrent writes from multiple processes.</p></li><li><p><strong>Time-series DB (InfluxDB) &#8594; Postgres </strong><code>timestamptz</code><strong> + indexes</strong>. For application metrics, user activity logs, or event streams at normal SaaS scale, a timestamptz column with a partial index covers the query patterns without running a second database.</p></li><li><p><strong>Separate search service (Algolia, Elasticsearch) &#8594; Postgres full-text search.</strong></p></li><li><p><strong>ORMs (Prisma, Sequelize) &#8594; SQL + a query builder</strong>. OMRs abstract SQL until they don&#8217;t. If you&#8217;ll be writing raw queries anyway, a lightweight query builder can get the job done without hiding the DB from you.</p></li><li><p><strong>MongoDB &#8594; Postgres JSONB. </strong>If you&#8217;re already on Postgres and don&#8217;t want to stress about schema design upfront, you can still use JSON for now without having to bring in another DB. IF your data is document-shaped AND you&#8217;re confident you&#8217;ll hit scale quickly, then ignore.</p></li><li><p><strong>Redis cache &#8594; Postgres Materialized View. </strong>Pre-compute the result and store it in a table. Great way to preserve speed for complex queries and avoid a cache. Must be OK with some data staleness. </p><ol><li><p>Use-case: daily sales dashboard. </p></li><li><p>See: <a href="https://leapcell.io/blog/choosing-between-postgres-materialized-views-and-redis-application-caching">Choosing Between Postgres Materialized Views and Redis Application Caching</a> (leapcell.io).</p></li></ol></li><li><p><strong>S3 &#8594; local filesystem. </strong>If you&#8217;re on a single VPS, you don&#8217;t need to manage another round-trip, IAM policy, and subscription. If GitLab could run its <code>git</code> commands on a shared NFS filesystem, you&#8217;re probably fine to store some files locally. </p><ol><li><p><a href="https://newsletter.fullstack.zip/i/190448765/gitaly-rpc-for-git">GitLab Architecture</a> (fullstack.zip)</p></li></ol></li><li><p><strong>Multiple databases &#8594; one Postgres schema per domain.</strong> Running separate databases for separate domains means cross-domain queries require application-level joins, separate connection pools, and separate migration pipelines. A Postgres schema per domain (<code>users.accounts</code>, <code>billing.invoices</code>) gives you logical separation with a single connection string.</p></li><li><p><strong>Key-value store &#8594; single-table Postgres with a </strong><code>type</code><strong> column.</strong> Redis shines for ephemeral data &#8212; rate limiting, leaderboards, session tokens. For &#8220;store this thing and look it up by key&#8221; use cases in a persistent store, a Postgres table with <code>(type, key, value, expires_at)</code> is queryable, inspectable, and doesn&#8217;t require operating a second data store.</p></li></ol><p></p><h2>Simpler Infra</h2><div class="pullquote"><p>The solution to this is to not solve all the problems a billion dollar tech does on a personnal project. Let it not be idempotent. Let it crash sometimes. We lived without kubs for years and the web was ok. Your users will survive.<br>&#8212; BiteCode_dev on HN</p></div><ol><li><p><strong>Fly.io / Railway &#8594; 1 VPS. </strong>SSH in, run your app with <code>pm2</code>, put Caddy in front. You own the machine, you understand the machine, and you're not beholden to a platform's pricing or uptime decisions.</p></li><li><p><strong>k8s &#8594; </strong><code>systemd</code><strong> + reverse proxy. </strong> Automatic startup, dependency checking, and failure recovery. </p><ul><li><p><a href="https://www.redhat.com/en/blog/podman-run-pods-systemd-services">How to run pods as systemd services with Podman</a> | redhat.com</p></li><li><p><a href="https://news.ycombinator.com/item?id=43899236">Replacing Kubernetes with Systemd</a> | news.ycombinator.com. </p></li></ul></li><li><p><strong>Docker &#8594; Bash + </strong><code>pm2</code>. Replace the whale with <code>pm2</code> (for Node apps), and you&#8217;ll free up a ton of RAM, storage, dependencies, and time.</p></li><li><p><strong>Terraform &#8594; Bash</strong>. For a personal project or small team with one VPS, a shell script that runs apt install, creates users, and drops config files is fine. Terraform is for provisioning lots of stuff across teams.</p></li><li><p><strong>Secrets manager &#8594; Env files + </strong><code>chmod 600.</code></p></li><li><p><strong>Staging environment &#8594; Feature flags. </strong>It doesn&#8217;t get more real than prod, not matter how much you dress up your staging env. How many of us are acting like we have an SLA with five 9s when we don&#8217;t even have 5 customers?</p></li><li><p><strong>GitHub Actions &#8594; </strong><code>git</code><strong> hooks + deploy script</strong>.  A post-receive git hook on your server that pulls and restarts is a 10-line bash script that deploys on git push.</p></li><li><p><strong>Autoscaling &#8594; Vertical scaling</strong>. What happened first, you spent a week configuring autoscaling or 10 minutes doubling your VPS size?</p></li><li><p><strong>Nginx + Certbot &#8594; Caddy</strong>. Auto-TLS, one config file. HTTPS in Nginx usually requires installing Certbot separately, configuring it, setting up a cron job for renewal, and debugging when it gets out of sync with your Nginx config. With Caddy, you just put your domain name in the Caddyfile &#8212; Caddy obtains and renews the certificate automatically, handling HTTP-to-HTTPS redirects, OCSP stapling, and multi-domain SANs with no additional configuration. The makers of Certbot even agree that this is a better solution for everyone. </p><ol><li><p><a href="https://www.eff.org/deeplinks/2024/03/should-caddy-and-traefik-replace-certbot%5D">Should Caddy and Traefik Replace Certbot?</a> | eff.org</p></li></ol></li><li><p><strong>Multi-region deployment &#8594; backups + a restore script</strong>. Small SaaS apps don&#8217;t need 99.99% uptime. A daily Postgres dump to S3 and a restore script that gets you back in 10 minutes is more than enough.</p></li></ol><h2>Simpler Libraries</h2><div class="pullquote"><p>All non-trivial abstractions, to some degree, are leaky<br>&#8212; Joel Spolsky, Co-Founder @ StackOverflow</p></div><ol><li><p><strong>ESLint + Prettier + Husky &#8594; </strong><code>biome</code><strong>. </strong>Biome replaces that entire stack with one tool &#8212; it&#8217;s 10&#8211;25x faster than ESLint and ships as a single binary instead of 127+ npm packages. Caveat: it doesn&#8217;t cover every ESLint plugin (e.g. <code>eslint-plugin-jsx-a11y</code>), so teams with heavy custom rule sets may not get a clean 1:1 swap.</p></li><li><p><strong>Jest/Vitest + mocking libs &#8594; </strong><code>node:assert</code><strong>. </strong>Ideal for simple backend unit tests in pure Node.js environments where minimal dependencies are a priority (<a href="https://nodejs.org/api/test.html">nodejs.org</a>)</p></li><li><p><code>.env</code><strong> + </strong><code>dotenv</code><strong> library &#8594; Native </strong><code>--env-file</code><strong> flag. </strong>Since Node 20, you can load your env file natively. </p></li><li><p><code>node-config</code><strong> &#8594; env files.</strong> <code>node-config</code> is a popular library for managing environment-specific config (development.json, production.json, etc.). For most projects, a plain <code>.env</code> file per environment covers the same ground with zero deps.</p></li><li><p><code>uuid</code> &#8594; <code>crypto.randomUUID(). </code>Why does the <code>uuid</code> package get 91 million downloads per week when <code>crypto</code> is native and 4x faster? I think it&#8217;s just a better name. </p></li><li><p><code>nodemon &#8594;</code><strong> </strong><code>node --watch</code><strong>. </strong>Unless you need granular ignore patterns, this simple flag is good for anyone on Node 18+. </p></li><li><p><code>axios &#8594;</code><strong> </strong><code>fetch. </code>Works identically in browsers. Can upgrade if you need interceptors or fancy errors.</p></li><li><p><code>moment.js</code><strong> &#8594; </strong><code>Date</code><strong>  or </strong><code>Temporal</code>. Ditch the bulky libs for a lib that the JS ecosystem spent a decade pushing through. (You&#8217;ll need a polyfill until Safari gets its act together).</p></li><li><p><code>lodash &#8594;</code><strong> array methods. </strong>Lodash predates modern JS. <code>_.map</code>, <code>_.filter</code>, <code>_.groupBy</code>, <code>_.flatten</code> are all native today. Another example of muscle-memory keeping a heavy lib around.</p></li><li><p><code>express</code><strong> &#8594; v0: </strong><code>node:http, </code><strong>v1: </strong><code>hono. Node </code>for simple internal services, <code>hono</code> if you need a router on the edge. 0 deps.</p></li></ol><p></p><h3>Conclusion</h3><p>It&#8217;s easy for me to tell you to &#8220;just replace this whole part of your stack.&#8221; It&#8217;s hard to do this in a company, especially when you need to convince teammates along the way. After spending the last three months doing nothing but this type of cleanup in <a href="https://github.com/SwitchbackTech/compass">Compass Calendar</a>, however, I can tell you it&#8217;s worth it. You&#8217;ll have fewer dependencies, fewer lines of code, and fewer headaches. You&#8217;ll start to understand the codebase again. Best of all, you&#8217;ll develop a deep conviction that&#8217;ll help you forever separate signal from noise:</p><p></p><p><em>It doesn&#8217;t have to be this complicated.</em></p><p></p><h3>More</h3><p><a href="https://newsletter.fullstack.zip/p/simple-is-smart?r=e3304&amp;utm_campaign=post">Simple is smart</a> (fullstack.zip)</p><p><a href="https://www.schneier.com/essays/archives/1999/11/a_plea_for_simplicit.html">A Plea for Simplicit</a>y (schneier.com)</p><p><a href="https://mcfunley.com/choose-boring-technology">Choose Boring Technology</a> (mcfunley.com)</p><p><a href="https://newsletter.fullstack.zip/p/77-things-to-avoid-in-2026-developer">77 Things to avoid in 2026: Developer edition</a> (fullstack.zip)</p><p><a href="https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/">The Law of Leaky Abstractions</a> (joelonsoftware.com)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Stop building like a unicorn]]></title><description><![CDATA[10 replacements for architecture you don't need (yet)]]></description><link>https://newsletter.fullstack.zip/p/stop-building-like-a-unicorn</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/stop-building-like-a-unicorn</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 22 Mar 2026 16:01:52 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9esA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9esA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9esA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!9esA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!9esA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!9esA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9esA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:496646,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/191721341?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.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_!9esA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!9esA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!9esA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!9esA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abbd80e-ca48-44b2-8c26-d139dee4340b_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8220;I&#8217;m {FirstName}, and I&#8217;m a complex-oholic.&#8221;</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>Say it.</p><p></p><p>It&#8217;s OK, we&#8217;ve all been there &#8212; prioritizing our ego ahead of our users. </p><p>Deep down, we know we were overdoing it all along.</p><p></p><p>Not ready yet?</p><p></p><p>All good, it takes time. For now, skim this list and let yourself yearn for the days of yore, when life seemed so straightforward. </p><p></p><h2>Simplify your system</h2><ol><li><p><strong>Microservices &#8594; modular monolith. </strong>If you&#8217;re a small team, a monolith with clean module boundaries gives you the same separation of concerns without the network tax (<a href="https://www.youtube.com/watch?v=5OjqD-ow8GE&amp;t=582s">Modular Monoliths</a>).</p></li><li><p><strong>Abstract base classes &#8594; plain functions + composition. </strong>If your class has one subclass, it probably shouldn&#8217;t be a class (<a href="https://python-patterns.guide/gang-of-four/composition-over-inheritance/">The Composition Over Inheritance Principle</a>).</p></li><li><p><strong>Feature flag service &#8594; Env var + </strong><code>if</code><strong> statement. </strong>LaunchDarkly and friends are powerful when you have millions of users. You don&#8217;t, so <code>if (process.env.IS_PREMIUM_USER === 'true')</code> is fine (<a href="https://www.youtube.com/watch?v=VBCYqp8l3Lc">How To Build Feature Flags Like A Senior Dev In 20 Minutes</a>).</p></li><li><p><strong>Semantic versioning automation &#8594; </strong><code>git tag</code><strong> + a changelog entry</strong>. (<a href="https://keepachangelog.com/">Keep a Changelog</a>)</p></li><li><p><strong>GraphQL &#8594; REST + JSON</strong>. Do multiple clients need different shapes of the same data? If not, a REST API will be easier to build, cache, and debug (<a href="https://mxstbr.com/thoughts/graphql">You probably don&#8217;t need GraphQL</a>).</p></li><li><p><strong>Event-driven everything</strong> &#8594; <strong>direct function calls</strong>. If two things always happen together, just call one from the other and save yourself the tracing scavenger hunt (<a href="https://www.reddit.com/r/softwarearchitecture/comments/1ckjtdx/method_calls_vs_eventdriven_architecture_in_a/">Method Calls vs Event-Driven Architecture in a Modular Monolith API?</a>).</p></li><li><p><strong>API gateway &#8594; reverse proxy routes</strong>. Gateways come with rate limits, middleware, routing, and policies. Your existing proxy can do the essentials with a few config lines (<a href="https://api7.ai/blog/api-gateway-vs-reverse-proxy">Is an API Gateway a Reverse Proxy?</a>).</p></li><li><p><strong>Pub/sub &#8594; </strong><code>EventEmitter</code>. Node&#8217;s built-in can handle internal pub/sub within a single process without a broker or network hop (<a href="https://stackoverflow.com/questions/15865912/redis-pub-sub-vs-node-event-emitter">Redis pub/ sub vs node event emitter</a>). </p></li><li><p><strong>Polyrepo &#8594; monorepo</strong>. This&#8217;ll cut down your CI configs, versions, PRs and repos. Go further by skipping Nx/Turborepo in favor of a simple <code>Makefile </code>(<a href="https://monorepo.tools/">Understanding Monorepos</a>).</p></li><li><p><strong>Multi-tenancy &#8594; multiple single-tenants</strong>. Every unicorn engineer will proudly talk about their journey from single-tenant to multi-tenant. Every tech lead of a graveyard startup will reluctantly admit how they spent too much time optimizing instead of iterating (<a href="https://clerk.com/blog/multi-tenant-vs-single-tenant">Choosing the right SaaS architecture: Multi-Tenant vs. Single-Tenant</a>). </p></li></ol><p></p><p>Did you reject these indignantly? Perhaps you bristled at the thought of a vet like you doing something so elementary. </p><p>Well, hopefully you&#8217;ll scale so quickly that you outgrow these script-kiddie tactics in a few months. None of the fancy things is wrong; they&#8217;re just wrong <em>now</em>, at this scale. </p><p>Just ship and help your users, then let the real problems tell you what to add back. </p><p>Complexity has its place. </p><p>Just not yet.</p><div class="pullquote"><p>The most dangerous thought you can have as a creative person is to think you know what you're doing. Learn tools, and use tools, but don't <em><strong>accept</strong></em> tools. Always distrust them; always be alert for alternative ways of thinking<br>&#8212; Bret Victor, &#8220;<a href="https://worrydream.com/dbx/">The Future of Programming</a>&#8221;</p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Inside GitLab CI: From YAML to Green Check]]></title><description><![CDATA[The pipeline behind the pipeline]]></description><link>https://newsletter.fullstack.zip/p/inside-gitlab-ci-from-yaml-to-green</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/inside-gitlab-ci-from-yaml-to-green</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 18 Mar 2026 16:10:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/48de4538-3c2e-4a89-b2b8-b1fc2dfd17dc_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Between your <code>git push</code> and that green checkmark, GitLab has to parse, construct a dependency graph, persist hundreds of DB rows, coordinate a fleet of workers, stream live logs, and propagate changes through a state machine &#8212; all without starving other tenants on shared infra. </p><p>This article follows the steps that GitLab takes for you after you push a commit.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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><h2>TL;DR</h2><ul><li><p>Pipelines are declared in <code>gitlab-ci.yml</code>, then compiled into an <strong>internal job graph</strong> and persisted in Postgres.</p></li><li><p><strong>Jobs move through states</strong> like <code>created</code> &#8594; <code>pending</code> &#8594; <code>running</code> &#8594; <code>success</code></p></li><li><p><strong>Merged results</strong> pipelines validate your changes against the <em>current</em> <code>main</code>.</p></li><li><p><strong>Merge trains</strong> validate your changes against the <em>eventual</em> <code>main</code>.</p></li><li><p>This is all based on <strong>dependency graphs, producer-consumer queues</strong>, and <strong>optimistic validation.</strong></p></li></ul><h2>YAML &#8594; Postgres</h2><p><strong>Step 1 &#8212; Git event received</strong>. GitLab Shell (SSH) or Workhorse (a Go reverse proxy) receives the pack data, stores it via Gitaly (gRPC for git data), and triggers a post-receive hook.</p><p><strong>Step 2 &#8212; </strong><code>Ci::CreatePipelineService</code><strong> runs</strong>. Rails fetches the YML via a Gitaly <code>GetFile</code> RPC. The YAML goes through several passes:</p><ul><li><p><code>include:</code> directives are resolved &#8212; local files, project templates, even remote URLs. This is recursive and can get deep.</p></li><li><p>Variables like <code>$CI_COMMIT_SHA</code> AND <code>$CI_PROJECT_NAME</code> are interpolated.</p></li><li><p><code>rules:</code>, <code>only:</code>, and <code>except: </code>are evaluated against the pipeline context (branch, commit message, changed files, schedule) to determine which jobs actually apply.</p></li><li><p><code>needs:</code> relationships are resolved into the DAG (more on that later)</p></li></ul><p><strong>Step 3 &#8212; Everything is written to PostgreSQL in one transaction:</strong></p><p>After GitLab parses <code>.gitlab-ci.yml</code>, it stops treating the file as the source of truth. Instead, it compiles that config into relational rows. One row represents the pipeline, a few rows for its stages, one row per job represents runnable work, and extra rows for dependencies.</p><p>In other words, GitLab <strong>turns your YAML into a small execution graph stored in PostgreSQL</strong>. That graph is what the scheduler and runners operate on later.</p><p>Here&#8217;s pseudo data to help visualize what things are like in Postgres:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">PIPELINE
  5001  main@abc123  status=created

STAGES
  6001  build   pipeline=5001
  6002  test    pipeline=5001
  6003  deploy  pipeline=5001

JOBS
  7001  compile  stage=6001  status=created
  7002  rspec    stage=6002  status=created
  7003  jest     stage=6002  status=created
  7004  ship     stage=6003  status=created

NEEDS
  7002 needs compile
  7003 needs compile
  7004 needs rspec
  7004 needs jest</code></pre></div><p>Here is what a simplified <code>ci_builds</code> row looks like at creation:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;sql&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-sql">SELECT id, pipeline_id, name, stage, status, runner_id, yaml_variables
FROM ci_builds
WHERE pipeline_id = 99801;

-- id      | pipeline_id | name           | stage | status  | runner_id
-- --------|-------------|----------------|-------|---------|----------
-- 4410023 | 99801       | lint           | test  | pending | NULL
-- 4410024 | 99801       | unit-tests     | test  | pending | NULL
-- 4410025 | 99801       | docker-build   | build | created | NULL  &#8592; waiting on stage order</code></pre></div><p><br>Note that a job in <code>created</code> is still invisible to runners at this point; it exists in the DB but is not yet in the queue.</p><p><strong>Step 4 &#8212; </strong><code>Ci::InitialPipelineProcessWorker</code> <strong>is enqueued</strong>. </p><p>This Sidekiq job calls <code>ProcessPipelineService</code>, which evaluates the DAG, finds all jobs whose dependencies are satisfied, and transitions them from <code>created</code> &#8594; <code>pending</code>. </p><p>A job in <code>pending</code> is now on the ticket rail, so runners can see it.</p><h2><strong>Postgres &#8594; Runner</strong></h2><p>Runners poll <code>POST /api/jobs/request</code> every ~3 seconds. On the Rails side, this hits <code>Ci::RegisterJobService</code>, which:</p><ol><li><p>Queries <code>ci_builds</code> for pending jobs matching this runner&#8217;s tags and project access</p></li><li><p>Attempts to atomically transition the selected job from <code>pending</code> to <code>running</code> using optimistic locking</p></li><li><p>If the update succeeds, it returns the full job payload &#8212; env variables, Docker image, scripts, artifact definitions, etc.</p></li><li><p>If another process won the race, it returns <code>204 No Content</code>, prompting the runner to retry next cycle.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BGLq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BGLq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 424w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 848w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 1272w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BGLq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png" width="1456" height="853" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:853,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:968981,&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.fullstack.zip/i/190462467?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.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_!BGLq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 424w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 848w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 1272w, https://substackcdn.com/image/fetch/$s_!BGLq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd6cecb54-9687-4b68-b82e-04defce43ae4_7097x4160.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How runners pickup a job</figcaption></figure></div><h2>Runner &#8594; Green Check</h2><h3>Workflow 1: Merge Requests</h3><p>Merge request pipelines answer the baseline CI question: &#8220;Did my change work?&#8221; When you push, GitLab ensures you can build, test, lint, and deploy that change in isolation by testing a temporary merge commit that combines source and <code>main</code>. Nothin&#8217; fancy here. </p><h3>Workflow 2: Merge Trains</h3><p>&#8220;Will Cory&#8217;s code break mine if it gets in first, though?&#8221;</p><p>Now you&#8217;re asking the right question.</p><p>When you&#8217;re working on your side project, you don&#8217;t need to worry about this. You&#8217;re the only one merging into <code>main</code>, so if it passes on your branch, it&#8217;ll pass in <code>main.</code> On a collaborative project with many changes landing at once, however, this isn&#8217;t guaranteed: two branches that each pass CI individually might conflict when combined.</p><p>Merge trains address this by testing the result of merging your branch into the target, rather than your branch in isolation.</p><p><strong>A merge train is a queue of Merge Requests (MRs), where each is compared to earlier ones to ensure they all work together.</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_!Zfsu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zfsu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zfsu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:263402,&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.fullstack.zip/i/190462467?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.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_!Zfsu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!Zfsu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fa286d2-d9c6-46a2-8a0f-e56d090efe64_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">New pipeline created after M3 failure</figcaption></figure></div><p>For example:</p><p>Four merge requests (M1-M4) are added to a merge train in order, which creates four merged results pipelines that run in parallel:</p><ol><li><p>The first pipeline runs on the changes from <strong>M1 </strong>combined with <code>main</code>.</p></li><li><p>The second pipeline runs on the changes from <strong>M1</strong>, <strong>M2</strong><code>,</code> and <code>main</code>.</p></li><li><p>The third pipeline runs on the changes from <strong>M1</strong>, <strong>M2</strong>, <strong>M3</strong>, and <code>main</code>.</p></li><li><p>The fourth pipeline runs on the changes from <strong>M1</strong>, <strong>M2</strong>, <strong>M3</strong>, <strong>M4</strong>, and <code>main</code>.</p></li></ol><p>If <strong>M1</strong> completes successfully, it merges into <code>main</code>, while the other pipelines continue to run. Any new MRs added to the train include the <strong>M1</strong> changes from the target branch, along with the <code>other</code> changes from the merge train.</p><p>That&#8217;s the happy path.</p><p>Here&#8217;s where it gets fun.</p><p>If the pipeline for <strong>M3</strong> fails:</p><ul><li><p><strong>M1</strong> and <strong>M2</strong> continue to run.</p></li><li><p><strong>M3</strong> fails and is removed from the train.</p></li><li><p>A new pipeline starts for the changes from <strong>M1, M2, M4</strong> and <code>main</code> (without M<code>3</code>).</p></li></ul><p>The payoff: <strong>M4&#8217;s dev got the changes from M1 and M2 without manually restarting their pipeline</strong>. Without merge trains, M4&#8217;s dev would either be waiting around for M1 and M2 or removing M3&#8217;s crappy code. </p><p>While this &#8220;speculative thing on top of another speculative thing&#8221; got the banks in trouble in 2008, GitLab thankfully hedges risk a little more responsibly. Think: automatic rebasing, hiding speculative future states, fast forwarding, juggling Git and MR refs, capping parallel pipelines (to 20). <strong>It required years of behind-the-scenes work.</strong> </p><p>This train flow puts more pressure on the dev team to maintain a reliable test suite, as a single flaky test can make the difference between a smooth and bumpy ride. </p><p>The payoff is worth it, though: <strong>developers can be confident that their changes will work against both the present and the near future of a shared branch.</strong></p><p>(For the record, you don&#8217;t get all this for free; Merge trains are part of GitLab&#8217;s Premium tier.)</p><h2>Historical Context</h2><p>The ideas that support GitLab&#8217;s CI originally popped up in the 50s and 60s. Understanding their history will make all of this feel less magical (in a good way!).</p><h3>Pipes</h3><p>The most obvious precedent is the pipe. In 1964, Douglas McIlroy wrote an internal Bell Labs memo proposing that programs be linked &#8220;like a garden hose &#8212; screw in another segment when it becomes necessary to massage data in another way.&#8221; He envisioned software as interchangeable components connected through data streams. The idea sat dormant for nearly a decade before Ken Thompson implemented pipes as a core Unix feature in 1973.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">ps aux | grep chrome  # is chrome running?
ls -1 | wc -l         # how many files in cwd?</code></pre></div><p>This idea had the power to extend further. Imagine your email and projects being piped into your calendar, and then to your team&#8217;s combined data lake. However, platforms are disincentivized to share: Google Drive and Dropbox don&#8217;t want to share the same files. Perhaps AI will revive this idea. You could imagine that all apps tap into a shared phone context, rather than each having its own data.</p><p>The idea that complex <strong>work should be expressed as a chain of discrete, single-purpose steps where the output of one becomes the input of the next</strong> is the foundation of every CI pipeline ever run. The <code>stages:</code> keyword is the same idea in different clothes: break your build process into named phrases, run them in order, and let each phase&#8217;s artifacts flow into the next.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QWNl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QWNl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 424w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 848w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 1272w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QWNl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png" width="1456" height="824" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106636,&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.fullstack.zip/i/190462467?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.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_!QWNl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 424w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 848w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 1272w, https://substackcdn.com/image/fetch/$s_!QWNl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efaf7a3-9908-4168-ae63-6aa31d06264f_1623x918.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A pipeline of three terminal programs. Adapted from Wikipedia</figcaption></figure></div><h3>DAG Scheduling</h3><p>GitLab&#8217;s <code>needs:</code> keyword lets you write pipelines like this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;yaml&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-yaml">build:
  stage: build

unit-tests:
  needs: [build]

integration-tests:
  needs: [build]

deploy:
  needs: [unit-tests, integration-tests]</code></pre></div><p>This is a <strong>Directed Acyclic Graph (DAG)</strong> &#8212; a graph of dependencies with no cycles, where the sort of nodes gives you a valid execution order. Multi-step projects are represented as directed graphs so that the longest sequence of dependent tasks (the &#8220;critical path&#8221;) becomes clear. This allows operators to <strong>find where work could be parallelized without delaying the overall timeline</strong>. The strategy was used to schedule chemical plants and coordinate the Polaris missile program. </p><p>GitLab&#8217;s job scheduler does the same thing. <code>ProcessPipelineService</code> evaluates the job DAG on every status change, unblocking downstream jobs the moment their dependencies complete. </p><p>The specific algorithm is Kahn&#8217;s topological sort, published in 1962: repeatedly select nodes with no incoming edges, emit them, remove them from the graph, repeat. Every CI scheduler does some variant of this.</p><h3>Optimistic Concurrency Control</h3><p>What if hundreds of runners simultaneously call <code>POST /api/jobs/request</code>, causing multiple Rails processes to receive these requests concurrently? How can they ensure that the same pending job is not handed to two runners at once?</p><p>The naive, pessimistic answer is a global lock: before selecting a job, lock the table, pick one, mark it running, unlock. This works, but at scale, it creates a queue of Rails processes waiting for the lock, and throughput tanks. Even if deadlocks are avoided, this locking limits concurrency.</p><p>Optimistic Concurrency Control (OCC), formalized in 1981, is an alternative that works well in environments with low data contention. The premise: <strong>instead of locking preemptively, assume conflicts are rare, proceed without locking, and detect conflicts at commit time</strong>. </p><p>In practice, GitLab&#8217;s <code>RegisterJobService</code> does this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;sql&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-sql">UPDATE ci_builds
SET    status = 'running',
       runner_id = $1,
       lock_version = lock_version + 1
WHERE  id = $2
  AND  status = 'pending'
  AND  lock_version = $3;  -- &#8592; the OCC check</code></pre></div><p>If another Rails process already picked this job (incrementing <code>lock_version</code>), this <code>UPDATE</code> matches zero rows. The service detects the miss and returns <code>204 No Content</code> to the runner, which simply tries again on the next poll cycle. No deadlock, global lock, or serialization. Conflicts are rare, and when they do occur, only one poll cycle is wasted.</p><h2>Where things go from here</h2><p>Everything here assumes a human pushes code, waits for a runner, and sits around waiting for a green check. </p><p>That workflow is starting to feel antiquated.</p><p>If <code>n</code> agents are committing to <code>n</code> worktrees simultaneously, doesn&#8217;t it seem odd for them to poll and coordinate complex trains?</p><p>I think the primitives &#8212; pipes, DAGs, OCC &#8212; will stay, but the workflows built on top of them will look very different. </p><p>Whatever happens, one thing is certain: <strong>having a reliable and fast way to evaluate code is always going to be important</strong>.</p><div id="youtube2-QymUdcqtB5E" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;QymUdcqtB5E&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/QymUdcqtB5E?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p></p><h3>Recommended Reading</h3><p><a href="https://open.substack.com/pub/fullstackeng/p/gitlabs-architecture-a-technical?utm_campaign=post-expanded-share&amp;utm_medium=web">GitLab&#8217;s Architecture</a> | fullstack.zip | Stack and overview</p><p><a href="https://en.wikipedia.org/wiki/Pipeline_(Unix)">Unix Pipeline History</a> | Wikipedia</p><p><a href="http://emulator.pdp-11.org.ru/misc/1978.07_-_Bell_System_Technical_Journal.pdf">The Bell System Technical Journal</a> | 1978 | McIlroy&#8217;s philosophy</p><p><a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">Directed Acyclic Graph</a> | Wikipedia</p><p><a href="https://www.eecs.harvard.edu/~htk/publication/1981-tods-kung-robinson.pdf">On Optimistic Methods for Concurrency Control</a> | Harvard | The original 1981 paper.</p><p><a href="https://en.wikipedia.org/wiki/Optimistic_concurrency_control">Optimistic Concurrency Control</a> | Wikipedia</p><h2></h2><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Why simplicity should be every engineer's immediate goal]]></title><description><![CDATA[Systems run best when designed to run downhill]]></description><link>https://newsletter.fullstack.zip/p/why-simplicity-should-be-every-engineers</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/why-simplicity-should-be-every-engineers</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 15 Mar 2026 16:02:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xqFf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xqFf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xqFf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xqFf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:777798,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/190975172?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.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_!xqFf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!xqFf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a7d329-6198-4de2-bba0-cefabfae44fd_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Ultimate vs Immediate Goals</h2><p>In <em>How to Focus: A Monastic Guide for an Age of Distraction</em>, young monks ask a master how to reconcile their tendency to chase goals with their vocation to focus on the present. The master differentiates between an ultimate goal (<em>telos</em>) and an immediate goal (<em>scopos</em>). <strong>Pursuing the ultimate goal provides purpose, while pursuing the immediate goal provides focus</strong>.</p><p>The merchant&#8217;s ultimate goal of profit keeps them centered when trouble happens at sea. The soldiers&#8217; ultimate goal of honor helps them face the danger of their campaigns. So what&#8217;s the monks&#8217; ultimate goal? Salvation. Makes sense, but too abstract for the young monks to act on daily. So the master recommends pursuing salvation by focusing on the <em>immediate</em> goal of &#8220;clarity of heart,&#8221; achieved through solitude, fasts, labor, and reading.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>This empowered the young monks to channel their existing ambition into daily habits rather than attempting to remove their ambition. </p><p>5th-century monks aren&#8217;t the only ones who can direct the power of flawed nature toward good. <strong>Although our goals are less noble, engineers also have the opportunity to work </strong><em><strong>with</strong></em><strong> our nature &#8212; or against it</strong>.</p><p>I&#8217;ll recommend a goal at the end. But first, we have to start with the question: </p><div class="pullquote"><p>&#8220;What is our nature as software engineers?&#8221;</p></div><h3>What we do naturally</h3><p>We <strong>build things</strong>. Not because we have to, but because we can&#8217;t stop. 52% of devs code for fun even after coding all day. </p><p>We <strong>automate the boring stuff</strong>. Give a dev a mindlessly repetitive task and watch him spend three times as long building a buggy script to eliminate it.</p><p>We <strong>learn obsessively</strong>. Yes, partly to keep up with the industry&#8217;s pace. But things can only move so fast because so many of us refuse to wait for permission to pick up a new skill. We&#8217;ll find the docs, read the src, and figure things out regardless.</p><p>We <strong>give a sh*t about craft</strong>. Tech debt is the top frustration at work, cited by 62% of us &#8212; ahead of tool reliability, deployment pipelines, and security issues. We hate living in a mess (especially if we didn&#8217;t create it).</p><p>We <strong>give back</strong>. 25% of developers actively contribute to open-source, which doesn&#8217;t include those who volunteer to help with issues, docs, sponsorship, or organizing.</p><p>We&#8217;re <strong>drawn to hard problems</strong>. Two out of three developers say they are motivated by a passion for learning new things, and the problems that excite us most are the ones nobody has cleanly solved yet. </p><h3>What we naturally resist</h3><p><strong>Context switching</strong>. The average digital worker toggles between apps and websites nearly 1,200 times per day and spends 4 hours per week reorienting themselves. I don&#8217;t know the numbers for devs, but I bet they&#8217;re worse. It requires sustained focus to hold the codebase in our working memory, which is why everyone hates silly meetings and interruptions. </p><p>Devs in Japan are 4X less likely to struggle with context switching than those in the UK. (IDK what to do with that fact yet, but it&#8217;s interesting.)</p><p><strong>Waiting for CI</strong>. Slow feedback loops also break the flow.</p><p><strong>Hollow metrics</strong>. We know productivity KPIs are BS: 66% of developers don&#8217;t believe or aren&#8217;t sure that current metrics reflect their real contribution. </p><p><strong>Fixing other people&#8217;s messes</strong>. We hate spending time debugging legacy code, untangling connective tissue between APIs, and working around workarounds. Unless we made the mess, then it&#8217;s fine. </p><p><strong>Estimation theater</strong>. Estimating costs and timelines while requirements change every other day and everything is on fire seems silly. </p><p><strong>Meetings</strong>. Most engineers spend nearly a third of their week in meetings. We resist this instinctively, because we know exactly what we could have shipped instead.</p><p>Put it all together, and you get a group of creative, crafty builders who are motivated by hard problems and are allergic to inefficiency. We just want to ship things that matter and leave the codebase better than we found it. </p><h2>Application</h2><p>Now that we know ourselves, we can pick goals that work <em>with </em>our nature rather than against it.</p><p>This is easy for your day job: <strong>your ultimate goal is to maximize value &#8212; </strong>generate more revenue or reduce expenses (cringe, I know). Feel free to adopt a more altruistic goal on your employer&#8217;s behalf, but don&#8217;t complain when you get cut during the next layoff. </p><p>For your side project, <strong>pick whatever ultimate goal resonates</strong>. </p><p>Some ideas:</p><ul><li><p>Fix a personal pain point</p></li><li><p>Learn a tool that excites you</p></li><li><p>Make enough to replace your main income</p></li><li><p>Build the tool you always wished existed</p></li></ul><p>The important point is that you commit to one ultimate goal. Don&#8217;t optimize for four things simultaneously.</p><p><strong>The traps hide in the immediate goal,</strong> as it often leads to complexity. Initially, complex feels like progress. It&#8217;s challenging, exciting. It gives you an excuse to learn and write more code. More features, more services, more dependencies.</p><p>But complex things don&#8217;t last. </p><p>That&#8217;s why I humbly recommend making your immediate goal to <strong>preserve simplicity</strong>. </p><p>Fix your problem with a simple stack. Learn a new thing, simply. Make enough $ to replace your main job ... using simple workflows.</p><p>This works because it embraces our tendency to find creative solutions. Instead of <em>adding, </em>however, it forces us to use that creativity to <em>subtract. </em>Instead of dragging kludgy abstractions along, it asks us to find cleaner ones. <strong>Deleting a thousand lines of code that you spent months writing doesn&#8217;t feel great, but replacing 950 lines with 50 feels amazing.</strong>  </p><p>Simple software is natural software. It&#8217;s easier to scan at 6 am, easier to write at 6 pm, and easier to fix at 1 am. That's why it has a chance to survive long enough for you to reach your ultimate goal.</p><div class="pullquote"><p>Systems run best when designed to run downhill<br>&#8212; <em>John Gall</em></p></div><p>What&#8217;s another thing we do naturally that I left out? Reply to LMK.</p><h2>Recommendations</h2><p>Data</p><ul><li><p><a href="https://devecosystem-2025.jetbrains.com/">Developer Ecosystem 2025</a> |  JetBrain&#8217;s survey of 25k devs</p></li><li><p><a href="https://stackoverflow.blog/2025/01/01/developers-want-more-more-more-the-2024-results-from-stack-overflow-s-annual-developer-survey/">Developers want more, more, more</a> | Stack Overflow&#8217;s 2024 survey</p></li><li><p><a href="https://2025.stateofai.dev/">State of AI 2025</a> | How devs use AI</p></li><li><p><a href="https://www.hivel.ai/blog/context-switching-crisis-quantifying-the-cost-and-finding-solutions">The Context Switching Crisis</a> | Hivel AI 2025</p></li><li><p><a href="https://opensource.com/article/21/4/motivates-open-source-contributors">What Motivates Open Source Software Contributors</a> | Opensource.com</p></li></ul><p>Books</p><ul><li><p><a href="https://archive.org/details/systemanticshows00gall">Systemantics</a>: how systems work and especially how they fail<em> </em>| Fun wisdom</p></li><li><p><a href="https://www.amazon.com/How-Focus-Monastic-Guide-Distraction/dp/B0CW7YR1WG">How to Focus</a>: A Monastic Guide for an Age of Distraction</p></li><li><p><a href="https://www.goodreads.com/book/show/39996759-a-philosophy-of-software-design">A Philosophy of Software Design</a> | John Ousterhoust</p></li><li><p><a href="https://basecamp.com/gettingreal">Getting Real</a> | 37signals | Canonical argument for less</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[GitLab's Architecture: A Technical Deep Dive]]></title><description><![CDATA[How a boring monolith powers the world's largest independent DevOps platform]]></description><link>https://newsletter.fullstack.zip/p/gitlabs-architecture-a-technical</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/gitlabs-architecture-a-technical</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 11 Mar 2026 23:56:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!E7Nw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E7Nw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E7Nw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E7Nw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:250146,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.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_!E7Nw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!E7Nw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32a12aa9-0dc1-408f-986f-bfb8e27f0fab_1200x644.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>TL;DR - It&#8217;s a modular monolith built on this stack:</p><ol><li><p><strong>Backend</strong>: <a href="https://rubyonrails.org">Ruby on Rails</a></p></li><li><p><strong>HTTP server</strong>: <a href="https://puma.io/">Puma</a> (Ruby web server)</p></li><li><p><strong>Edge</strong>: <a href="https://nginx.org/">Nginx</a></p></li><li><p><strong>Reverse proxy</strong>: Go service (<a href="https://docs.gitlab.com/development/workhorse/">Workhorse</a>)</p></li><li><p><strong>Background jobs</strong>: <a href="https://sidekiq.org/">Sidekiq</a> (Ruby framework)</p></li><li><p><strong>DB &#8212; primary</strong>: <a href="https://www.postgresql.org/https://www.postgresql.org/">PostgreSQL</a></p></li><li><p><strong>DB &#8212; connection pooling</strong>: <a href="https://www.pgbouncer.org/">PgBouncer</a></p></li><li><p><strong>DB &#8212; high availability</strong>: <a href="https://github.com/patroni/patroni">Patroni</a></p></li><li><p><strong>Cache</strong>: <a href="https://redis.io/">Redis</a></p></li><li><p><strong>Git</strong>: Custom gRPC repo interface  (<a href="https://git-scm.com/">Git</a> &amp; <a href="https://docs.gitlab.com/administration/gitaly/">Gitaly</a>)</p></li><li><p><strong>Blob</strong>: <a href="https://aws.amazon.com/s3/">AWS S3</a></p></li><li><p><strong>Frontend &#8212; rendering</strong>: <a href="https://haml.info/">Haml</a> &amp; <a href="https://vuejs.org/">Vue</a></p></li><li><p><strong>Frontend &#8212; state</strong>: <a href="https://pinia.vuejs.org/">Pinia</a> (Vue store), <a href="https://immerjs.github.io/immer/">Immer</a> (immutable cache), </p></li><li><p><strong>API</strong>: GraphQL (<a href="https://www.apollographql.com/">Apollo</a>) + REST</p></li><li><p><strong>Observability</strong>: <a href="https://prometheus.io/">Prometheus</a> &amp; <a href="https://grafana.com/">Grafana</a></p></li><li><p><strong>Error tracking</strong>: <a href="https://sentry.io/">Sentry</a> &amp; <a href="https://opentelemetry.io/">OpenTelemetry</a> </p></li><li><p><strong>Deployments</strong>: <a href="https://gitlab.com/gitlab-org/omnibus-gitlab">GitLab Omnibus</a> (<a href="https://github.com/chef/omnibus">Omnibus</a> fork)</p></li></ol><div><hr></div><p>GitLab is what happens when you commit to the monolith. Its CI/CD, security scanner, issue tracker, and deployment toolchain are bundled into one product rather than five held together with webhook glue. The stack isn&#8217;t flashy either: a large Ruby on Rails app, Postgres, Redis, and a handful of Go services.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>No Kafka, event-sourcing, mesh of 200 microservices. Instead, GitLab maintains its modularity through discipline and radical transparency. </p><p>This article traces the path from your <code>git push</code> command to the DB and back, ending with an explainer of how GitLab monitors all of it in prod, and where the architecture is headed.</p><h2>What Is GitLab?</h2><p>If you have never used GitLab (shame), here&#8217;s the gist.</p><p>It&#8217;s a platform for software teams. At its core, it hosts Git repos. On top of that, it adds CI/CD pipelines (automated build, test, and deploy workflows), merge requests, issue tracking, container registries, and security scanning, all in one application.</p><p>Unlike GitHub, which relies on a marketplace of third-party integrations for CI/CD, GitLab ships all of this natively. This &#8220;one-app-to-rule-them-all&#8221; stance is what shapes many of the architectural choices described in this article. </p><p>It&#8217;s also open-source.</p><h2>The Glossary</h2><p>GitLab introduces a lot of proper nouns. Before going further, here&#8217;s the cheat sheet. We will cover each of these in depth later.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">+-------------+-----------------------------------------------------------+---------+
| Name        | What It Does                                              | Built In|
+-------------+-----------------------------------------------------------+---------+
| Puma        | Multi-threaded web server. The main application           | Ruby    |
|             | engine: receives web requests, runs business logic,       |         |
|             | reads and writes the database.                            |         |
+-------------+-----------------------------------------------------------+---------+
| Workhorse   | Go reverse proxy sitting in front of Puma. Handles        | Go      |
|             | slow, heavy I/O so Ruby does not have to: git push/pull   |         |
|             | over HTTPS, large file uploads, CI log streaming,         |         |
|             | artifact downloads.                                       |         |
+-------------+-----------------------------------------------------------+---------+
| GitLab Shell| Handles SSH connections for git push/pull. Authenticates  | Go/Ruby |
|             | the user, then hands the git operation to Gitaly.         |         |
+-------------+-----------------------------------------------------------+---------+
| Gitaly      | gRPC service that owns all Git data on disk. Replaced     | Go      |
|             | a brittle NFS-shared filesystem. Every git read/write     |         |
|             | goes through Gitaly RPC calls &#8212; nothing touches the git   |         |
|             | repos directly.                                           |         |
+-------------+-----------------------------------------------------------+---------+
| Praefect    | Load-balancing replication proxy for Gitaly. Sits in      | Go      |
|             | front of a cluster of Gitaly nodes, enforces quorum       |         |
|             | writes, and handles automatic failover.                   |         |
+-------------+-----------------------------------------------------------+---------+
| Consul      | Service registry. Holds the current topology of the       | Go      |
|             | Postgres cluster so that PgBouncer can find the primary   |         |
|             | after a failover without any human intervention.          |         |
+-------------+-----------------------------------------------------------+---------+
| Geo         | Multi-site replication. Secondary sites mirror the        | Ruby/Go |
|             | primary for read performance and disaster recovery.       |         |
+-------------+-----------------------------------------------------------+---------+
| GitLab      | Standalone Go binary that organizations deploy            | Go      |
| Runner      | wherever jobs should run: their own servers, a cloud      |         |
|             | account, a Kubernetes cluster. Polls GitLab for           |         |
|             | pending CI jobs and executes them.                        |         |
+-------------+-----------------------------------------------------------+---------+</code></pre></div><h2>The Full Picture</h2><p>This is the end-to-end architecture. Every section below zooms into one layer of 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_!ioum!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ioum!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!ioum!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!ioum!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!ioum!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ioum!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:554847,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.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_!ioum!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!ioum!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!ioum!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!ioum!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c95fd33-8e46-49a1-aa47-d615d8082dc0_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Layer 1: Client to Ingress</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XaPu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XaPu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XaPu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:237738,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.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_!XaPu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!XaPu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c35799b-a722-4e00-8c29-e52e90b5c4d5_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><p>Most traffic comes in over HTTPS and goes through the same ingress path. The exception is SSH, which we will discuss at the end of this section.</p><h3>Cloudflare: The Front Door</h3><p>Every request to GitLab.com hits Cloudflare first, which gives them a firewall, DDoS protection, a CDN, and TLS termination. We&#8217;ll break down Cloudflare in its own issue, so let&#8217;s leave it at that for now =]</p><h3>Nginx: The Gateway</h3><p>Nginx receives HTTP requests from the load balancer and routes them to Workhorse. It handles a few things here:</p><ul><li><p><strong>TLS termination</strong> for self-managed installs where Cloudflare is not in front</p></li><li><p><strong>Static file serving</strong> for anything that lives on disk, like uploads that have not yet been moved to object storage</p></li><li><p><strong>Rate limiting </strong>headers, enforced in conjunction with GitLab&#8217;s Redis backend rate limiter</p></li><li><p><strong>Request routing </strong>&#8212; Nginx sends everything to Workhorse, which will decide what to do next</p></li></ul><p>Nginx is intentionally thin here; it is not doing complex business logic. Its job is to be a fast, reliable conduit to the Workhorse.</p><h3>The SSH Path: GitLab Shell</h3><p>To retain the real hackers, GitLab also allows SSH connections, which bypass Nginx entirely. A <code>git push git@gitlab.com:user/repo.git</code> connects directly to GitLab Shell on port 22.</p><p>GitLab Shell is a small Go app that acts as a restricted SSH shell. When your SSH client connects, it reads your public key, calls the GitLab API to verify the key belongs to an authorized user, then hands off the git pack data to Gitaly for storage. It never actually lets you get a general shell prompt &#8212; it only accepts git-specific commands (lame). </p><h2>Layer 2: Ingress to Core</h2><p>Once a request passes through Nginx, it reaches the core application layer &#8212; the part that actually understands what the user is trying to do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gqrb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gqrb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gqrb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:334905,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.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_!Gqrb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!Gqrb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd01fbcec-e7d8-4330-858c-50c852090d34_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Workhorse: The Smart Proxy</h3><p>Workhorse is a Go service that sits between Nginx and Puma. In addition to normal reverse proxy duties, it has a specific job: keep slow I/O away from Ruby threads.</p><p>Ruby has a Global Interpreter Lock (GIL) that limits true parallelism. Tying up a Ruby thread on a slow upload or a long git-pack operation is expensive, preventing that thread from serving other requests while it waits. Workhorse exists to prevent this.</p><p>The communication between Workhorse and Puma is slightly unusual.</p><p>While the standard reverse proxy request goes like this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">client -&gt; proxy -&gt; app -&gt; proxy -&gt; client</code></pre></div><p>&#8230;adding Workhorse into the mix makes it go like this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">client -&gt; Workhorse -&gt; Puma -&gt; Workhorse -&gt; app -&gt; Workhorse -&gt; client</code></pre></div><p>Workhorse forwards the request to Puma. Puma processes the request and then replies with special headers (<code>X-Sendfile</code>, <code>X-GitLab-Git-HTTP-Session</code>). Workhorse uses those to hijack the response and send it directly to the client. </p><p>Basically, Puma tells Workhorse what to do via response headers, and Workhorse takes it from there.</p><p>Workhorse is responsible for:</p><ul><li><p><strong>Git HTTP operations</strong> &#8212; git push and pull over HTTPS. It streams the pack data directly to and from Gitaly via gRPC, without routing the raw bytes through Ruby</p></li><li><p><strong>File uploads</strong> &#8212; when you upload an attachment, Workhorse buffers the multipart upload and either stores it temporarily on disk or streams it directly to object storage, then notifies Puma that the upload is complete.</p></li><li><p><strong>Artifact downloads </strong>&#8212; when you download a CI artifact, Workhorse fetches it from object storage and streams it to your client, again without involving Puma</p></li><li><p><strong>CI log tailing </strong>&#8212; while a job runs, Workhorse streams log chunks from Redis to the browser in real time.</p></li></ul><p>This is weird, but it frees the Puma thread immediately instead of making it wait for I/O to finish. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nPuM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nPuM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 424w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 848w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 1272w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nPuM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png" width="1456" height="652" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:652,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:278421,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.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_!nPuM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 424w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 848w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 1272w, https://substackcdn.com/image/fetch/$s_!nPuM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ae2e5a2-5923-4314-8305-b9ebeb7442d4_3537x1583.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The unconventional path of a GET request</figcaption></figure></div><h3>Puma: The Rails Application Engine</h3><p>Puma is where the actual GitLab application runs. It is a multi-threaded Ruby HTTP server running the GitLab Rails app &#8212; a large codebase that handles:</p><ul><li><p>Authentication &amp; authorization (who is this user, can they see the code)</p></li><li><p>Reading and writing to PostgreSQL (user records, merge requests, issue data)</p></li><li><p>Reading and writing to Redis (sessions, locks, cache, real-time events)</p></li><li><p>Calling Gitaly via gRPC for repository operations (list branches, read a file, get a diff)</p></li><li><p>Enqueuing Sidekiq background jobs for any work that does not need to happen synchronously</p></li><li><p>Rendering the HTML, JSON, or GraphQL response</p></li></ul><p>Puma scales horizontally: add more Puma nodes behind the load balancer, and throughput increases linearly (because Puma nodes are stateless). Sessions live in Redis. Nothing lives on the Puma host that cannot be reconstructed.</p><p>The Rails app is organized in a monolithic codebase, but it&#8217;s nevertheless modular. Each domain manages its own models, services, and API endpoints. This provides the DX benefits (easy to run locally, shared tooling, fewer network hops) while keeping the blast radius of any given change small.</p><h3>Sidekiq: The Background Worker</h3><p>Not everything needs to happen before the user sees a response. Sending a notification email, updating a downstream pipeline status, archiving a CI log to object storage &#8212; these are all better handled asynchronously.</p><p>Sidekiq is GitLab&#8217;s background job processor for this type of work. It runs as a separate process (or many processes at scale), reads job payloads from Redis queues, and processes them independently from the web request cycle.</p><p>When Puma wants to fire off async work, it enqueues a job &#8212; a small JSON payload describing a Ruby class and its arguments &#8212; into a Redis list. Sidekiq workers are sitting in a loop pulling from those lists. They pick up the job, execute the Ruby code, and either mark it <code>complete</code> or retry it on failure.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Puma (on a request):                   
  1. Process MR comment creation            
  2. Write comment to PostgreSQL           
  3. Enqueue NotificationWorker ----&gt;    Sidekiq (background):
  4. Return 201 to user                  1. Pull NotificationWorker job from Redis 
     (~40ms)                             2. Load recipients from PostgreSQL                                          
                                         3. Send emails via SMTP
                                         4. Mark job complete
                                         (~2 seconds, who cares)                        </code></pre></div><p>At GitLab.com scale, Sidekiq is not one process &#8212; it&#8217;s a fleet of workers, each configured with specific queue assignments. CI state-transition workers run on dedicated Sidekiq fleets so that a slow email-delivery worker does not hold up the CI queue (a lesson learned the hard way).</p><h2>Layer 3: Core to External Services</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dtUq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dtUq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dtUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:460286,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.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_!dtUq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!dtUq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb9b1426-6260-4124-9c2f-7186d4de574f_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Remember that the app tier does not hold state. It delegates to a set of purpose-built external services. Let&#8217;s learn what each of these star players does.</p><h3>PostgreSQL: The System of Record</h3><p>Every structured piece of app data lives in Postgres: users, projects, groups, issues, merge requests, CI pipelines, job records, artifact metadata, permissions &#8212; all of it. It&#8217;s the authoritative source of truth.</p><p>GitLab.com doesn&#8217;t connect to Postgres directly, however. It goes through <strong>PgBouncer</strong>, a connection pooler that multiplexes thousands of connections down to a manageable pool. Without it, a Puma/Sidekiq fleet of hundreds of processes would each try to hold open a database connection, quickly exhausting Postgres&#8217;s connection limit.</p><p>GitLab also uses <strong>read replicas</strong> &#8212; secondary Postgres nodes that receive a streaming copy of all writes from the primary. Read-heavy operations like loading a project&#8217;s issue list or rendering a dashboard can be routed to replicas, offloading the primary for write-heavy work.</p><h3>Redis</h3><p>GitLab uses Redis as eight logically distinct stores, each with different operational requirements and eviction policies.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">+------------------------+-------------------------------------------+------------------+
| Instance               | Stores                                    | OK to Lose?      |
+------------------------+-------------------------------------------+------------------+
| queues                 | Sidekiq job payloads, retry state         | No - jobs lost   |
| shared_state           | Distributed locks, exclusive leases       | No - race conds  |
| sessions               | User login sessions                       | No - logged out  |
| actioncable            | WebSocket pub/sub for real-time UI        | Mostly fine      |
| trace_chunks           | In-flight CI job log bytes                | Mostly fine      |
| cache                  | Computed Rails.cache data                 | Yes - rebuildable|
| rate_limiting          | Request counters per IP/user              | Yes - rebuildable|
| repository_cache       | Branch and tag name lists                 | Yes - rebuildable|
+------------------------+-------------------------------------------+------------------+</code></pre></div><p>Cache instances use an LRU eviction policy: when they fill up, the least-recently-used keys are evicted. That is the correct behavior for a cache. (Imagine you applied LRU eviction to the <code>queues</code> instance: Sidekiq jobs would silently disappear from the queue before being processed!)</p><p>On a small self-managed instance, one Redis process handles everything. On GitLab.com, these are fully separate clusters, sized and scaled independently. This ensures that when the CI system generates a spike in trace chunk writes, it does not compete with session storage. </p><h3>Gitaly: RPC for Git</h3><p>Early GitLab stored git repositories on a shared NFS filesystem. Every Puma and Sidekiq node would mount the NFS volume and call git commands directly on disk. This worked, up to a point. As scale grew, the limitations became painful: NFS latency spikes, split-brain risks on failover, no way to observe what git operations were running or how long they took.</p><p><strong>Gitaly </strong>eventually replaced NFS. It is a gRPC service &#8212; you call it via a typed remote procedure call (RPC) interface, not by shelling out <code>git</code> on a shared filesystem. Every <code>git</code> operation in GitLab now translates to a Gitaly RPC:</p><ul><li><p>To <strong>get a MR diff</strong>, Rails calls <code>Gitaly.CommitDiff(repo, from_sha, to_sha)</code>. Gitaly streams diff hunks back as gRPC messages.</p></li><li><p>To <strong>list branches</strong>, Rails calls <code>Gitaly.FindAllBranches(repo)</code>. Gitaly reads from disk, returns structured branch data</p></li><li><p>To <strong>git push</strong> over HTTP: Workhorse calls <code>Gitaly.PostReceivePack(repo, pack_data)</code>. Gitaly writes objects, updates refs, runs server-side hooks.</p></li></ul><p>Because every git operation is a discrete, typed RPC, Gitaly can be monitored, load-balanced, and independently scaled in a way that NFS never could have.</p><h3>Object Storage: Keeping Blobs Separate</h3><p>Not everything fits neatly in a Postgres row. CI artifacts (binaries, test reports, logs), Git LFS files, container images, uploaded attachments, and archived job logs are binary blobs that can be gigabytes in size.</p><p>Storing this in Postgres, while technically possible, would inflate table sizes, make backups slow, and force blob I/O through the same connection pool as structured queries.</p><p>GitLab sanely puts all blobs in object storage &#8212; GCS on GitLab.com, S3 on self-managed installs. The DB holds only a <em>pointer </em>(a storage path and some metadata). When you download a CI artifact:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Browser &#9472;&#9472;&#9658; Workhorse &#9472;&#9472;&#9658; Rails (auth check only)
                              &#9474;
                              &#9474;  "This artifact lives at
                              &#9474;   gs://artifacts-bucket/job/42/artifact.zip"                    "
                              &#9474;
                              &#9660;
                         Workhorse generates a presigned URL
                         or proxies the stream directly from GCS
                         to the browser</code></pre></div><p>The auth check is instantaneous. The actual data transfer happens between Workhorse and GCS, with no Puma thread blocked waiting for bytes. Another example of using Puma for what it&#8217;s good at (HTTP) and avoiding it for I/O.</p><h3>The AI Gateway: Model Routing for Duo</h3><p><strong>GitLab Duo </strong>is the umbrella name for AI features: code suggestions, chat, root-cause analysis for failed CI pipelines, security vulnerability explanations, and so on. All of these features funnel through a centralized <strong>AI Gateway </strong>&#8212; a standalone Python/FastAPI service that routes requests to the right model.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Rails/Sidekiq
      &#9474;
      &#9660;
AI Gateway (FastAPI)
      &#9500;&#9472;&#9472;&#9658; Anthropic Claude   (code generation, chat)
      &#9500;&#9472;&#9472;&#9658; Google Vertex AI   (various tasks)
      &#9492;&#9472;&#9472;&#9658; Self-hosted models (for enterprise customers)</code></pre></div><p>Why a gateway rather than Rails calling model providers directly? A few reasons. The Gateway creates one point of control for rate limiting, cost accounting, model versioning, and provider fallback across all deployment types. When GitLab wants to swap one model provider for another or A/B test two models, they change it in one place. Self-managed customers do not need to configure cloud provider credentials for every AI feature separately; they just connect to the Gateway.</p><h3>External Services: The Outside World</h3><p>GitLab also talks to a set of external systems that are not &#8220;part of GitLab&#8221; per se but are deeply integrated:</p><ul><li><p><strong>SMTP servers </strong>&#8212; for sending email notifications (Sidekiq-dispatched)</p></li><li><p><strong>OAuth providers </strong>&#8212; Google, GitHub, SAML, etc for SSO</p></li><li><p><strong>LDAP / Active Directory </strong>&#8212; for enterprise users provisioning and group sync</p></li><li><p><strong>Kubernetes API </strong>&#8212; for the GitLab agent for k8s, used for deployments and cluster management</p></li><li><p><strong>Container registries</strong> &#8212; GitLab&#8217;s built-in registry uses a separate service <code>gitlab-registry</code>), based on Docker.</p></li><li><p><strong>Webhook targets</strong> &#8212; when you configure a GitLab webhook, Sidekiq makes an outbound HTTP request to your configured endpoint on relevant events</p></li></ul><p>We&#8217;ve covered the main building blocks of GitLab. The following explains the connective tissue and peripheral bits that make everything come together in prod. </p><h2>High Availability</h2><p>How GitLab eliminates single points of failure at every layer of the stack.</p><h3>Application HA</h3><p><strong>Stateless nodes. </strong>Puma and Sidekiq nodes hold no local state. User sessions live in Redis. Uploaded files live in object storage. If a Puma node dies, the load balancer routes traffic to the remaining nodes before users ever notice &#8212; their session is still valid because it was in Redis all along. Adding capacity is equally painless: spin up more nodes and register them with the load balancer. No data migration needed.</p><p><strong>Praefect </strong>adds high-availability (HA) on top of Gitaly. It is a proxy that sits in front of a cluster or Gitaly nodes. On a write, Praefect sends the operation to all nodes and waits for a quorum to confirm before returning success. This is &#8220;strong consistency,&#8221; meaning you can read from any Gitaly replica immediately after a write and get the correct data. When a Gitaly node fails, Praefect promotes a replica automatically.</p><h3>DB HA: Patroni + PgBouncer + Consul</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X4L7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X4L7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X4L7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:444147,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.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_!X4L7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!X4L7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf2d640d-457e-4563-b4fc-f1f6e2a10a01_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Patroni runs on each Postgres node. It manages leader election, monitors health, and handles automatic failure. If the primary becomes unreachable, Patroni elects a new primary within seconds. It broadcasts the result to <strong>Consul</strong>, the service registry. <strong>PgBouncer </strong>watches Consul, so it knows to point new connections at the primary without any restart. Application nodes never need to know which host is primary; they always talk to PgBouncer.</p><p>Failover typically completes in under 30 seconds. Applications experience a brief pause as PgBouncer re-routes, then continue normally.</p><h3>Gitaly HA: Praefect Cluster with Quorum Writes</h3><p>Praefect is a router and transaction manager for Gitaly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oqme!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oqme!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!oqme!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!oqme!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!oqme!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oqme!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:181058,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.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_!oqme!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!oqme!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!oqme!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!oqme!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3724df71-0113-4d81-b39b-213d9f59325a_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>On writes, Praefect sends the operation to all Gitaly nodes and waits for a <strong>quorum </strong>(majority) to confirm before reporting success. This means you can read from any replica immediatly after a write and see the latest data &#8212; no stale reads. If the primary Gitaly node fails, Praefect promotes a replica and resumes service automatically.</p><p>Praefect maintains its own small Postgres DB (separate from GitLab&#8217;s main Postgres) to track replication state. A full HA deployment ends up with two Postgres clusters: one for GitLab app data, one for Praefect.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qS1D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qS1D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qS1D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png" width="1200" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:81603,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.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_!qS1D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 424w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 848w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 1272w, https://substackcdn.com/image/fetch/$s_!qS1D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe21a9686-6d32-4d5c-9df9-bbc89402035b_1200x644.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How Praefect interacts with Postgres</figcaption></figure></div><h3>Redis HA: Sentinel Mode</h3><p>Each Redis instance in a HA deployment runs with <strong>Redis Sentinel</strong>: a primary Redis with replicas, monitored by at least three Sentinel processes. If the primary fails, Sentinels elect a new primary and notify clients to reconnect. Application nodes are configured to discover the current primary through Sentinel rather than connecting to a fixed host.</p><p>One constraint worth knowing: <strong>Redis Cluster </strong>(Redis&#8217;s own horizontal-sharding mode) is not supported for all GitLab Redis uses. The <code>trace_chunks</code> instance uses a data structure that is incompatible with Redis Cluster&#8217;s key-slot sharding. All GitLab Redis instances therefore use Sentinel mode, not Cluster mode. </p><h3>Site Level Recovery: GitLab Geo</h3><p>What happens if the entire primary data center goes offline? How do developers in Asia-Pacific stop having 300ms latency every time they run <code>git clone</code> against a server in Virginia?</p><p>GitLab&#8217;s answer: <strong>Geo</strong>, a warm-standby for distributed teams. Geo provides local caches that can be placed geographically close to remote teams, which can serve read requests. This can reduce the time it takes to clone and fetch large 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_!25FJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!25FJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 424w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 848w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!25FJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png" width="1080" height="1440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1440,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:274850,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.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_!25FJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 424w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 848w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!25FJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3911228c-5725-4643-900d-66d45b75aa93_1080x1440.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>The secondary site gets Postgres via standard streaming replication &#8212; a continuous, near-real-time copy of every write. Git repos are synced by the <strong>Geo Log Cursor daemon</strong>, a separate process that reads the log and enqueues background jobs to clone or fetch updated repos from the primary via HTTPS. </p><p>Replication is async &#8212; there is always some lag, usually measured in seconds. For disaster recovery, <strong>planned failover</strong> waits for full synchronization before promoting the secondary. Zero data loss. <strong>Emergency failover</strong> can be forced immediately. In this case, some data written in the last few seconds may be lost.</p><h2>Monitoring: How GitLab Knows When Things Break</h2><p>A system with this many parts will have failures. The question is how quickly they can be detected, and how much context you&#8217;ll have to start troubleshooting.</p><p>GitLab&#8217;s observability stack covers three domains: <strong>metrics </strong>(what is happening now), <strong>logs </strong>(what happened when), and <strong>traces </strong>(specific request tracking). </p><h3>Metrics: Prometheus and Grafana</h3><p>Every GitLab component exposes a Prometheus metrics endpoint. The in-process <strong>GitLab Exporter </strong>scrapes the running Rails app and produces application-level metrics. Prometheus collects and stores all of these on a regular scrape interval. Grafana provides dashboards and alert routing.</p><p>Key metrics the team monitors:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">+----------------------------+-----------------------------------------------+
| Metric                     | What It Tells You                             |
+----------------------------+-----------------------------------------------+
| HTTP request rate/latency  | Is the web tier healthy? Latency spikes       |
| by controller action       | point to slow DB queries or Gitaly RPCs       |
+----------------------------+-----------------------------------------------+
| Sidekiq queue depth        | Are jobs piling up? Indicates under-capacity  |
| by queue name              | or a worker that is stuck                     |
+----------------------------+-----------------------------------------------+
| Sidekiq job latency        | Time from enqueue to start. High latency      |
| by worker class            | = queue starvation                            |
+----------------------------+-----------------------------------------------+
| Gitaly RPC latency         | Git operation performance. Spikes indicate    |
| by RPC name                | disk I/O issues on Gitaly nodes               |
+----------------------------+-----------------------------------------------+
| PostgreSQL connection      | Is PgBouncer saturated? Are we running out    |
| pool saturation            | of Postgres connections?                      |
+----------------------------+-----------------------------------------------+
| CI queue depth             | Pending jobs waiting for a runner. High       |
| by runner type             | values = runner fleet under-capacity          |
+----------------------------+-----------------------------------------------+
| Redis command latency      | Cache/queue slowness. Usually indicates       |
|                            | memory pressure or network issues             |
+----------------------------+-----------------------------------------------+
| Error rate by service      | Rolling count of 5xx responses. The canary    |
|                            | for most application-level problems           |
+----------------------------+-----------------------------------------------+</code></pre></div><h3>Logs</h3><p>Every component in GitLab emits structured JSON logs. The critical piece is the <strong>correlation ID</strong>: a UUID assigned to each incoming request by Workhorse, stamped into every log generated anywhere in the call chain &#8212; Rails, Gitaly, Sidekiq, all of &#8216;em. <br></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;json&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-json">{
  "method": "POST",
  "path": "/api/v4/jobs/request",
  "status": 200,
  "duration_s": 0.043,
  "correlation_id": "01HXKG4P8B3QV7N6J2MZ", // &lt;-- important
  "user_id": 1234,
  "meta.caller_id": "Ci::RegisterJobService",
  "db_duration_s": 0.012,
  "redis_calls": 3,
  "gitaly_calls": 0,
  "queue_duration_s": 0.001
}</code></pre></div><p>When an on-call engineer sees a latency spike on a Grafana dashboard, they grab the correlation ID of an affected request and use it as a filter key across all log sources &#8212; Elasticsearch, Splunk, Loki, whatever the install uses.</p><h3>Tracing: OTEL</h3><p>Metrics tell you what is slow. Logs tell you when the slowness happened. Distributed traces tell you why by showing the exact sequence of service calls and how long each one took. </p><p>GitLab uses <strong>OpenTelemetry-compatible tracing</strong>. The correlation ID doubles as the trace ID here. A slow pipeline creation request might produce a trace like:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">POST /api/v4/projects/123/pipeline   847ms total
  &#9500;&#9472;&#9472; Auth check (Redis)              3ms
  &#9500;&#9472;&#9472; Project load (Postgres)         8ms
  &#9500;&#9472;&#9472; YAML fetch from Gitaly         22ms    &#8592; Gitaly.GetFile RPC
  &#9500;&#9472;&#9472; YAML parse and rule eval        41ms
  &#9500;&#9472;&#9472; Pipeline write (Postgres)       15ms
  &#9500;&#9472;&#9472; Stage+job row inserts          180ms   &#8592; this is the bottleneck today
  &#9500;&#9472;&#9472; Sidekiq enqueue (Redis)         4ms
  &#9492;&#9472;&#9472; Response serialization         12ms</code></pre></div><p>Interestingly, this distributed tracing is still considered &#8220;experimental&#8221; at the time of this article.</p><h3>Error Tracking</h3><p>Unhandled exceptions in Rails are captured and routed to GitLab&#8217;s error tracking system. GitLab uses its own built-in <strong>Error Tracking </strong>feature (which integrates with Sentry-compatible backends) as well as self-hosted Sentry for some teams. Errors are deduplicated, grouped by fingerprint, and surfaced with full stack traces and the request context (user, path, params) that caused them.</p><p>Error tracking events also carry the correlation ID, so you can jump from an error event directly to all logs from that specific request. </p><h2>Scaling PostgreSQL</h2><p>For those familiar with these real-world apps, things probably seem pretty straightforward up to this point; GitLab hasn&#8217;t tried to do anything cute or uniquely ambitious on the engineering side. </p><p>At their current scale, however, the PostgreSQL situation is getting untenable. They started by allowing horizontal cloning by making Puma &amp; Sidekiq <strong>stateless</strong>. Then they <strong>decomposed CI tables into a separate DB</strong>, a multi-year effort that required forbidding cross-database JOINs in the Rails model layer and rewriting hundreds of queries.  </p><p>Now they&#8217;re <strong>partitioning data by customer</strong>. This can&#8217;t be done via traditional sharding, because Postgres has no native sharding. CitusDB was evaluated and ruled out. Application-level sharding requires every query to know which shard to target, and makes cross-shard queries effectively impossible. </p><p>GitLab&#8217;s answer is <strong>Cells</strong> (interestingly, <a href="https://newsletter.fullstack.zip/i/187330984/bonus-5-more-solutions">the same name Discord used</a> for its similar abstraction). Instead of sharding rows in a database, they&#8217;ll run multiple independent copies of the entire application stack &#8212; each called a Cell &#8212; with a shared routing layer in front.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PczG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PczG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 424w, https://substackcdn.com/image/fetch/$s_!PczG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 848w, https://substackcdn.com/image/fetch/$s_!PczG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 1272w, https://substackcdn.com/image/fetch/$s_!PczG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PczG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png" width="1456" height="310" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:310,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:338898,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.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_!PczG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 424w, https://substackcdn.com/image/fetch/$s_!PczG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 848w, https://substackcdn.com/image/fetch/$s_!PczG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 1272w, https://substackcdn.com/image/fetch/$s_!PczG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75abc845-af24-49c9-90f8-a1a97052670a_4078x869.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>An org is assigned to exactly one Cell. The global router resolves which Cell handles each request based on the org in the URL. Each Cell is essentially <strong>a complete, isolated GitLab instance</strong>. Adding capacity means adding a new Cell &#8212; no resharding or cross-shard coordination. </p><p>The hard part is cross-cell operations: a user who belongs to orgs on two different cells, or a fork from a project on Cell 1 to Cell 2. These require a global identity layer and router that is still being designed. </p><p>They&#8217;re refreshingly transparent about this&nbsp;effort: you can track the project status, ADRs, and proposed architecture on their public handbook page (<a href="https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/#architecture-overview">handbook.gitlab.com</a>).</p><h2>The &#8220;Boring&#8221; Takeaway</h2><p>Perhaps you&#8217;ve been waiting for more complexity, the kind of juicy architectural optimization that makes the front page of HackerNews. </p><p>If that&#8217;s the case, GitLab ain&#8217;t for you. </p><p>The most interesting part about GitLab&#8217;s architecture is what isn&#8217;t there. No Kafka. No event sourcing. No distributed saga coordinator. No fancy message bus (yet). Their Z-axis scaling is being solved not with sharing but with what is essentially &#8220;run more copies of the whole app&#8221; lol. </p><p>Its monolithic codebase and the conventional tools that support it are simple, lean, pragmatic. They&#8217;ll extract and abstract, but only when warranted:</p><ul><li><p><strong>Gitaly </strong>was created when NFS-backed git storage became a liability</p></li><li><p><strong>Workhorse</strong> was born when Ruby&#8217;s I/O throughout became the bottleneck for git operations</p></li><li><p><strong>The CI DB</strong> was split when CI tables started consuming 40% of write traffic.</p></li></ul><p>The monolith survives because it genuinely serves the product well: it is fast to develop, easy to test locally, straightforward to reason about, and naturally consistent within a single DB transaction. </p><p>This is a story of engineering sanity, not architectural fashion. And for 30 million users, it&#8217;s working just fine. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GTu1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GTu1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GTu1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png" width="1080" height="1350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f2cb1d1-5324-4a45-bf92-1787c5ef3246_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;:null,&quot;bytes&quot;:231488,&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.fullstack.zip/i/190448765?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_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_!GTu1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!GTu1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f2cb1d1-5324-4a45-bf92-1787c5ef3246_1080x1350.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div id="youtube2-QymUdcqtB5E" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;QymUdcqtB5E&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/QymUdcqtB5E?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>References</h2><ol><li><p><a href="https://docs.gitlab.com/development/architecture/">GitLab Architecture Overview &#8212; GitLab Docs</a> | Canonical component diagram and service descriptions.</p></li><li><p><a href="https://docs.gitlab.com/administration/reference_architectures/">Reference Architectures &#8212; GitLab Docs</a> | Tier-by-tier HA topologies from single node to 50k+ users.</p></li><li><p><a href="https://docs.gitlab.com/administration/gitaly/praefect/">Gitaly Cluster / Praefect &#8212; GitLab Docs</a> | Replication proxy, quorum writes, and automatic failover.</p></li><li><p><a href="https://docs.gitlab.com/development/redis/">Redis Development Guidelines &#8212; GitLab Docs</a> | Multiple Redis instances, eviction policies, and use case separation.</p></li><li><p><a href="https://docs.gitlab.com/administration/geo/">Geo &#8212; GitLab Docs</a> | Multi-site replication, the Geo Log Cursor, and failover procedures.</p></li><li><p><a href="https://docs.gitlab.com/administration/postgresql/replication_and_failover/">PostgreSQL HA with Patroni &#8212; GitLab Docs</a> | Patroni, PgBouncer, and Consul HA topology in depth.</p></li><li><p><a href="https://docs.gitlab.com/development/scalability/">GitLab Scalability &#8212; GitLab Docs</a> | AKF Scale Cube framing &#8212; X/Y/Z axes, current state, and gaps.</p></li><li><p><a href="https://docs.gitlab.com/development/database/multiple_databases/">Multiple Databases &#8212; GitLab Docs</a> | CI database separation and cross-database query restrictions.</p></li><li><p><a href="https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/cells/">Cells Architecture Blueprint &#8212; GitLab Handbook</a> | Design, goals, and current status of the Cells initiative.</p></li><li><p><a href="https://docs.gitlab.com/development/ai_architecture/">AI Architecture &#8212; GitLab Docs</a> | AI Gateway design, Duo routing, self-hosted model support.</p></li><li><p><a href="https://docs.gitlab.com/administration/logs/tracing_correlation_id/">Find Relevant Log Entries with a Correlation ID &#8212; GitLab Docs</a> | Correlation ID flow through Workhorse, Rails, Gitaly, and Sidekiq.</p></li><li><p><a href="https://docs.gitlab.com/administration/logs/">Log System &#8212; GitLab Docs</a> | Structured JSON logging reference &#8212; all log files and their schemas.</p></li><li><p><a href="https://docs.gitlab.com/operations/error_tracking/">Error Tracking &#8212; GitLab Docs</a> | GitLab&#8217;s built-in Sentry-compatible error tracking integration.</p></li><li><p><a href="https://docs.gitlab.com/development/workhorse/">GitLab Workhorse &#8212; GitLab Docs</a> | Design rationale and feature set of the smart proxy layer.</p></li><li><p><a href="https://about.gitlab.com/blog/path-to-decomposing-gitlab-database-part1/">Decomposing the GitLab Backend Database &#8212; GitLab Blog</a>  | The story of separating the CI database from main.</p></li><li><p><a href="https://docs.gitlab.com/development/ee_features/">EE Feature Guidelines &#8212; GitLab Docs</a> | How CE/EE code separation works at the Rails autoloader level.</p></li><li><p><a href="https://about.gitlab.com/blog/2024/10/02/how-we-designed-the-gitlab-reference-architectures/">How We Designed GitLab Reference Architectures &#8212; GitLab Blog</a> | History and rationale of the reference architecture tiers.</p></li><li><p><a href="https://about.gitlab.com/blog/2020/06/24/scaling-our-use-of-sidekiq/">Scaling Sidekiq at GitLab.com &#8212; GitLab Blog</a> Lessons from specialized queue configuration at production scale.</p></li><li><p><a href="https://gitlab.com/gitlab-org/gitlab-shell">GitLab Shell &#8212; GitLab Repository</a> | SSH session handler.</p></li><li><p><a href="https://akfpartners.com/growth-blog/scale-cube">AKF Scale Cube &#8212; AKF Partners</a> | 2024 | The original X/Y/Z axes of scalability model GitLab references.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[20 awesomely simple things]]></title><description><![CDATA[A celebration of simplicity in software and life]]></description><link>https://newsletter.fullstack.zip/p/20-awesomely-simple-things</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/20-awesomely-simple-things</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 08 Mar 2026 16:06:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Bl19!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In future Offline editions, we&#8217;ll continue to challenge engineering complexity, as we have in <a href="https://newsletter.fullstack.zip/p/simple-is-smart">Simple is smart</a> and <a href="https://newsletter.fullstack.zip/p/complexity-is-a-choice">Complexity is a choice</a>. </p><p>Critiquing the bad is useful, so is celebrating the good.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>That&#8217;s why this issue highlights everyday simplicity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bl19!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bl19!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bl19!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:231229,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/190254793?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.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_!Bl19!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!Bl19!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cd47331-2b70-4a6a-9f32-5007865a215f_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Engineering simplicity</h2><ol><li><p><strong>CI/CD scripts in Bash only</strong>. No Terraform, subscriptions, config hell, version updates. Just Bash. </p></li><li><p><strong>Claude skill</strong> for simplifying (<a href="https://github.com/SwitchbackTech/compass/blob/main/.claude/skills/simplify-code/SKILL.md">SKILL.md</a>). &#8220;Favor minimal, legible implementations. Fewer lines and clearer structure make code easier to understand and maintain.&#8221;</p></li><li><p><strong>Typescript on server and client</strong>. Strong-typing for AI. Easier to run and read code for devs.</p></li><li><p> <strong>Monolith instead of microservices</strong>. Easier for normal-sized teams to manage. &#8220;[It] doesn&#8217;t pretend to provide a failsafe architectural road to glory. That&#8217;s a fool&#8217;s errand. Many programmers suffering under many oppressive influences will turn any architecture made with any tool into a big pile of mud.&#8221; (<a href="https://signalvnoise.com/svn3/the-majestic-monolith/">signalvnoise</a>)</p></li><li><p><strong>Markdown files</strong>. Portable, straightforward. These files lack fancy embeds and database linking, but they work. In fact, an entire note-taking company is built on this file type (<a href="https://obsidian.md">obsidian.md</a>).</p></li><li><p><strong>Peter Level&#8217;s vanilla stack</strong>: HTML, CSS, vanilla JavaScript, jQuery, PHP, and SQLite &#8212; all running on a single VPS (<a href="https://www.indiehackers.com/post/how-pieter-levels-learned-to-code-f61c0019a3">indiehackers.com</a>). </p></li><li><p><strong>Dashes and lowercase for files</strong>. That&#8217;s it. This saves so much time, trust me.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">taxes-2025.pdf
taxes-2025-amended.pdf
statement-checking-2025-01.pdf
statement-checking-2025-02.pdf</code></pre></div></li><li><p><strong>SQLite in production</strong>. Notion&#8217;s early days and plenty of indie apps run SQLite fine. One file, zero config, no separate server process (<a href="https://sqlite.org/whentouse.html">sqlite.org/whentouse</a>).</p></li><li><p><strong>ENV files for config</strong>. A flat text file beats a secrets manager, a config service, and three IAM policies. Works locally, works in prod, understandable.</p></li><li><p><strong>Cron jobs instead of queues</strong>. Before Kafka, SQS, or BullMQ &#8212; there was cron. Scheduled tasks, no broker, no consumer group, no dead-letter queue. If your job runs once an hour, you don&#8217;t need a message bus.</p></li></ol><h3>AFK Simplicity</h3><ol><li><p><strong>Two-tier pricing models</strong>. Free or premium. Free or usage-based. Starter or enterprise. The end.</p></li><li><p><strong>Dotted grid paper</strong>. The best of grid paper + lined paper + freeform paper (<a href="https://www.leuchtturm1917.us/">leuchturm1917.us</a>)</p></li><li><p><strong>Capsule wardrobe</strong>. A small collection of thoughtfully chosen, easy-to-mix pieces that allows you to create a wide range of outfits with fewer items. Less decision fatigue, more time (<a href="https://modernminimalism.com/how-to-build-a-capsule-wardrobe/">modernminimalism.com</a>).</p></li><li><p><strong>Crossfit&#8217;s diet recommendation</strong>: &#8220;Eat meat and vegetables, nuts and seeds, some fruit, little starch, no sugar.&#8221;</p></li><li><p><strong>Aldi&#8217;s 25-cent deposit to use a cart.</strong> &#8220;This [&#8230;] ultimately saves our customers money because we don&#8217;t have to hire extra staff to collect grocery carts.&#8221; Yep.</p></li><li><p>My grandma&#8217;s &#8220;as much as you want&#8221; <strong>blue cheese rice soup recipe</strong>.</p></li></ol><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">1. Buy Uncle Ben&#8217;s seasoned &#8220;long grain + wild rice&#8221; original
2. Cook according to directions
3. Add plain yogurt (not Greek) (as much as you want)
4. Add crumbled blue cheese (as much as you want)
5. Heat thoroughly
6. If you want to make it a 1 dish meal, add browned hamburger</code></pre></div><ol start="7"><li><p><strong>Apple Notes</strong> for tracking workouts. I used to have three workout apps. Now I have three notes.</p></li><li><p>The <strong>Big Ass Calendar</strong>. An entire year on one wall. No flipping, loading screens, or subscriptions (<a href="https://thebigasscalendar.com/">thebigasscalendar.com</a>).</p></li><li><p>My old gym&#8217;s <strong>response to complaints</strong> about the playlist:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_LEV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_LEV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_LEV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg" width="394" height="555" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:555,&quot;width&quot;:394,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:49218,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&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.fullstack.zip/i/190254793?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50f930d9-93ba-497b-93b4-e33df66666de_768x1024.jpeg&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_!_LEV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_LEV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf17b3bf-cfa4-4a52-a7d6-7cd0a9eda63d_394x555.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p><strong>SF street names engraved in the sidewalk</strong>. Fewer signs.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iiBY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iiBY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iiBY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg" width="261" height="269.39086294416245" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:591,&quot;resizeWidth&quot;:261,&quot;bytes&quot;:155611,&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.fullstack.zip/i/190254793?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb253c465-d4ea-4915-9a05-4ad4e6dd39d6_768x1024.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_!iiBY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iiBY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c744ca8-4528-414e-aae5-f165b0cf44fa_591x610.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p></p><p>Once you start looking for the beautifully simple solutions to problems, you&#8217;ll see them everywhere.</p><p>I hope these inspire you to simplify your own stack and life.</p><p>Reply with an example or two of your own!</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Ergo: a case study in approachable invention]]></title><description><![CDATA[What a small framework can teach us about system design]]></description><link>https://newsletter.fullstack.zip/p/ergo-a-case-study-in-approachable</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/ergo-a-case-study-in-approachable</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 04 Mar 2026 17:02:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!5hCx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The importance of invention</h2><p>The Depth of Knowledge (DOK) model categorizes thought into four levels of complexity: </p><ol><li><p>Recall. Memorizing, matching, reciting, quoting</p></li><li><p>Skill. Inferring, categorizing, interpreting, predicting</p></li><li><p>Strategy. Critiquing, developing, comparing, concluding</p></li><li><p>Extend. Design, connect, synthesize, create</p></li></ol><p>DOK helps educators create a curriculum with varied cognitive rigor. A good math exam would require students to identify basic formulas, choose the right one, analyze data, and solve a real-world problem. It also helps explain why some students excel at certain assignments but struggle with others.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>We can look at our system design skills through a similar lens. </p><p>In keeping with our <a href="https://newsletter.fullstack.zip/p/simple-is-smart">theme of simplicity</a>, I propose just three levels:</p><ol><li><p><strong>Facts</strong>. The difference between SQL and NoSQL.</p></li><li><p><strong>Heuristics</strong>. SQL for structured data, NoSQL for unstructured data. </p></li><li><p><strong>Inventions</strong>. Distributed SQL.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5hCx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5hCx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5hCx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a3379b6-5e74-41cd-91e0-bd00380a98c0_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;:234828,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/189779164?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.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_!5hCx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!5hCx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a3379b6-5e74-41cd-91e0-bd00380a98c0_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"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Our <a href="https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance">Discord case study</a> displays engineering at all three levels of complexity.</p><ol><li><p>Facts: Knowing enough about programming to make the app fast.</p></li><li><p>Heuristics: Adopting Elixir, Rust, and ScyllaDB, despite their newness.</p></li><li><p>Inventions: Creating a &#8220;Super-Disk&#8221; abstraction to guarantee both speed (SSDs) and reliability (hard drives). </p></li></ol><p>Discord&#8217;s inventions are the most impressive. </p><p>&#8220;But we&#8217;re not at Discord scale &#8212; our apps don&#8217;t need to support trillions of messages or millions of concurrent users. Plus, we can pass most system design interviews with memorization alone. Why not just move on and build stuff instead of worrying about creating more abstractions?&#8221;</p><p>I get it.</p><p>But it&#8217;s a shame to build a strong base during interview season, only to let it atrophy after day one on the job, obediently accepting the precedents forever. </p><p><strong>Invention is worthy of pursuit.</strong> Although you&#8217;ll never be assigned a ticket to &#8220;Invent New Abstraction,&#8221; doing so is one of the most high-impact things you can do as an engineer.</p><div class="pullquote"><p> You get simplicity by finding a slightly more sophisticated building block to build your theories out of. <br>&#8212; Alan Kay</p></div><h2>Invention case study</h2><p>Carl Hewitt&#8217;s <a href="https://newsletter.fullstack.zip/p/the-actor-model-messages-and-mailboxes">Actor Model</a> introduced a communication protocol of messages and mailboxes that solves race conditions. Although the model is a beautiful invention, creating something so esoteric feels a bit out-of-reach for those of us who don&#8217;t have a PhD from MIT. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SCKq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SCKq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SCKq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73384,&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.fullstack.zip/i/189779164?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.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_!SCKq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!SCKq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb97d244c-648d-45c5-9d15-a969ad1fc814_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Actors: Hewitt&#8217;s building block</figcaption></figure></div><p></p><p>Thankfully, we don&#8217;t have to introduce a new paradigm to invent; plenty of opportunities arise within our current stack. The Ergo Framework is a perfect example of how regular engineers can invent abstractions that simplify rather than complicate.</p><h3>The problem</h3><p><a href="https://github.com/ergo-services/ergo">Ergo</a> is an implementation of the Actor Model in Go, bridging the gap between a 50-year-old theory and a modern programming language. The basics of the actor model are perfectly compatible with the Go language &#8212; queues for mailboxes, trees for supervisors. </p><p>However, there&#8217;s one scenario where the language conflicts with the model: I/O (file reads, listening to OS signals, TCP accept). The Actor Model requires a balance of async delivery with sync processing. That&#8217;s because Actors work sequentially. One message arrives, gets processed, completes. Next message.  This strict workflow is what eliminates race conditions. </p><p>Blocking I/O breaks this model.</p><p>In Ergo, a normal Process is an actor &#8212; a lightweight entity that handles messages sequentially in its own goroutine. There&#8217;s one process per goroutine. Processes can make sync calls and create monitors &#8212; standard actor stuff. Since there&#8217;s one goroutine, it must handle everything. If it blocks on I/O, message processing stops.</p><p>Call <code>net.Listener.Accept()</code> in a handler and watch the goroutine freeze while it waits for connections. Messages pile up until the system times out. </p><p>Let&#8217;s try solving the problem with a simple heuristic. </p><p>&#8220;Compute is cheap, add more. Moore&#8217;s Law. Just spawn a new goroutine for <code>Accept()</code>.&#8221;</p><p>This bails you out of the immediate bottleneck. But now the two goroutines access the actor&#8217;s state concurrently. <strong>We just traded a perf problem for a race condition problem.</strong> </p><p>&#8220;Add a lock&#8221; (level one).</p><p>Sure, but now we have to add a bunch of code to handle the lock&#8217;s complexity.</p><p>The only way we can preserve the guarantees of concurrency that come with the Actor Model and the I/O use-case in Go is to invent a more elegant abstraction (level three).</p><h3>The invention</h3><p>The Ergo authors created &#8220;Meta-processes&#8221; for this situation. </p><p>Unlike normal processes, which have one goroutine per process, Meta-processes have two: a Reader and a Handler. The reader is for blocking operations &#8212; <code>Accept()</code> loops, <code>ReadFrom()</code> calls. The handler does everything except I/O via sequential messages in traditional Actor fashion. The Reader runs continuously from spawn until termination. The Handler comes and goes based on message traffic.</p><p>Meta-processes separate concerns. The Reader handles I/O, while the Handler processes messages. <strong>The Reader blocks reading while the Handler blocks writing</strong>. Two blocking operations, two goroutines, neither interrupting the other.</p><p>Meta-processes mediate the purity of the Actor Model with the messiness of the real I/O world. They turn blocking operations into async messages and messages into blocking commands. Regular processes implement everything else.</p><p>It&#8217;s a wonderfully simple distinction that a lay-developer can implement, even if they don&#8217;t appreciate the mechanism.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m55G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m55G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 424w, https://substackcdn.com/image/fetch/$s_!m55G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 848w, https://substackcdn.com/image/fetch/$s_!m55G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 1272w, https://substackcdn.com/image/fetch/$s_!m55G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m55G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png" width="1456" height="1711" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1711,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:315094,&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.fullstack.zip/i/189779164?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.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_!m55G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 424w, https://substackcdn.com/image/fetch/$s_!m55G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 848w, https://substackcdn.com/image/fetch/$s_!m55G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 1272w, https://substackcdn.com/image/fetch/$s_!m55G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0061e0d8-5d39-44d0-9360-2125e7de71cc_1928x2266.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Meta-process flow. From <a href="http://docs.ergo.services">ergo.services</a></figcaption></figure></div><h2>The takeaway</h2><p><strong>To escape a bind, add constraints.</strong> </p><p>To escape locks in concurrent programming, the Actor Model added communication constraints: messages and actors. Authors need to follow the rules by only sending messages and not sharing state, but they get guaranteed concurrency.</p><p>To escape blocking I/O in single-processes, Ergo added process constraints: one for reading, one for writing. Authors need to discern whether they&#8217;re working with I/O, but they get to keep concurrency in Go. </p><p>It&#8217;s counterintuitive to consider adding more rules in the pursuit of simplicity. It&#8217;s also easy to add the <em>wrong </em>rules and get more complexity without extra benefits. <strong>Tolerating this tension is a prerequisite to finding a level three invention.</strong> It&#8217;s the kind of challenge that comes from both understanding the theory and working in the slimy guts of a problem. </p><p>You can&#8217;t memorize or skim your way out of these situations.</p><p>That&#8217;s why they require level-three thinking.</p><p>Keep memorizing definitions, skimming, and interviewing. But also pursue answers that aren&#8217;t so accessible. <strong>Our industry is increasingly outsourcing its thinking; we need those who continue to exercise their cognition more than ever</strong>.</p><h3>Bonus: More inventions</h3><p><strong>MapReduce</strong>: <code>map()</code> + <code>reduce()</code></p><p><strong>Containers</strong>: cgroups + namespaces</p><p><strong>Git</strong>: immutable snapshots</p><p><strong>CRDTs</strong>: sync + merge without locks</p><p><strong>Virtual DOM</strong>: diffs against the real DOM</p><p><strong>Promises</strong>: Async that reads like sync</p><h3>Resources</h3><p>Depth of Knowledge: Difficulty and Complexity (<a href="https://www.webbalign.org/difficulty-and-complexity">webbalign.org</a>)</p><p>DOK chart (<a href="https://static.pdesas.org/content/documents/m1-slide_19_dok_wheel_slide.pdf">pdesas.org</a>)</p><p>The Actor Model: Messages and Mailboxes (<a href="https://newsletter.fullstack.zip/p/the-actor-model-messages-and-mailboxes">fullstack.zip</a>)</p><p>Discord: A Case Study in Performance Optimization (<a href="https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance">fullstack.zip</a>)</p><p>Ergo Basics (<a href="https://docs.ergo.services/basics/actor-model">ergo.services</a>)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Complexity is a choice]]></title><description><![CDATA[Why the relationships in your codebase matter more than the parts]]></description><link>https://newsletter.fullstack.zip/p/complexity-is-a-choice</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/complexity-is-a-choice</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 01 Mar 2026 17:02:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!EO7S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Things have gotten more complex lately &#8212; I&#8217;m sure you&#8217;ve noticed.</p><p>Perhaps you&#8217;ve shrugged it off as an inevitable side-effect of progress.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</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>Is it, though?</p><p>Increasing the number of components makes a system more <strong>complicated</strong>.</p><p>But entangling the individual components makes it <strong>complex</strong>.  </p><p>A Swiss watch with its many gears is complicated. But there&#8217;s a manual. A watchmaker can repair it reliably. </p><p>The unpredictable behavior between components is what makes a system complex. Weather is complex. Cities are complex. </p><p>The problem isn&#8217;t the number of parts; it&#8217;s that the parts can&#8217;t be understood in isolation; you can&#8217;t pull one out without disturbing the others.</p><p><strong>More components, more complicated.</strong></p><p><strong>More relationships between components, more complex.</strong></p><p>Complication is an inevitable side-effect of solving harder problems.</p><p>On the other hand, complexity is a choice &#8212; one that is often made unconsciously while solving a problem. The irony is that by intertwining in the pursuit of an immediate solution, we shorten the solution&#8217;s lifespan.</p><p>We only need to peek at a few open-source projects to see this reality at work.</p><h2>Dependencies reveal complexity</h2><p>Naming is hard, but we got it right by calling packages &#8220;dependencies.&#8221; The more dependencies a project has, the more relationships, the more complexity.</p><p>If it&#8217;s true that complexity kills, then we should expect that the projects that survive have fewer dependencies.</p><p>I sampled 19 popular open-source web libraries and apps and found just that.   </p><p>For scale, the average project in this list is 6.5 years old and has anywhere from</p><ul><li><p>72k to 3M lines of code</p></li><li><p>11 to 340 dependencies </p></li></ul><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EO7S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EO7S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 424w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 848w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 1272w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EO7S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png" width="1456" height="653" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:653,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83178,&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.fullstack.zip/i/189487081?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.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_!EO7S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 424w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 848w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 1272w, https://substackcdn.com/image/fetch/$s_!EO7S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81cef9ad-33c6-4c92-a4e5-48f3aa59006a_1803x809.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Spreadsheet with raw data available <a href="https://docs.google.com/spreadsheets/d/1xwyCbH-AbmjhYsSaVF60FKDVdhp4Fu7Xbm3sJXCHv6E/edit?usp=sharing">here</a></figcaption></figure></div><p>Lines of Code per Dependency</p><ul><li><p><a href="https://github.com/microsoft/vscode">VSCode</a>: 23,579</p></li><li><p><a href="https://github.com/super-productivity/super-productivity">SuperProductivity</a>: 21,173</p></li><li><p><a href="https://github.com/ionic-team/ionic-framework">Ionic Framework</a>: 11,518</p></li><li><p><a href="https://github.com/openclaw/openclaw">OpenClaw</a>: 10,632</p></li><li><p><a href="https://github.com/PostHog/posthog">Posthog</a>: 8,970</p></li><li><p><a href="https://github.com/microsoft/playwright">Playwright</a>: 8,562</p></li><li><p><a href="https://github.com/react-hook-form/react-hook-form">react-hook-form</a>: 6,562</p></li><li><p><a href="https://github.com/webpack/webpack">webpack</a>: 6,050</p></li><li><p><a href="https://github.com/qeeqbox/social-analyzer">social-analyzer</a>: 6,022</p></li><li><p><a href="https://github.com/excalidraw/excalidraw">excalidraw</a>: 5,579</p></li><li><p><a href="https://github.com/calcom/cal.com">Cal.com</a>: 4,039</p></li><li><p><a href="https://github.com/ionic-team/capacitor">Ionic Capacitor</a>: 2,637</p></li><li><p><a href="https://github.com/remix-run/remix">Remix</a>: 1,795</p></li><li><p><a href="https://github.com/logseq/logseq">Logseq</a>: 1,772</p></li><li><p><a href="https://github.com/drawdb-io/drawdb">drawdb</a>:  1,495</p></li><li><p><a href="https://github.com/SwitchbackTech/compass">Compass Calendar</a>: 1,383</p></li><li><p><a href="https://github.com/vitejs/vite">Vitest</a>: 602</p></li><li><p><a href="https://github.com/jaredpalmer/formik">Formik</a>: 566</p></li></ul><p>The official winner is VSCode, with over 23,000 lines of code for each of its dependencies. As a low-level tool backed by Microsoft and the default app for every web dev for the past decade, this makes sense. There&#8217;s a lot of money and engineering time spent on keeping it lean-ish.  But close behind is a productivity app with 614k lines of code and 29 dependencies backed by &#8230; <strong>one guy in Germany whose been working on it part-time for the last nine years</strong>!</p><p>SuperProductivity has endured because it has resisted complexity. </p><p>Compass is similar to SuperProductivity in spirit. Yet it&#8217;s at the bottom of the list because its developer has eaten from the forbidden fruit of the npm tree (and suffered greatly as a result). </p><p>The OGs at Remix are wiser; they&#8217;ve made the avoidance of dependencies a core principle: </p><blockquote><p>Avoid Dependencies. Dependencies lock you into somebody else&#8217;s roadmap. Choose them wisely, wrap them completely, and expect to replace most of them with our own package eventually. The goal is zero.<br>&#8212; Remix&#8217;s README </p></blockquote><p>This relationship between complexity and longevity is not unique to the open-source projects I cherry-picked. Just look at your own team&#8217;s graveyard of archived repos. I&#8217;ll bet the ones that didn&#8217;t make it have a lot of complex relationships. </p><div class="pullquote"><p>Simplicity is prerequisite for reliability.<br>&#8212; <em>Edsger W Dijkstra</em></p></div><h2>We can choose differently now</h2><p>Now that software is cheap, we&#8217;re forced to confront the question, &#8220;Do things still need to be this complex?&#8221; A triple-decker of abstractions might&#8217;ve been justifiable in a big codebase maintained by 500 engineers, each of whom can only keep 5% of the system in their head. But if that same team &#8220;reorgs&#8221; to 100 engineers and 400 coding agents, each of which can hold 100% of the system in context, could we travel more lightly?</p><p>Yes, and it&#8217;s already happening. Cloudflare rebuilt Next.js sans opinionated build system with one engineer in one week (<a href="https://blog.cloudflare.com/vinext/#the-next-js-deployment-problem">cloudflare.com</a>). Anthropic built a C compiler from scratch with 16 agents and $20k (<a href="https://www.anthropic.com/engineering/building-c-compiler">anthropic.com</a>). </p><p>The abundance of subsidized tokens encourages the creation of unadulterated projects like these headline-grabbers. But it also offers a unique opportunity to right our wrongs, to absolve the complexity we&#8217;ve accrued during times of weakness. </p><p>These days, I wake up with foaming bloodlust towards my package.json, for I know that the more complexity I expunge, the longer the software can survive.</p><p>There&#8217;s an irony here, one that mirrors the opportunity presented by social media.</p><p>As we&#8217;re bombarded with cheap dopamine, it&#8217;s never been easier to settle into chronic distraction. It&#8217;s also never been easier to compete: just read a book for five minutes to become a top 84% reader in the US (<a href="https://www.bls.gov/news.release/pdf/atus.pdf">bls.gov</a>).</p><p>We&#8217;re always one prompt away from a PR that introduces more complexity. But we&#8217;re also always one prompt away from a PR that cleans up the old. </p><p> </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Actor Model: Messages and Mailboxes]]></title><description><![CDATA[The constraints that make actors powerful]]></description><link>https://newsletter.fullstack.zip/p/the-actor-model-messages-and-mailboxes</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/the-actor-model-messages-and-mailboxes</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 25 Feb 2026 17:02:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GL_G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the <a href="https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance">Discord case study</a>, we saw how a distributed real-time system was built upon the Actor Model. Don&#8217;t be fooled, though; this model wasn&#8217;t invented at Discord. Instead, it&#8217;s a pattern from the 70&#8217;s that has become so fundamental to our concurrent systems that we rarely slow down to appreciate its genius.</p><p>What about the model is so special? There are entire books that explain this in detail. For this edition, we&#8217;re zeroing in on two core ideas: messages and mailboxes. These are the mechanisms that constrain each actor while preserving the power of the system.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GL_G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GL_G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GL_G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73384,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/189040221?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.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_!GL_G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!GL_G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e1eec3e-5b8c-4632-9594-167303bafb95_1424x1044.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How an actor responds to a message</figcaption></figure></div><h3>Messages</h3><p>The key to the actor model is messages, which are:</p><ul><li><p>The <strong>bundles of data</strong> &#8212; typically objects &#8212; that actors pass between one another.</p></li><li><p><strong>The inputs and outputs of every actor</strong>. Rather than sharing state directly, actors communicate exclusively through messages.</p></li><li><p><strong>Immutable</strong>. Once a message is created, it cannot be changed. Think of it like sending a sealed letter: the recipient gets exactly what you dropped off, and no one can alter it in transit. This one rule eliminates an entire class of bugs.</p></li></ul><p><strong>What actually happens when an actor receives a message?</strong></p><p>One of four things:</p><ol><li><p>The actor updates its own state</p></li><li><p>It creates more actors</p></li><li><p>It sends a message to another actor</p></li><li><p>It changes its behavior (how it will respond to future messages)</p></li></ol><p>That&#8217;s it. Four activities summarize every interaction in an actor-based system.</p><p><strong>Actor messages are perfect for Domain Driven Design (DDD).</strong></p><p>DDD models code around an org&#8217;s entities and rules. It&#8217;s a natural design for our sprawling distributed systems. Anywhere the business logic is rich, stateful, and central to the product, DDD tends to shine.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zdFT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zdFT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 424w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 848w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 1272w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zdFT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png" width="1456" height="773" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:773,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:109340,&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.fullstack.zip/i/189040221?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.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_!zdFT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 424w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 848w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 1272w, https://substackcdn.com/image/fetch/$s_!zdFT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F343fd4b3-bd95-4343-a16c-a6a58751c54e_1714x910.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Real-world actors in DDD systems</figcaption></figure></div><p>Actors are a natural way to implement DDD entities &#8212; the core objects that have identity and evolve. In classic DDD, these entities exchange one of four messages:</p><ol><li><p><strong>Command</strong>: Tells an actor to change state (&#8221;Process this payment&#8221;)</p></li><li><p><strong>Event</strong>: Records that a state change happened (&#8221;PROCESSED&#8221;)</p></li><li><p><strong>Query</strong>: Requests information (&#8221;What&#8217;s the current balance?&#8221;)</p></li><li><p><strong>Results</strong>: Response to a query ($247)</p></li></ol><p>Four rules that detail how nodes communicate. Sound familiar? The terms vary, but both the Actor Model and its DDD embodiment use communication as a constraint.</p><h3>Mailboxes</h3><p>Where do actors process messages? That&#8217;s where mailboxes come in.</p><p>A mailbox is like an in-memory queue attached to each actor. Messages arrive and wait their turn. The actor works through them one at a time.</p><p>The key point here is that the mailbox is separate from the actor. The actor doesn&#8217;t manage its own queue &#8212; that&#8217;s handled by the library (like Akka in Java) or by your own implementation.</p><p>This separation seems unintuitive at first. If there is only one mailbox for each actor, why add that abstraction in the first place?</p><p>Same reason why none of our email apps support tasks: delivering and processing are two very different jobs. This separation of concerns allows the mailbox to focus on delivering the message and the actor to focus on reacting to it. Practically, it also makes scaling the system easier, as actors and their mailboxes can exist in separate containers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qPWg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qPWg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qPWg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101086,&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.fullstack.zip/i/189040221?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.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_!qPWg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!qPWg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbd10ec8-5143-436b-9877-b56508e09474_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mailboxes buffer actors</figcaption></figure></div><p></p><h3>Bringing this together</h3><p><strong>The actor model comes with a powerful guarantee: state can always be updated safely.</strong> The actor itself can only access its own state; other actors can only request that state by sending a message; only one message can be processed at a time.</p><p>Even though actors are constantly communicating, state is mediated through messages. Nothing gets corrupted by a parallel operation.</p><p>This is only possible thanks to the addition of communication rules. These keep nodes independent enough to do their jobs, while keeping the system trustworthy enough to grow.</p><p><strong>The Remote Company</strong></p><p>Imagine you&#8217;re working at an in-person company that doesn&#8217;t believe in SaaS or documentation. All decisions are verbal. When there are five of you, that works fine &#8212; it&#8217;s actually kind of fun. Once there are fifty people, everything breaks down. Shared resources get locked up. It takes forever to get people aligned. Constant interruptions undermine productivity.</p><p>Then the company reinvents itself. It goes fully remote, mandates email-only communication, and bans multi-tasking. You work through your inbox, one message at a time. Suddenly, agendas are written, conferences rooms are reserved, and everyone gets updates. It&#8217;s less <s>chaotic</s> fun, but things are actually getting done again.</p><p>The communication rules were needed to ensure the system could flow again.</p><p>That&#8217;s the actor 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_!60BA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!60BA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!60BA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!60BA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!60BA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!60BA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105308,&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.fullstack.zip/i/189040221?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.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_!60BA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!60BA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!60BA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!60BA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5976598d-24e1-4e93-ba6f-c4e93ad802eb_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Takeaways</h3><p>Why does this matter?</p><p>As our systems grow more complex, <strong>one of the most valuable skills we can develop is recognizing elegant simplicity</strong>. Alan Kay put it well: &#8220;You get simplicity by finding a slightly more sophisticated building block to build your theories out of.&#8221;</p><p>The actor model is exactly that kind of building block. It doesn&#8217;t introduce an impressive new algorithm or chip architecture. Its genius lives at the transport layer. We&#8217;ve learned to obsess over the computation layer&#8217;s complexity at the expense of the simple solutions in plain sight.</p><p>The better we get at recognizing this kind of structural simplicity, the better we can protect it from the slow erosion that complexity brings. And eventually, if we keep exercising this muscle, we&#8217;ll start designing more elegant models ourselves.</p><div><hr></div><p>Forward this to a fellow actor on your team. </p><p>Bonus points if you use DDD Command syntax.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QMhj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QMhj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 424w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 848w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 1272w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QMhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png" width="1058" height="526" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e697978a-a00e-448c-a151-a19296f8b978_1058x526.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:526,&quot;width&quot;:1058,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69858,&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.fullstack.zip/i/189040221?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.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_!QMhj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 424w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 848w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 1272w, https://substackcdn.com/image/fetch/$s_!QMhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe697978a-a00e-448c-a151-a19296f8b978_1058x526.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Keep Exploring</h3><p>Actor Fundamentals (<a href="http://akka.iohttps://akkademy.akka.io/learn/courses/21/actor-fundamentals">akka.io</a>)</p><p>Actors: a model of concurrent computation in distributed systems (<a href="http://archive.orghttps//archive.org/details/actorsmodelofcon0000agha">archive.org</a>)</p><p>The Actor Model (<a href="https://en.wikipedia.org/wiki/Actor_model">wikipedia</a>)</p><p>A Feature Model of Programming Languages (<a href="https://www.sciencedirect.com/science/article/pii/S0167642314000501#fg0110">sciencedirect</a>)</p><p>The Actor Model Whiteboard Session with Carl Hewitt (<a href="https://www.youtube.com/watch?v=7erJ1DV_Tlo&amp;t=1351s">youtube</a>)</p><p>The Actor Model, Behind the Scenes with XState (<a href="https://www.youtube.com/watch?v=GhAl0EiXmaY">youtube</a>)</p><p>Why Did the Actor Model Not Take Off? (<a href="https://www.reddit.com/r/SoftwareEngineering/comments/1n8xhz5/why_did_actor_model_not_take_off/">reddit</a>)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineering! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Simple is smart]]></title><description><![CDATA[An engineer, architect, and aviator agree]]></description><link>https://newsletter.fullstack.zip/p/simple-is-smart</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/simple-is-smart</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 22 Feb 2026 17:02:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Mnqt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There&#8217;s a tempting assumption that intelligence and complexity go hand in hand &#8212; that the smarter the person, the more elaborate their work. </p><p>I find the opposite to be true. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The people who understand something most deeply are usually the ones working hardest to make it simpler.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Mnqt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Mnqt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Mnqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4794580-98da-4720-878c-b118dd9dfaef_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;:755686,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/188655402?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.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_!Mnqt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!Mnqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4794580-98da-4720-878c-b118dd9dfaef_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"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Smart people simplify</h2><p><strong>Tim Berners-Lee</strong> understood the web as a common place for data to be shared. He could&#8217;ve flaunted his intellect by building this place with Turing-complete programming languages like Haskell or C++. But those would&#8217;ve made it harder to work with and share information. Simpler languages, on the other hand, were easier to understand and write. You can combine a handful of HTML tags to have a website. CSS won&#8217;t store your data, but a few intuitive keywords will add some visual pop. </p><p>The internet grew because its languages were simple enough for normal people to use. </p><blockquote><p>Indeed, on the Web, the least powerful language that&#8217;s suitable should usually be chosen.</p><p>&#8212; Tim Berners-Lee, The Rule of Least Power (<a href="https://www.w3.org/2001/tag/doc/leastPower.html">w3</a>)</p></blockquote><p>BTW - Tim documented seven principles of design for himself. Five of them are about simplicity (<a href="https://www.w3.org/DesignIssues/Principles.html">w3</a>). </p><p><strong>Frank Lloyd Wright</strong>&#8217;s architecture adhered to nine principles. There were two for eliminating the unnecessary (walls and decorations) and seven for integrating the essentials (nature, the foundation, heating, and lighting). These simple rules forced him to &#8216;stretch&#8217; his design vocabulary without losing coherence. Rather than imitating the eclecticism of the times, he harmonized the essentials. The varied expression of a few pure ideas is why his designs still feel modern a century later. </p><blockquote><p>To reduce the number of necessary parts of the house and the separate rooms to a minimum, and make all come together as enclosed space - so divided that light, air, and vista permeated the whole with a sense of unity.</p><p>&#8212; Frank&#8217;s first principle. </p></blockquote><p>The French aviator and literary star <strong>Antoine de Saint-Exup&#233;ry</strong> shared Wright&#8217;s appreciation for unity. He believed the role of engineers was to remove and refine away until only a cohesive whole remained. He witnessed this process with his planes. During his early flying career in the 1920s, the cockpits were a chaotic mess of raw gauges, exposed levers, and instruments scattered without much visual logic. By the time he wrote his memoir in 1939, they had smoothed so much complexity that he marveled at how he now spent more time thinking about flying and less on gadgetry. Seeing this transformation undoubtedly led to his now-famous anthem of simplicity.</p><blockquote><p>Have you ever thought, not only about the airplane but about whatever man builds, that all of man&#8217;s industrial efforts, all his computations and calculations, all the nights spent over working draughts and blueprints, invariably culminate in the production of a thing whose sole and guiding principle is the ultimate principle of simplicity? [...] If anything at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away, when a body has been stripped down to its nakedness. </p><p>&#8212; <em>Wind Sand And Stars</em></p></blockquote><p>Simplicity is not a philosophical ideal that only appeals to artists or children. </p><p>The creators of our physical and digital world recognize its power.</p><p>Make no mistake, though &#8212; the road through complexity is unglamorous and difficult. </p><p>We&#8217;ll be exploring how to navigate our way towards simple solutions in the next few Offline editions.</p><p>One thing to carry with you into the week: </p><p><strong>&#187; If your solution still feels complicated, you probably haven&#8217;t finished thinking yet.</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_!i2Zz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2Zz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 424w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 848w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 1272w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2Zz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png" width="1456" height="1373" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1373,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:245404,&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.fullstack.zip/i/188655402?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.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_!i2Zz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 424w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 848w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 1272w, https://substackcdn.com/image/fetch/$s_!i2Zz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0933e6e1-c627-4fae-b86c-85c93a521b3a_1890x1782.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">TBL introduces HTML. Recreation of his 1989 browser from worldwideweb.cern.ch</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZpvR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZpvR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 424w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 848w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 1272w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZpvR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png" width="1456" height="824" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1512789,&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.fullstack.zip/i/188655402?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.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_!ZpvR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 424w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 848w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 1272w, https://substackcdn.com/image/fetch/$s_!ZpvR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dd369b5-e154-475d-a212-21c0a83751e7_1623x918.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Simplification at work</figcaption></figure></div><div id="youtube2-C-YXxQ3bdDU" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;C-YXxQ3bdDU&quot;,&quot;startTime&quot;:&quot;9s&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/C-YXxQ3bdDU?start=9s&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Fan-In vs Fan-Out Cheat Sheet]]></title><description><![CDATA[The two system design terms you gotta know]]></description><link>https://newsletter.fullstack.zip/p/fan-in-vs-fan-out-cheat-sheet</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/fan-in-vs-fan-out-cheat-sheet</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 18 Feb 2026 17:02:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cAWW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Some system design terms will click immediately, while others won&#8217;t until you&#8217;ve seen concrete definitions and visuals. </p><p>For me, &#8220;fan-in&#8221; and &#8220;fan-out&#8221; didn&#8217;t make sense until I found some visuals and real-world examples. </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</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>If those terms seem nebulous to you, read on. </p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xuLJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xuLJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xuLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:81585,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/188280896?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.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_!xuLJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!xuLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6a71ff4-43ca-40ff-a004-3ea387889c3e_1424x1044.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Inputs fan out, outputs fan in</figcaption></figure></div><p><strong>Fan-out</strong> splits.</p><p><strong>Fan-in </strong>consolidates.</p><p><strong>Fan-out</strong>: one thing triggers many downstream operations (broadcast / scatter).</p><p><strong>Fan-in</strong>: many things consolidate into fewer results (gather / reduce)</p><p><strong>Fan-out </strong>splits a large job into smaller sub-tasks run in parallel</p><p><strong>Fan-in </strong>consolidates outputs from those tasks into a single result.</p><p><strong>Inputs </strong>are <strong>fanned out</strong>.</p><p><strong>Outputs </strong>are <strong>fanned in</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_!2p-j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2p-j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2p-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:86573,&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.fullstack.zip/i/188280896?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.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_!2p-j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!2p-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c82e2c-0eae-4c57-9514-138261ebd3a2_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><br><strong>Fan-out</strong> improves performance by running tasks in parallel.</p><p><strong>Fan-in</strong> can improve performance by preventing unnecessary work. (But it can also hurt performance in the form of a bottleneck or queue.)</p><p><strong>Fan-out </strong>happens first (scatter-gather).</p><p><strong>Fan-in </strong>happens as a result of a fan-out. (But it can happen independently, like log aggregation.)</p><h2>Fan-out examples</h2><p>A message in the <code>#announcements</code> Discord channel is fanned out to members.</p><p>A user uploads a video, and YouTube triggers tasks for audio extraction, thumbnail generation, and content moderation.</p><p>A light switch fans-out the &#8220;on&#8221; operation for three light bulbs.</p><p>When you click &#8220;Place Order,&#8221; Amazon fans-out tasks for processing the payment, updating warehouse inventory, and sending a confirmation email.</p><p>When you tap &#8220;Schedule Pickup,&#8221; Uber fans-out notifications to dozens of drivers.</p><p>When you type &#8220;best pizza,&#8221; Google fans-out your query to many shards. </p><h3>Fan-in examples</h3><p>An API fans-in duplicate queries so that only one is sent to the DB (request coalescing).</p><p>Google Flights collects individual search results from multiple airlines and presents a single list to the user.</p><p>After each cluster returns its result, Google Search fans-in the results and serves the top 10. </p><h2>When to fan</h2><p><strong>Fan-out when</strong>: work is independent, parallelizable, and latency matters. </p><p>Beware of thundering herd, cost spikes, downstream overload, and partial failures.</p><p><strong>Fan-in when</strong>: you need a single answer,  dedup, or batching. </p><p>Beware of hotspots, head-of-line blocking, slowest-task wins (&#8220;tail latency&#8221;), and complex retries.</p><p>(Check out <a href="https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance">our Discord case-study</a> for a real-world example of these trade-offs.)</p><p>A good principle is to <strong>minimize the very high fan-outs and fan-ins</strong>.</p><p>The examples above focus on data flow,  but this also applies to data modeling.</p><p>Would you rather maintain the fanned-out (purple) blog? </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cAWW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cAWW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cAWW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:120251,&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.fullstack.zip/i/188280896?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.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_!cAWW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!cAWW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75b18d0d-98b7-46e1-af09-d867bd15b4bd_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Adapted from calebhearth.com</figcaption></figure></div><p></p><p>Hopefully these terms feel a little less weird now. </p><p>Forward this to someone on your team who is also combating fan jargon.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[You Don't Need Permission]]></title><description><![CDATA[Preventing tunnel vision after rejection]]></description><link>https://newsletter.fullstack.zip/p/you-dont-need-permission</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/you-dont-need-permission</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 15 Feb 2026 17:02:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RPrn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RPrn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RPrn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RPrn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_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;:593268,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/188007127?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.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_!RPrn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!RPrn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bd87ec8-ca70-4c80-b83f-0120cd7baeb0_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"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>10 years ago, I found a scholarship that sends emerging leaders to Asia for a year.<br><br>They find them housing and even a good job.<br><br>I was hungry for adventure and validation, so I applied.<br><br>I made it to the final round, but didn't get selected.<br><br>I applied the next year, confident I'd get it this time.<br><br>Rejected.<br><br>I applied for a third year.<br><br>Rejected.<br><br>Instead of traveling the world, I got an IT job down the street.<br><br>It hurt to be denied permission to do something exciting.<br><br>It felt like the universe had conspired against me for three years. <br><br>Until I realized something so obvious now:<br><br>&gt;&gt; I could just go to Asia on my own &lt;&lt;<br><br>I didn't need any committee's permission.<br><br>A few months later, I quit my job and hopped on a one-way flight to Bangkok.<br><br>I spent the next three months rock climbing around Southeast Asia.<br><br>My Asia trip was nothing like how I planned, but that's what made it so special.</p><div><hr></div><p>I'm sharing this story partly to flex on you all. <br><br>But also because I know that rejection sucks, whether it comes from employers, committees, or dating apps. <br><br>And prolonged rejection has a way of narrowing our imagination.<br><br>If you're still knocking on the front door, here's a friendly reminder:<br><br>&gt;&gt; <strong>There&#8217;s usually more than one way in.</strong>  &lt;&lt;</p><p></p><div id="youtube2-zSdELrtUCSA" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;zSdELrtUCSA&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/zSdELrtUCSA?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mkuM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mkuM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mkuM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg" width="768" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:768,&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;:false,&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_!mkuM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mkuM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9c7e47-a14d-4ff3-a6a3-381e43b8a189_768x1024.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">3 rejection letters, 1 plane ticket</figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Discord: A Case Study in Performance Optimization]]></title><description><![CDATA[The techniques used to support trillions of messages]]></description><link>https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/discord-a-case-study-in-performance</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Fri, 13 Feb 2026 20:27:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vI0o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vI0o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vI0o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vI0o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:163951,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.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_!vI0o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!vI0o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8be354a-f5b3-481c-9166-660c0472582e_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Justifiable complexity (?)</figcaption></figure></div><p>Discord is a permanent, invite-only space where people can hop between voice, video, and text. On the surface, it seems like &#8220;just another chat app.&#8221; Take a closer look, and you&#8217;ll see that it&#8217;s really a finely-tuned system that delivers speed, scale, and reliability &#8212; the consumer app hat-trick.</p><p>Every time you send a message, join a voice channel, or watch a stream, Discord has to route the event to the right place, notify tons of clients, and do so fast enough that it feels instantaneous. That&#8217;s easy when your server has 50 people. It&#8217;s insane when it has 19 million.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>This is the story of the creative optimizations that keep Discord snappy at scale.</p><h2>Part I: The Actor Model</h2><p>Before digging into Discord&#8217;s implementation details, we need to understand the architectural pattern upon which it&#8217;s built: The Actor Model.</p><p>Carl Hewitt introduced this idea in his 1973 paper (<a href="https://www.ijcai.org/Proceedings/73/Papers/027B.pdf">pdf</a>). Alan Kay embraced it for passing messages in the 80s. Gul Agha formalized its relevance for distributed systems in 1985. Since then, many teams and tools have adopted the model. If you&#8217;ve ever read an elaborate sequence diagram or worked in an &#8220;event-driven architecture,&#8221; you can thank the Actor Model.</p><h3><strong>What problem does the model address?</strong></h3><p>In shared-memory, multiple threads use the same state, which quickly results in race conditions. You can prevent this by adding a <strong>data-access constraint: locks</strong>. But locks come with their own bugs, like when multiple threads wait for the other to release the lock, resulting in a permanent freeze (deadlock). As systems grow, these problems become bottlenecks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BSCw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BSCw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BSCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:181717,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.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_!BSCw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!BSCw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7afb3cfd-c5d8-46ed-90ea-e01563adacd3_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Adapted from Gul Agha, <em>Actors: A Model of Concurrent Computation in Distributed Systems</em> (93).</figcaption></figure></div><p><strong>The Actor Model allows data to be updated more easily in distributed systems.</strong></p><p>An <code>actor</code> is an agent with a mail address and a behavior. Actors communicate through messages and carry out their actions concurrently. Instead of locks, the Actor Model ensures safe concurrency with <strong>communication constraints</strong>. The Actor Model can be summarized in four rules:</p><pre><code>1. Each actor owns its state (no one else can directly mutate it)
2. Actors only communicate through messages
3. Actors process messages one at a time (no race conditions)
4. In response to a message, an actor can:
   - Change its state
   - Send messages
   - Create child actors</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iM7J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iM7J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iM7J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73384,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.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_!iM7J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!iM7J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d699cb6-9378-4137-947d-ff021637619f_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Anatomy of an actor. Adapted from <a href="https://biohaviour.com/actors-a-simpler-version-of-agents/](https://biohaviour.com/actors-a-simpler-version-of-agents">biohaviour</a></figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ns0H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ns0H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ns0H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ccb07378-485c-4973-b248-a66fc83384de_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105308,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.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_!Ns0H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!Ns0H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccb07378-485c-4973-b248-a66fc83384de_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Follow the rules and avoid race conditions</figcaption></figure></div><p>Here&#8217;s an actor who follows the rules.</p><pre><code>actor.start();
actor.send(message);          // send to another
actor.subscribe(s =&gt; { ...}); // listen to another
actor.getSnapshot();          // cached result from .subscribe</code></pre><p>As you can see, actors alone are actually pretty simple, almost pure.</p><p>As long as you play by the rules, you won&#8217;t have race conditions and lock spaghetti. You also get a few other benefits:</p><ul><li><p><strong>Location independence.</strong> The interface means that you can be confident each actor will behave consistently regardless of its location. Doesn&#8217;t matter if one actor is on localhost and another is remote. Two actors can even share the same thread (no thread management!).</p></li><li><p><strong>Fault tolerance</strong>. If one actor fails, its manager can revive it or pass its message to an available actor.</p></li><li><p><strong>Scalability</strong>. Actors are easy to instantiate, making them compatible with microservices and horizontal scaling.</p></li><li><p><strong>Composability</strong>. They encourage atomic over monolithic architecture.</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_!rL13!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rL13!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!rL13!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!rL13!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!rL13!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rL13!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104301,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.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_!rL13!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!rL13!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!rL13!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!rL13!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b523844-8494-48a5-83b9-d5a21701eea9_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How actors can chat asynchronously. Adapted from theserverside.com</figcaption></figure></div><h3>Actors in the wild</h3><p>There was a quiet period after Hewitt dropped his paper, but adoption has recently taken off in response to our growing data footprint.</p><p>Here are a few modern examples of the actor model:</p><p><strong>Video editing software</strong> sends each setting change so that they are reflected in the draft immediately.</p><p><strong>Trading platforms (Robinhood)</strong> treat each withdrawal as an isolated actor, which has a function to update an account. Say you have $10 in your account. If you and your wife both try to buy $10 of $GME simultaneously, your app will process the request that arrives first. When the second gets out of the queue, it&#8217;ll run the <code>checkBalance</code> statement, see that it&#8217;s now $0, and deny it.</p><p><strong>AI agents</strong>. An agent is an actor. It passes messages (prompts), has internal state (context), and spawns other agents (actors). AI Agents are the perfect use case for the pattern, as Hewitt anticipated. His original paper was called &#8220;A Universal Modular ACTOR Formalism for <strong>Artificial Intelligence,&#8221;</strong> after all.</p><p>If you squint past the trendy design and jargon on <a href="https://akka.io/how-akka-works">Akka&#8217;s site</a>, it looks like the same pitch Hewitt made five decades ago.</p><blockquote><p>Event-driven fabric</p><p>Multi-step agents</p><p>Persisted state through snapshots and change events</p><p>Isolated execution units that maintain their own state</p><p>Parallel processing without shared bottlenecks</p><p>Unbounded data flows</p></blockquote><p>The next time you see these keywords on a landing page, remember to get out your Actor Pattern Buzzword card and yell &#8220;Bingo!&#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_!rkE5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rkE5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rkE5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:164774,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.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_!rkE5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!rkE5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06df51b6-ff33-4c44-9913-42f445724c65_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Adapted from akka.io</figcaption></figure></div><p></p><p>This concept is relevant on the frontier as well as in the verticals. Cursor&#8217;s <a href="https://cursor.com/blog/self-driving-codebases">self-driving codebase experiment</a> took a first-principled journey from unconstrained sharing to a well-defined communication flow between planner and workers. Sounds very similar to actors and managers, doesn&#8217;t it?</p><p>Is it silly that we&#8217;re pretending to be pioneers by rejecting the idea of a global state? Yes, but at least we&#8217;re not the only ones who need to rediscover old problems: the agents in Cursor&#8217;s experiment also tried and failed to make locks work.</p><blockquote><p>Agents held locks for too long, forgot to release them, tried to lock or unlock when it was illegal to, and in general didn&#8217;t understand the significance of holding a lock on the coordination file. &#8212; Wilson Lin @ Cursor</p></blockquote><p>Thankfully, the Actor Pattern still works regardless of our willingness to recognize it.</p><h3>What&#8217;s the catch?</h3><p>It&#8217;s really cool that the Actor Pattern has gained relevance over the decades. But the model isn&#8217;t without trade-offs. Things become more complicated when you add production necessities, such as a manager, callbacks, promises, initial state, and recovery. The ease of composition will inevitably lead some teams into microservice hell, where they&#8217;ll get lost in boilerplate and hairball graphs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GeV-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GeV-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GeV-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1005935,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.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_!GeV-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!GeV-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F467acb61-bcae-42cc-ac01-f5d9ccb541e9_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Oops, you got excited and now have 4,000 microservices.</figcaption></figure></div><p><strong>Debugging</strong> <strong>dataflow bugs can be harder</strong>. Although each actor has well-isolated logging, it can be harder to trace a bug across multiple services.</p><p><strong>Price</strong>. Agents that create more agents is a dream for the engineering team. If that process isn&#8217;t constrained, however, it&#8217;ll turn into a nightmare for the finance team.</p><p>Finally, implementing the actor model in a big org <strong>requires education</strong>. Pure functions, state machines, event-driven architecture &#8212; these are unfamiliar concepts to many. It took me days of research before I &#8220;got it.&#8221; Many orgs won&#8217;t want to dedicate the time to get everyone thinking in a new paradigm, so they&#8217;ll fall back to their monolithic habits.</p><p>Thankfully, the industry has started bridging the gap between the usefulness of this Actor Model and its adoption complexity by creating languages and frameworks. These preserve the actors&#8217; tenets while making them easier to implement.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sr1H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sr1H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 424w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 848w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 1272w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sr1H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png" width="1456" height="513" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11735275-d9c7-4038-958f-43a478747616_2076x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:513,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:166260,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.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_!sr1H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 424w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 848w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 1272w, https://substackcdn.com/image/fetch/$s_!sr1H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11735275-d9c7-4038-958f-43a478747616_2076x732.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">They&#8217;re all actors</figcaption></figure></div><h3>Summary</h3><p><strong>The actor model makes it easier to avoid locks and race conditions in distributed systems. It does this by standardizing communication and data access.</strong></p><p>Letting too many things share the same data and chat freely leads to chaos. Think: startup engineer who has to handle info from Slack, hallway requests from the PM, email, and standup. That guy is going to overcommit (deadlock), forget (data loss), and struggle to organize (recovery).</p><p><strong>Using an actor model is like requiring everyone to communicate over email</strong>. Everyone follows the rules of SMTP (recipient, subject, body) and can only respond to one email at a time (concurrency). In this system, the communication constraints minimize mistakes and conflicts.</p><p><strong>All this adds up to a faster, more reliable system at scale</strong>. Everyone knows how to talk to each other. They know how to ask for and deliver things. This helps them work autonomously without blocking others.</p><p>Having an efficient pattern becomes more important the more distributed a system becomes. As Gul predicted in 1985, more time is spent on &#8220;communication lags than on primitive transformations of data.&#8221; A team that knows that all too well is Discord, which has successfully instrumented the Actor Model to process trillions of messages without data loss or latency.</p><p>Let&#8217;s see how.</p><h2>Part II: How Discord Processes Trillions of Messages</h2><blockquote><p>Everything is an &#8220;actor.&#8221; Every single Discord server, WebSocket connection, voice call, screenshare, etc... distributed using a consistent hash ring.</p><p>It&#8217;s an incredibly great model for these things. We&#8217;ve been able to scale this system from hundreds to hundreds of millions of users with very little changes to the underlying architecture. </p><p>&#8212; Jake, Principal Engineer @ Discord</p></blockquote><p>Thanks to Discord&#8217;s initial target user, gamers, speed has always been an unquestioned requirement. When a message is sent, others need to see it immediately. When someone joins a voice channel, they should be able to start yapping right away. A delayed message or laggy chat can ruin a match.</p><p>Discord needed a smooth way to turn plain text/voice data into internal messages and then route them to the correct guild (AKA: Discord server) in real-time.</p><h3>How data flows</h3><p>Guilds and users talk over Elixir and WebSockets.</p><ol><li><p>Users connect to a WebSocket and spin up an Elixir session process, which then connects to the guild.</p></li><li><p>Each guild has a single Elixir process, which acts as a router for all guild activity.</p></li><li><p>A Rust data service deduplicates API queries before sending them to ScyllaDB.</p></li><li><p>Background communication happens over PubSub. For example, the Elasticsearch worker consumes events, batches with others, and starts indexing.</p></li></ol><h3><strong>How the fan-out works</strong></h3><p>&#8220;Fan-out&#8221; refers to the act of sending a message to multiple destinations in parallel without requiring a response. This is exactly what Discord needed to implement to make their chat feel real-time. When a user comes online, they connect to a guild, and the guild publishes presence to all other connected sessions. Each guild and connected user has one long-lived Erlang process. The guild&#8217;s process keeps track of client sessions and sends updates to them. When a guild receives a message, it fans it out to all client sessions. Finally, each session process pushes the update over WebSocket to the client.</p><p>In other words:</p><pre><code><code>User &#8596; WebSocket &#8596; Session &#8596; Guild</code></code></pre><h3>Improving the fan-out</h3><p>Elixir&#8217;s functional implementation of the Actor Pattern allowed it to handle a lot of processes with ease compared to other languages.</p><pre><code><code># Publishing to other guilds in 4 lines of Elixir. Pretty neat.
def handle_call({:publish, message}, _from, %{sessions: sessions}=state) do
  Enum.each(sessions, &amp;send(&amp;1.pid, message))
  {:reply, :ok, state}
end</code></code></pre><p>The language&#8217;s affordances helped Discord get started easily. But as usage grew, it became clear that they&#8217;d need to do more to stay responsive. If 1,000 online members each said, &#8220;hello, world&#8221; once, Discord would have to process 1 million notifications.</p><p>10,000 messages &#8594; 100 million notifications.</p><p>100,000 &#8594; 10 billion.</p><p>Given that each guild is one process, they needed to max out the throughput of each. Here&#8217;s how they did that:</p><ol><li><p>Splitting the work across multiple threads using a relay</p></li><li><p>Tuning the Elixir in-memory database</p></li><li><p>Using workers processes to offload operations (maintenance, deploys)</p></li><li><p>Delegating the fan-out to a separate &#8220;sender,&#8221; offloading the main process</p></li></ol><p>Thanks to these efforts, routing the notifications to users in a massive guild no longer became the crippling bottleneck it easily could&#8217;ve.</p><p>But when one bottleneck is removed, another takes its place. In Discord&#8217;s case, their next biggest problem shifted from the messaging layer down to the database.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xyVf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xyVf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xyVf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116287,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.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_!xyVf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!xyVf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34916b39-bdf7-4fef-97e5-0a11abf2691e_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">How the relay saves resources</figcaption></figure></div><h2>Part III: Discord&#8217;s Hot Partitions</h2><h3><strong>Problem: The Cassandra database was causing slowness</strong></h3><p>With notifications being routed to the correct guild, and Discord&#8217;s API converting those payloads into queries, the last step was to get the data back from their Apache Cassandra cluster. As a NoSQL database optimized for horizontal scaling, Cassandra should&#8217;ve scaled linearly without degrading performance. Yet, after adding 177 nodes and trillions of messages, reads were slowing in popular servers.</p><p>Why??</p><p>In a word: partitions.</p><p>Discord partitioned their <code>messages</code> data across Cassandra using channel ids and a 10-day window, and partitions were replicated across three Cassandra nodes.</p><pre><code><code>CREATE TABLE messages (
    channel_id bigint,
    bucket int,        // static 10-day time window
    message_id bigint,
    author_id bigint,
    content text,
    PRIMARY KEY ((channel_id, bucket), message_id)
) WITH CLUSTERING ORDER BY (message_id DESC);
</code></code></pre><p>That&#8217;s fine, but two other factors were at play:</p><ol><li><p>Popular guilds get orders of magnitude more messages than smaller ones. Midjourney has 19 million members, of whom over 2 million could be online at any time.</p></li><li><p>Reads (search, fetching chat history) are more expensive than writes in Cassandra, due to its need to query its memtable and SSTables.</p></li></ol><p>Lots of reads led to hot partitions, which slowed the <code>messages</code> reads, which slowed the guild. What&#8217;s worse, the (valid) use of replication and quorums made other parts of Discord slow, like the upstream nodes that queried the hot partitions. Running maintenance on a backed-up cluster also became tricky due to Cassandra&#8217;s high garbage collection, which resulted in many &#8220;stop the world&#8221; events. Cassandra&#8217;s endless config options &#8212; flags, gc algorithms, heap sizes &#8212; only made it harder to mitigate these issues.</p><pre><code><code>  // messages in a channel
  [{
    "channel_id": 1072891234567890123,
    "bucket": 19783, // #announcements channel
    "message_id": 1072934567890123456,
    "author_id": 856781234567890123, // Midjourney dev
    "content": "Hey @everyone, v2 is live. Try it out!"
  },
  {
    "channel_id": 1072891234567890123, // snowflake id
    "bucket": 19783,
    "message_id": 1072934567890123455,
    "author_id": 923456789012345678, // user
    "content": "woah, so cool"
  }]
</code></code></pre><p><strong>Why the partition scheme wasn&#8217;t the problem</strong></p><p>I instinctively pointed my finger at that 10-day static bucket window and thought, &#8220;That&#8217;s silly. There&#8217;s gotta be a better way to organize the data.&#8221;</p><p>But is there?</p><ul><li><p>If they dropped the <code>bucket</code> altogether, the hot partitions would get even hotter.</p></li><li><p>If they added a random <code>shard</code> to the partition key, they&#8217;d trade hot partition problems with fan-out problems (extra queries, more latency).</p></li><li><p>If they made the buckets smaller (1-day or 1-hour), they&#8217;d have to coordinate more round trips.</p></li><li><p>What if they kept Cassandra for what it&#8217;s good at (writes) and moved reads to another solution (cache + index + log)? Sounds complicated.</p></li><li><p>Partitioning by <code>message_id</code> would eliminate hot partitions altogether. But Discord&#8217;s primary use case for reads is to get the most recent messages in a channel. Fetching &#8220;the last 50 messages in <code>#general</code>&#8221; now becomes a huge hunt across every node in the cluster.</p></li></ul><p>Every option either makes it harder to target the data or trades hot partition problems with other problems. So, searching for a more capable database actually seems like a sound first step. If they find one that can cool down the partitions enough to avoid a bottleneck, they could avoid adding more business logic to the data layer.</p><p>Thankfully, they found what they were looking for</p><h3><strong>Solution 1: Switch to ScyllaDB</strong></h3><p>ScyllaDB is a hard-to-pronounce C++ NoSQL data store that advertises itself as &#8220;The Cassandra you really wanted.&#8221;</p><p>Zing.</p><p>On paper, it seems to back that claim up. It&#8217;s faster. It&#8217;s cheaper. It&#8217;s simpler.</p><p>How? Here is the gist:</p><ul><li><p>Per-core sharding &#8594; more efficient CPU</p></li><li><p>Per-query cache bypassing &#8594; faster queries</p></li><li><p>Per-row repair (vs partition) &#8594; faster maintenance</p></li><li><p>Better algorithms for scheduling, compiling, drivers, and transactions</p></li><li><p>No garbage collection</p></li></ul><p>After reading the full <a href="https://www.scylladb.com/compare/scylladb-vs-apache-cassandra/#tan-simplicity">Cassandra vs ScyllaDB comparison</a>, I actually felt bad for Cassandra. Like, this was supposed to be a friendly scrimmage &#8212; take it easy, guys.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bhco!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bhco!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!bhco!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!bhco!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!bhco!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bhco!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:875951,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.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_!bhco!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!bhco!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!bhco!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!bhco!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac2ee95-01e9-4231-bc24-98c52dfaa911_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Similar to their early investment in the then-unproven Elixir language, their early bet on Scylla still demanded some work. They had to work with the Scylla team to improve its reverse queries, for example, which were initially insufficient for scanning messages in ascending order. Eventually, Scylla got good enough to support Discord&#8217;s workflows, and Discord got good enough at Scylla to casually write <a href="https://www.amazon.com/ScyllaDB-Action-Bo-Ingram/dp/1633437264">the 392-page book</a> on it.</p><pre><code><code># Optimization scorecard

Better fan-out (service layer): &#10004;&#65039;
Better DB (data layer): &#10004;&#65039;
</code></code></pre><p>What else did Discord do to maintain speed at scale?</p><p>Turns out, everything.</p><p>Let&#8217;s look at two more in detail.</p><h3><strong>Solution 2: Request Coalescing</strong></h3><p>Regardless of how compatible your DB is with your app, overriding it with requests will cause latency. Discord encountered this problem with its Python API, which other services could call directly to fetch data from the database. Unfortunately, the message fan-out mechanism resulted in lots of duplicate requests in popular guilds.</p><p>This duplicate request problem isn&#8217;t unique to Discord, Python, or NoSQL. It&#8217;s been around ever since lots of people wanted to access the same information. If you are serving thousands of hits per second, the queue of waiting requests can get huge.</p><p>This introduces two problems:</p><ol><li><p>The CPU releases thousands of threads, sending the load sky high (AKA: &#8220;thundering herd&#8221;).</p></li><li><p>Users don&#8217;t like waiting.</p></li></ol><p>To protect itself from a herd of redundant <code>messages</code> queries after someone spams <code>@everyone</code> in <code>#announcements</code>, Discord introduced a new Rust service, their Data Service Library. When a request comes into the Data Service Library, it subscribes to a worker thread. This worker makes the query and then sends the result over gRPC to all the subscribers. If 100 users request the same message simultaneously, there will only be one DB request.</p><pre><code><code>Request -&gt; Python API -&gt; DB
Request -&gt; Python API -&gt; Data Service Library -&gt; DB</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mJPD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mJPD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mJPD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299977,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.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_!mJPD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!mJPD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b69178-5490-4685-b65d-e216f1bfda9a_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Adapted from medium.com/@mr.sourav.raj</figcaption></figure></div><p>This technique successfully reduced inbound query rate by 10-50x for popular channels and scaled DB connections linearly (one per worker, not per concurrent request). In addition to speeding up UX, it also increased Discord&#8217;s confidence in shipping concurrent code, which undoubtedly improved product velocity and reduced bugs.</p><p>Most importantly, however, it let them say they rewrote it in Rust.</p><blockquote><p>Meme cred is very important. </p><p>&#8212; Bo Ingram, Senior Software Engineer @ Discord</p></blockquote><p>Not a team to rest on their meme laurels, they further optimized request handling by routing each message according to its <code>channel_id</code>. For example, all requests for an <code>#announcements</code> channel go to the same message service. This sounds like it&#8217;d be a bad thing, but apparently Rust&#8217;s magic lets it handle this case without a sweat. This also makes the request routing from the above point much simpler, as all queries for <code>channel_id=123</code> hit the same instance&#8217;s in-memory cache.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kXxz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kXxz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kXxz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png" width="1424" height="1044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1044,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:110928,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.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_!kXxz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 424w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 848w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 1272w, https://substackcdn.com/image/fetch/$s_!kXxz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7305ec70-231a-493d-9681-ca08f4a9f7d6_1424x1044.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Matching the channel to the service</figcaption></figure></div><p><strong>Was the Rust coalescing service overkill? Should they have just used their Redis cache and moved on?</strong></p><p>I don&#8217;t think so. Caching is about serving slightly stale content. Instead of reducing the total number of requests in the herd, it would&#8217;ve simply made each request faster. It also would&#8217;ve come with more code to manage.</p><p>Caching as a standalone solution to the thundering herd works for apps that don&#8217;t need to feel &#8220;real-time.&#8221; For example, a news site might serve a slightly outdated version of its main page immediately to prevent visitors from having to wait to read something. This buys them time to fetch and render the latest article. The result is faster perceived load times. If they didn&#8217;t do this, a thundering herd problem would emerge if 10,000 visitors loaded a trending article at the same time.</p><p>Here&#8217;s how one HTTP proxy implemented this caching strategy using a simple grace value:</p><pre><code><code>// Vinyl Cache (2010-2014)
// &lt;https://vinyl-cache.org/docs/6.1/users-guide/vcl-grace.html#grace-mode&gt;
sub vcl_hit {
     if (obj.ttl &gt;= 0s) {
          // A pure unadulterated hit, deliver it
          return (deliver);
     }
     if (obj.ttl + obj.grace &gt; 0s) {
          // Object is in grace, deliver it
          // Automatically triggers a background fetch
          return (deliver);
     }
     // fetch &amp; deliver once we get the result
     return (miss);
}
</code></code></pre><p>Key takeaway: <strong>When queries are expensive (DB round-trip, API call), in-flight deduplication is cheaper than a distributed cache</strong>.</p><p>For the record, Discord utilizes this type of caching with their CDN and Redis, but not in the Rust Data Service. (If you&#8217;re still hungry for more request optimization nuances, read up on <a href="https://blog.alexoglou.com/posts/hedging/">Request Hedging</a> and comment whether you think it would&#8217;ve helped Discord&#8217;s thundering herd problem.)</p><p>Clearly, the request layer was prime territory for optimization, which makes sense for an app that sends many small payloads (a few hundred bytes each). What might be more surprising is where Discord unlocked its next big performance win.</p><pre><code><code># Optimization scorecard
Better fan-out (service layer): &#10004;&#65039;
Better DB (data layer): &#10004;&#65039;
Better queries (API layer): &#10004;&#65039;
Memes (vibes layer): &#10004;&#65039;
Better disks (hardware!): ??
</code></code></pre><h3>Solution 3: <strong>Super-Disk</strong></h3><p>Eventually, the biggest impact on Discord&#8217;s database performance became <strong>disk operation</strong> <strong>latency</strong>. This latency resulted in an ever-growing queue of disk reads, eventually causing queries to time out.</p><p>Discord runs on GCP, which offers SSDs that can operate with <em>micro</em>seconds. How is this even an issue?</p><p>Remember that Discord needs <strong>speed and reliability</strong>. The SSDs are fast, but they failed Discord&#8217;s second requirement during internal testing. If a disk holds data in memory and then fails, the data is unrecoverable.</p><p>GCP + SSD = &#128581;&#8205;&#9794;&#65039; (too unreliable)</p><p>What about GCP&#8217;s Persistent Disk option? These are great for duplicating and recovering data. But they&#8217;re slow: expect a couple of milliseconds of latency, compared to half a millisecond for SSDs.</p><p>GCP + Persistent Disk = &#128581;&#8205;&#9794;&#65039; (too slow)</p><p>No worries, surely GCP offers a disk abstraction that delivers the best of both SSD and Persistent Disk.</p><p>Nope.</p><p>Not only does GCP make you pick between fast and reliable, but their SSDs max out at 375 GB &#8212; a non-starter for the Discord DB instances that require 1 TB.</p><p>Once again, the Discord engineers were on their own.</p><p>They had to find a way to</p><ol><li><p>Stay within <strong>GCP</strong></p></li><li><p>Continue <strong>snapshotting</strong> for backups</p></li><li><p>Get low-latency disk <strong>reads</strong></p></li><li><p>Maintain <strong>uptime</strong> guarantees</p></li></ol><p>So what creative solution did they cook up this time? The &#8220;Super-Disk&#8221;: A disk abstraction that involves Linux, a <a href="https://en.wikipedia.org/wiki/Cache_(computing)#WRITE-THROUGH">write-through cache</a>, and RAID arrays. They wrote <a href="https://discord.com/blog/how-discord-supercharges-network-disks-for-extreme-low-latency">a breakdown</a> with the details, so here&#8217;s the summary: GCP + SSD + Persistent Disk = &#128077; (fast, reliable).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I43Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I43Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 424w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 848w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 1272w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!I43Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png" width="892" height="340" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1942080-2224-40ad-99f4-9c253c4c017f_892x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:892,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34659,&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.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.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_!I43Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 424w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 848w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 1272w, https://substackcdn.com/image/fetch/$s_!I43Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1942080-2224-40ad-99f4-9c253c4c017f_892x340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Much better</figcaption></figure></div><h3>Bonus: 5 More Solutions</h3><p>We walked through the juicy optimization solutions to the hot partition problem. But Discord didn&#8217;t view performance as an isolated priority. Instead, they took every opportunity they found to make things fast. Here is a final roundup of other interesting techniques they used.</p><p><strong>Request routing by PIDs (messaging).</strong> They optimized how messages are passed between nodes by grouping PIDs by their remote node and then hashing them according to the number of cores. Then they called it <a href="https://github.com/discord/manifold">Manifold</a> and open-sourced it.</p><p><strong>Sortable Ids (data).</strong> They used Twitter&#8217;s &#8220;Snowflake&#8221; id format, which is based on timestamps. This let them generate ids without a DB, sort by creation time, and infer when a message was sent by its id alone. The Snowflake project is zipped up in a public archive, but I dug up the good part for you. Notice how the timestamp is used.</p><pre><code><code>  protected[snowflake] def nextId(): Long = synchronized {
    var timestamp = timeGen()

    if (timestamp &lt; lastTimestamp) {
      exceptionCounter.incr(1)
      log.error("clock is moving backwards.  Rejecting requests until %d.", lastTimestamp);
      throw new InvalidSystemClock("Clock moved backwards.  Refusing to generate id for %d milliseconds".format(
        lastTimestamp - timestamp))
    }

    if (lastTimestamp == timestamp) {
      sequence = (sequence + 1) &amp; sequenceMask
      if (sequence == 0) {
        timestamp = tilNextMillis(lastTimestamp)
      }
    } else {
      sequence = 0
    }

    lastTimestamp = timestamp
    ((timestamp - twepoch) &lt;&lt; timestampLeftShift) |
      (datacenterId &lt;&lt; datacenterIdShift) |
      (workerId &lt;&lt; workerIdShift) | 
      sequence
  }
</code></code></pre><p>Of course, Discord had to add its own touch to the ID. Instead of using the normal epoch (1970), they used the company&#8217;s epoch: the first second of 2015. I&#8217;d normally roll my eyes at this kind of unnecessary complexity. But that&#8217;s pretty cool, so instead I grant +5 meme points.</p><p><strong>Elasticsearch abstraction (search).</strong> Although they don&#8217;t store messages in Elasticsearch, they store message metadata and user DMs for indexing and fast retrieval. To support the use case of searching through all of a user&#8217;s DMs, they grouped their Elasticsearch clusters in &#8220;cells.&#8221; This helped them avoid some bottlenecks during indexing. It also helped them index a message by <code>user_id</code> (instead of <code>guild_id</code>), which enabled cross-DM search.</p><p><strong>WebRTC</strong> <strong>tuning (entry).</strong> I stayed away from WebRTC here because I covered the basics in the Google Meet breakdown on our YouTube channel. However, Discord does do some interesting stuff at this layer: using the Opus codec, circumventing the auto-ducking on Windows in favor of their own volume control, voice detection, and reducing bandwidth during silence.</p><p><strong>Passive sessions (entry)</strong>: Turns out that 90% of large server sessions are passive; the users aren&#8217;t actively reading or writing in them. The team realized they could improve latency by simply sending the data to the right users at the right time. If a user doesn&#8217;t have a guild tab open, they won&#8217;t receive all of the new messages. But once they tab into the guild, their passive session will be &#8220;upgraded&#8221; into a normal session, and they&#8217;ll receive the full firehose of messages in real-time. This led to a 20% reduction in bandwidth. Amazing example of a big perf win that isn&#8217;t technically complicated.</p><p><strong>Emojis and lists on Android (client)</strong>: They were committed to React Native. Then they saw that the custom emojis weren&#8217;t rendering well on low-grade Androids. So, they abandoned their original plan and wrote the emoji feature in Kotlin <em>while also maintaining React Native</em>. The worst of both worlds: their architecture is now split between iOS (React Native) and Android (native).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OfxV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OfxV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 424w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 848w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 1272w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OfxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp" width="500" height="557" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:557,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3886982,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/187330984?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OfxV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 424w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 848w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 1272w, https://substackcdn.com/image/fetch/$s_!OfxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5851ad16-1bd6-4873-9e2f-9250c3d65f43_500x557.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Left screen is laggy. From &#8220;Supercharging Discord Mobile&#8221; (discord.com)</figcaption></figure></div><p>Similar story for rendering lists. They needed to create their own library. Then they adopted Shopify&#8217;s. When that stopped working, they created another library that used the native <code>RecyclerView</code>. All for rendering lists quickly on Android.</p><pre><code><code># Optimization scorecard
Fan-out (service layer): &#10004;&#65039;
DB (data layer): &#10004;&#65039;
Queries (API layer): &#10004;&#65039;
Disk (hardware): &#10004;&#65039;
Routing: &#10004;&#65039;
Ids: &#10004;&#65039;
WebRTC: &#10004;&#65039;
Sessions: &#10004;&#65039;
Emojis: &#10004;&#65039;
</code></code></pre><p>This team will tackle any performance problem in the stack with a calm recklessness that I can&#8217;t help but admire.</p><h2>Part IV: Lessons for Engineers</h2><p>While most of us won&#8217;t have to handle trillions of messages, there are some elegant engineering principles we can learn from Discord&#8217;s success over the last decade.</p><h3><strong>Build for simplicity in v1, but design for change.</strong></h3><p>We examined the migration from Cassandra &#8594; ScyllaDB. But they actually started with a DB that was even more unfit for their eventual scale: Mongo. They picked it during the early days because it bought them the time to experiment and learn what they needed. As they suspected, Mongo eventually gave them enough problems (like <a href="http://qq.is/mongodb/2012/01/30/mongodb-disappoints-me-again.html">incorrectly labeling states</a>) to warrant moving to Cassandra. When their Cassandra problems got serious enough, they moved to Scylla.</p><p><strong>This is the right way the stack should evolve.</strong></p><p>They could&#8217;ve never anticipated the bottlenecks at the onset, let alone the right solutions to them (ScyllaDB wasn&#8217;t even a viable alternative at the time). Instead of wasting time over-projecting future problems, they picked the tool that helped them serve users and focused on their current bottleneck. They also didn&#8217;t overfit their systems according to their current DB, which would&#8217;ve slowed down the inevitable migration.</p><p><strong>Anticipate the future headaches, but</strong> <strong>don&#8217;t worry about preventing them in v1.</strong> Create the skeleton of your solution. Fill in the details with a hacky v0. When the pain happens, find your next solution.</p><h3>Learn the fundamentals.</h3><p><strong>Language fundamentals</strong>.</p><p>Deeply understanding a language helps you pick the right one. When Discord started evaluating the functional programming language Elixir, it was only three years old. Elixir&#8217;s guarantees seemed too good to be true. As they learned more about it, however, they found it easier to trust. As they scaled, so did their need to master Elixir&#8217;s abstractions for concurrency, distribution, and fault-tolerance. Nowadays, frameworks handle these concerns, but the language provided the building blocks for capable teams like Discord to assemble their own solutions. After over a decade, it seems like they&#8217;re happy they took a bet on an up-and-coming language:</p><blockquote><p>What we do in Discord would not be possible without Elixir. It wouldn&#8217;t be possible in Node or Python. We would not be able to build this with five engineers if it was a C++ codebase. Learning Elixir fundamentally changed the way I think and reason about software. It gave me new insights and new ways of tackling problems. </p><p>&#8212; Jake Heinz, Lead Software Engineer @ Discord</p></blockquote><p>There is a world where the 2016 Discord engineers were unwilling to experiment with an unproven language, instead opting for the status quo stack. No one would&#8217;ve pushed back at the time. Perhaps that&#8217;s also why no one can match their performance in 2026.</p><p><strong>Garbage collection fundamentals</strong>.</p><p>GC&#8217;s unpredictability hampered Discord&#8217;s performance on multiple dimensions.</p><blockquote><p>We really don&#8217;t like garbage collection </p><p>&#8212; Bo Ingram, Senior Software Engineer @ Discord</p></blockquote><p>On the <strong>DB layer</strong>, Cassandra&#8217;s GC caused those &#8220;stop-the-world&#8221; slowdowns. On the <strong>process layer</strong>, BEAM&#8217;s default config value for its virtual binary heap was at odds with Discord&#8217;s use case. Although it was a simple config fix, a lot of debugging and head-scratching were required (<a href="https://discord.com/blog/maxjourney-pushing-discords-limits-with-a-million-plus-online-users-in-a-single-server">discord</a>).</p><blockquote><p>Unfortunately, our usage pattern meant that we would continually trigger garbage collection to reclaim a couple hundred kilobytes of memory, at the cost of copying a heap which was gigabytes in size, a trade-off which was clearly not worth it. </p><p>&#8212; Yuliy Pisetsky, Staff Software Engineer @ Discord</p></blockquote><p>At the <strong>microservice layer</strong>, they had a &#8216;Read States&#8217; service written in Go, whose sole purpose was to keep track of which channels and messages users had read. It was used every time you connected to Discord, every time a message was sent, and every time a message was read. Surprise, surprise &#8212; Go&#8217;s delayed garbage collection led to CPU spikes every two minutes. They had to dig into Go&#8217;s source code to understand why this was happening, and then had to roll out a duct-tape config solution that worked OK enough&#8230;until Rust, void of a garbage collector, arrived to save the day.</p><blockquote><p>Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. </p><p>&#8212; Jesse Howarth, Software Engineer @ Discord (<a href="https://medium.com/discord-engineering/why-discord-is-switching-from-go-to-rust-a190bbca2b1f">medium</a>)</p></blockquote><p>The team had to go on so many wild garbage-collecting goose hunts that I&#8217;m sure they&#8217;re now experts in the topic. While learning more about gc wouldn&#8217;t have prevented the problems from happening, I suspect it would&#8217;ve made the root cause analysis smoother.</p><p>As MJ said, &#8220;Get the fundamentals down and the level of everything you do will rise.&#8221; If Michael Jordan and The Michael Jordan of Chat Apps can appreciate the basics, then so can I.</p><h3>Define your requirements early.</h3><p>The high expectations of their early gamer users solidified the need to prioritize speed and reliability from day one. This gave the young team clarity: they knew they&#8217;d need to scale horizontally and obsess over performance.</p><blockquote><p>From the very start, we made very conscious engineering and product decisions to keep Discord well suited for voice chat while playing your favorite game with your friends. These decisions enabled us to massively scale our operation with a small team and limited resources. </p><p>&#8212; Jozsef Vass, Staff Software Engineer, Discord</p></blockquote><p>At scale, even a &#8220;small&#8221; feature can turn into a massive undertaking. Calling <code>@here</code> or sending <code>...</code> typing presence in a 1M user Midjourney guild isn&#8217;t trivial. Discord&#8217;s need to deliver first-class speed forced it to keep the UX refined and focus on the endless behind-the-scenes witchcraft we discussed here. Had they compromised their performance principle by chasing trends or rushed into other verticals, they would&#8217;ve eroded their speed advantage.</p><p>This is why, eleven years since the Discord epoch, the app still doesn&#8217;t feel bloated or slow.</p><p>Although every feature feels like it&#8217;s just a prompt away from prod, clarifying your value prop is still crucial. Discord&#8217;s was <strong>voice chat for gamers</strong>.</p><p>What is yours?</p><p>If you don&#8217;t have a good answer, you&#8217;ll either ship so slow that you&#8217;ll get outcompeted or go so fast that your app becomes slop.</p><h3>Build a good engineering culture.</h3><p><strong>Step 1: Have good engineers.</strong></p><p>I haven&#8217;t seen anyone question this team&#8217;s competence. But here&#8217;s an example for any lurking doubters.</p><p>In 2020, Discord&#8217;s messaging system had over 20 services and was deployed to a cluster of 500 Elixir machines capable of handling millions of concurrent users and pushing dozens of millions of messages per second. <strong>Yet the infra team responsible only had five engineers</strong>. Oh, and none of them had experience with Elixir before joining the company.</p><p>Clearly, there were no weak links on this team.</p><p>These people are rarely incubated by altruistic companies. Instead, their obsession with juicy technical problems drives their mastery. Then they find the companies that have challenging technical problems and the right incentives. Clearly, Discord has both.</p><p>If you don&#8217;t have traction, frontier problems, or cash, you&#8217;ll have to compete for talent on different vectors. The engineers in your funnel probably won&#8217;t be as good as Discord&#8217;s, but the takeaway is the same: hire the best you can get.</p><p><strong>Step 2: Let them be creative.</strong></p><p>Good engineers come up with creative solutions to hard problems.</p><p>We saw this in the multi-pronged attack on their hot partition problem. When faced with database issues, lesser engineers would&#8217;ve blamed everything on Cassandra and the old engineers who chose it. Then they&#8217;d have given hollow promises about how all their problems would fix themselves once they switched to a new DB. Discord instead got curious about how they could make things easier for <em>whatever</em> DB they used, which led them to their Data Service Library for request coalescing.</p><p>Same story with the Super-Disk. Investigating the internal disk strategy of their GCP instances isn&#8217;t a project that a VP would assign a team in a top-down fashion. Instead, management let the engineers explore the problem space until a unique solution emerged.</p><p>Having a culture where engineers can figure stuff out is the corollary benefit to getting clear on your core value. Ideas come from the bottom up, people get excited about the work, and unique solutions emerge. I commend both the Discord engineers for embracing the challenges we discussed and the managers who let them cook.</p><p>How creative is your team in the face of tough problems? How can you give them the clarity and space they need to venture beyond the trivial solutions?</p><h3>Don&#8217;t seek complexity, but accept it when it finds you.</h3><p>Complexity is not a virtue. Every engineer learns this the hard way after their lil&#8217; refactor causes downtime and gets them called into the <s>principal&#8217;s</s> manager&#8217;s office. The true motivation behind a lot of these changes is, &#8220;I&#8217;m bored, and this new thing seems fun.&#8221; (Looking at you, devs who claim users need an agentic workflow to fill out a form). Complex is challenging. I like challenges. Therefore, let&#8217;s do it.</p><p>No.</p><p>But complexity also isn&#8217;t the enemy. For Discord, the enemy is latency. When they run out of simple ways to make their app fast, they come up with creative solutions that, yes, are often complex. Their tolerance for the <em>right</em> complexity is what makes them great. They do the complex stuff not for themselves, but for <strong>their users</strong>.</p><p><strong>It&#8217;s OK to complicate things&#8230;as long as it helps the users.</strong></p><p>As we&#8217;ve seen, Discord&#8217;s need for speed led it across every layer of the stack, from cheap Androids to expensive data centers. This article documents plenty of well-executed perf techniques along the way &#8212; some textbook, some creative. What it really highlights, though, is the power available to teams who commit to helping their users at scale.</p><div id="youtube2-K9ZLsjAatKo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;K9ZLsjAatKo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/K9ZLsjAatKo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>Recommendations</h2><h3>The Actor Model</h3><p>Carl Hewitt (<a href="https://en.wikipedia.org/wiki/Carl_Hewitt">wikipedia</a>)</p><p>The Actor Model (<a href="https://en.wikipedia.org/wiki/Actor_model">wikipedia</a>)</p><p>A Feature Model of Programming Languages (<a href="https://www.sciencedirect.com/science/article/pii/S0167642314000501#fg0110">sciencedirect</a>)</p><p>The Actor Model Whiteboard Session with Carl Hewitt (<a href="https://www.youtube.com/watch?v=7erJ1DV_Tlo&amp;t=1351s">youtube</a>)</p><p>The Actor Model, Behind the Scenes with XState (<a href="https://www.youtube.com/watch?v=GhAl0EiXmaY">youtube</a>)</p><p>Why Did the Actor Model Not Take Off? (<a href="https://www.reddit.com/r/SoftwareEngineering/comments/1n8xhz5/why_did_actor_model_not_take_off/">reddit</a>)</p><h3>Performance Optimization</h3><p>Fan-Out Definition and Examples (<a href="https://dagster.io/glossary/fan-out">dagster</a>)</p><p>How Discord Indexes Trillions of Messages (<a href="https://discord.com/blog/how-discord-indexes-trillions-of-messages">discord &#8226;</a> <a href="https://news.ycombinator.com/item?id=41683293">hackernews &#8226;</a> <a href="https://www.youtube.com/watch?v=S2xmFOAUhsk">youtube</a>)</p><p>How Discord Supercharges Network Disks for Extreme Low Latency (<a href="https://discord.com/blog/how-discord-supercharges-network-disks-for-extreme-low-latency">discord</a>)</p><p>Pushing Discord&#8217;s Limits with a Million+ Online Users in a Single Server (<a href="https://discord.com/blog/maxjourney-pushing-discords-limits-with-a-million-plus-online-users-in-a-single-server">discord</a>)</p><p>How Discord Handles Two and Half Million Concurrent Voice Users using WebRTC (<a href="https://discord.com/blog/how-discord-handles-two-and-half-million-concurrent-voice-users-using-webrtc">discord</a>)</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Google Calendar: The Hidden Cost of “Simple” APIs]]></title><description><![CDATA[Simplicity for one party means complexity for another]]></description><link>https://newsletter.fullstack.zip/p/the-hidden-cost-of-simple-apis-lessons</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/the-hidden-cost-of-simple-apis-lessons</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 28 Jan 2026 17:03:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/52860538-fe42-49d9-8534-42937a8966f7_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eagr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eagr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 424w, https://substackcdn.com/image/fetch/$s_!eagr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 848w, https://substackcdn.com/image/fetch/$s_!eagr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 1272w, https://substackcdn.com/image/fetch/$s_!eagr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eagr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png" width="1200" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:664622,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.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_!eagr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 424w, https://substackcdn.com/image/fetch/$s_!eagr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 848w, https://substackcdn.com/image/fetch/$s_!eagr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 1272w, https://substackcdn.com/image/fetch/$s_!eagr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a91c493-96b6-4535-a919-81da985fc1bf_1200x630.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>In <a href="https://open.substack.com/pub/fullstackeng/p/google-calendars-secret-engineering">Google Calendar&#8217;s Secret Engineer Weapon: Restraint</a>, I praised Google for unapologetically saying &#8220;no&#8221; to the temptations of modernity.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</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><pre><code><code>"Use a frontend framework."
No.
JavaScript.

"Use Typescript."
No.
Javascript.

"Use a trendy CSS tool."
No.
CSS classnames.

"Give us a native desktop app."
No.
Browser.

"Give us dark mode."
No.

"Make it really fast."
No.
</code></code></pre><p>Their commitment to simplicity has helped GCal to defend its position as the default calendar for billions of regular people.</p><p>For API clients, however, that same simplicity makes life tragically complicated.</p><p>How that complexity creeps in, and what we can learn from it as builders.</p><h2>The Problem: Keeping Data In-Sync</h2><div><hr></div><p>You&#8217;re building a cool new calendar called Cool Calendar.</p><p>To help users get started, you allow them to import their existing Google Calendar.</p><p>This&#8217;ll require access to your users&#8217; Google Calendar data.</p><p>You look at the GCal API and see the typical suspects:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QhPx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QhPx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 424w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 848w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 1272w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QhPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png" width="1338" height="438" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:438,&quot;width&quot;:1338,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83157,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.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_!QhPx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 424w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 848w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 1272w, https://substackcdn.com/image/fetch/$s_!QhPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6700c44d-8211-4867-b419-1ced316ad3d0_1338x438.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#8220;Cool,&#8221; you think. &#8220;I just gotta get the <code>calendarId</code>, then get all the events for that calendar. When I need to update an event, I&#8217;ll use the <code>eventId</code> from the GET <code>events</code> response.&#8221;</p><p>You could do all this with a few simple functions:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cNOP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cNOP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 424w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 848w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 1272w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cNOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png" width="1328" height="1382" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1382,&quot;width&quot;:1328,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:230463,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.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_!cNOP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 424w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 848w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 1272w, https://substackcdn.com/image/fetch/$s_!cNOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F55ca43da-3808-4eea-8d34-9d721ee63338_1328x1382.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It works! All the events are in your DB, and they also show up in the user&#8217;s GCal after a user updates an event from your UI.</p><p>You open the GCal app, create a new event called &#8220;Celebrate at Denny&#8217;s,&#8221; and look forward to your cinnamon roll pancakes.</p><p>Cool Cal app is open, but the new event doesn&#8217;t show up.</p><p>Your empty stomach sinks as you realize you only implemented half the solution (CoolCal &#8594; GCal).</p><p>You still need to ensure that GCal changes propagate to Cool Calendar (GCal &#8594; CoolCal).</p><h3>Denial</h3><p>You know that others have encountered this use-case before, so you revisit the GCal API docs.</p><p>Thankfully, you find a guide called &#8220;<a href="https://developers.google.com/workspace/calendar/api/guides/sync">Synchronize resources effectively</a>.&#8221;</p><p>The guide is short, which puts you at-ease.</p><p>It looks like you just need to add a few more calls.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QAur!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QAur!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 424w, https://substackcdn.com/image/fetch/$s_!QAur!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 848w, https://substackcdn.com/image/fetch/$s_!QAur!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 1272w, https://substackcdn.com/image/fetch/$s_!QAur!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QAur!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png" width="1456" height="342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:342,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66717,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.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_!QAur!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 424w, https://substackcdn.com/image/fetch/$s_!QAur!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 848w, https://substackcdn.com/image/fetch/$s_!QAur!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 1272w, https://substackcdn.com/image/fetch/$s_!QAur!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d965bf-462b-4c44-97cc-6bc9af124dcf_1532x360.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Since you don&#8217;t know how many events were updated or when they were, you know you&#8217;ll need a loop to fetch all of them.</p><p>Makes sense.</p><p>Thankfully, the docs include a full snippet of this in Java.</p><p>It even uses the <code>do-while</code> looping strategy, which makes you feel smart.</p><p>Surely you can just convert that to JavaScript and move on.</p><h3>Anger</h3><p>It&#8217;s been an hour, and you&#8217;ve successfully converted the snippet to a JavaScript function called <code>syncGcal()</code> and updated your API.</p><p>It works!</p><p>Whenever you run <code>syncGcal()</code>, a user&#8217;s new GCal data is added to CoolCal.</p><p>You resolve to include the New York Style Cheesecake for your troubles.</p><p>As you&#8217;re on your way out, a few questions arise in your tired brain&#8230;</p><ol><li><p>The <code>syncToken</code> isn&#8217;t persisted anywhere</p></li><li><p><code>syncGcal()</code> only works when it&#8217;s called manually</p></li></ol><p><strong>How often should I run </strong><code>syncGcal()</code><strong>?</strong></p><p>Every hour?</p><p>Every minute?</p><p><strong>Where will I store the token?</strong></p><p>Local storage?</p><p>The <code>user</code> collection?</p><p>A new collection?</p><p><strong>What happens if the token becomes invalid?</strong></p><p>Can I keep retrying?</p><p>Would I need to do a full import as a backup?</p><p>What about quota limits?</p><p>What if a user makes a change during this process?</p><p>You become enraged &#8212; at the guide for not warning you about these edge cases, then at your naivet&#233; for assuming it should.</p><h3>Bargaining</h3><p>&#8220;I&#8217;m not alone &#8212; I can reach out for help,&#8221; you say to yourself, just like you practiced in therapy.</p><p>You&#8217;re confident that the API docs will have a method called <code>syncResources()</code> that you overlooked.</p><p>Or it&#8217;ll be offered as a service? Like some YC company that&#8217;ll magically sync all your data for you.</p><p>At the very least, there&#8217;ll be a Richard Stallman disciple who has an MIT repo you can point Claude to.</p><pre><code><code>&gt; clone the two-way sync stuff from github.com/stallman-cal. no bugs.</code></code></pre><h3>Depression</h3><p>The official docs are bare.</p><p>All the YC companies are building agents.</p><p>Stallman doesn&#8217;t trust your for-profit calendar app.</p><p>(There&#8217;s an MIT project called <a href="https://github.com/SwitchbackTech/compass">Compass Calendar</a>, but it only has 200 stars. Can&#8217;t be trusted.)</p><p>No one cares about your two-way sync feature.</p><p>You are, in fact, all alone.</p><p>A single tear falls onto your mechanical keyboard as you realize you won&#8217;t be going to Denny&#8217;s today.</p><h3>Acceptance</h3><p>After homemade French toast and a postprandial walk, you come to terms with your destiny to act like a real engineer and do it yourself.</p><p>A few weeks later, it&#8217;s finally done.</p><p>But you still can&#8217;t stop wondering</p><p>&#8220;Why did GCal do it this way?&#8221;</p><p>&#8220;Did it have to be this complicated?&#8221;</p><div><hr></div><h2>The Requirements</h2><p>You put yourself in Google&#8217;s shoes by reverse-engineering the requirements in the form of a <a href="https://gist.github.com/tyler-dane/f90243ecc79743943256a65685207c9a">Product Requirements Doc</a> (PRD).</p><h2>The Solution</h2><p>That was fun, so you document the solution to meet those requirements as a <a href="https://gist.github.com/tyler-dane/5d18ecdab29edeabf526ee55cd584b32">Technical Design Doc</a> (TDD).</p><h2>Analysis</h2><p>Finally, you feel qualified to say whether GCal&#8217;s &#8220;Give &#8216;em a token&#8221; solution was a good one.</p><h3>Strengths of Token Pagination</h3><p><strong>Opaque tokens protect the client from overwhelm.</strong> They can hide the complexity from the client so they don&#8217;t need to understand everything (multi-region replication, for example)</p><p><strong>Cleanly handles deletions.</strong> By controlling when tokens expire, GCal can ensure clients always see deletions during incremental sync. Timestamp-based approaches can&#8217;t make this guarantee.</p><p><strong>Easier implementation changes.</strong> Google can completely change its storage backend, sharding strategy, or topology without affecting clients. This surely made the migration from NoSQL (Megastore) to NewSQL (Spanner) easier in the 2010s (<a href="http://highscalability.comhttps//highscalability.com/google-spanners-most-surprising-revelation-nosql-is-out-and/">highscalability.com</a>).</p><h3>Weaknesses</h3><p><strong>Push is disconnected from sync.</strong> The webhook tells you something changed, but not what. This means every push notification triggers a new incremental sync call. This gets chatty when power-users make frequent tweaks. Why not include a lightweight diff in the push payload itself, or at least indicate which event IDs changed?</p><p><strong>Some filters are incompatible</strong>. Incremental syncs are incompatible with the <code>timeMin</code> and <code>timeMax</code> parameters. You must choose one method or the other. This is a bummer for humans, who think in terms of time more easily than in tokens.</p><p><strong>No partial sync recovery.</strong> The page tokens are ephemeral. If a client crashes mid-pagination (after page 3 of 7), they must restart the entire sync. For large calendars, this is painful. An alternative would be durable page tokens that survive across sessions, or checkpointing the sync progress.</p><h3>Alternatives (and why they weren&#8217;t used)</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Wao!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Wao!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 424w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 848w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 1272w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Wao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png" width="1456" height="348" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:348,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144257,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.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_!4Wao!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 424w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 848w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 1272w, https://substackcdn.com/image/fetch/$s_!4Wao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe126bf2e-4fd9-4e0c-9779-d8133284c030_2110x504.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Bottom Line</h3><p>The sync token + cursor pagination approach is a <strong>pragmatic, battle-tested pattern</strong> that works. It&#8217;s the same pattern used by Microsoft Graph (delta tokens), Stripe (pagination cursors), and most enterprise APIs.</p><p>Google chose it because it lets them hide internal complexity while providing &#8220;good enough&#8221; sync semantics for 99% of calendar use cases.</p><p>The alternatives (event sourcing, CRDTs, OT) would only make sense if GCal required real-time collaboration or true offline-first P2P sync.</p><h2>The Full Picture</h2><p>If Google&#8217;s goal with GCal were to generate revenue, they&#8217;d offer more docs, videos, and webinars. There&#8217;d be a handsome Developer Advocate, tiered API pricing, and a Client Success Team. I&#8217;d see billboards around SF that just say,</p><pre><code><code>npm i gcal
</code></code></pre><p>But Google&#8217;s goal with GCal is less ambitious:</p><p><strong>&gt;&gt; Don&#8217;t annoy regular users so much that they download Apple Calendar.</strong></p><p>It&#8217;s not fair to expect so much out of a free API.</p><p>It&#8217;s amazing that you can integrate with GCal in the first place</p><p>GCal honors its responsibility as a foundational part of your app by prioritizing reliability over adoption convenience:</p><ul><li><p>Not many failures occur.</p></li><li><p>The API does what its docs say, even if they don&#8217;t say much.</p></li><li><p>They don&#8217;t surprise you with breaking changes</p></li></ul><p>Still, <strong>there is a gap between the developer&#8217;s expectations and reality</strong> when they first think, &#8220;I know, I&#8217;ll just integrate with GCal.&#8221;</p><p>Currently, the developer has to close that gap with time, effort, and a loss of innocence.</p><p>But Google could reduce the pain by providing more resources.</p><p>For example, the docs could offer more implementation guidance.</p><p>The code samples could evolve from bare repos to demo applications.</p><p>On balance, keeping the API simple was the right move.</p><p>A primitive API might annoy power users.</p><p>But if it doesn&#8217;t affect UX, revenue, retention, or the brand, then keep it simple.</p><h2>Takeaways for Builders</h2><h3>When creating a public sync API</h3><p><strong>Keep it boring: use existing standards</strong></p><p>We&#8217;ve seen here how GCal&#8217;s API is built on cursor pagination and sync tokens. Its event model is also built around established standards: CalDAV, iCalendar, and RRULEs.</p><p>Instead of inventing their optimized versions, they stuck with the basics. This is a big reason why there&#8217;ve been so many successful GCal integrations since their API went public in 2006 (unlike Yahoo).</p><p><strong>Use cursor pagination when the data is a moving target</strong></p><p>When writes happen while you read, you need consistency across pages to avoid duplicates and missed rows.</p><p>Examples: Calendars, feeds, audit logs, append-only streams.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bo-P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bo-P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bo-P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff1169c1-d044-4cc6-9c2a-743d62370eba_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;:284805,&quot;alt&quot;:&quot;&quot;,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_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_!bo-P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!bo-P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff1169c1-d044-4cc6-9c2a-743d62370eba_1280x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><strong>Use offset pagination when the data is stable</strong></p><p>If data is static and doesn&#8217;t have concurrent writes, you can get away with a simpler approach.</p><p>Example: Search results with page numbers, admin table for small data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Twkr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Twkr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Twkr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9305acc1-2fb5-4c27-ad60-373de2e598a9_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;:230135,&quot;alt&quot;:&quot;&quot;,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_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_!Twkr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!Twkr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9305acc1-2fb5-4c27-ad60-373de2e598a9_1280x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Don&#8217;t oversell the API</strong></p><p>You know how it feels to get excited in the morning to finish a PR and then for a hike &#8230; only to realize that it&#8217;s more complicated than you thought and not see daylight until the next afternoon.</p><p>Google&#8217;s API doesn&#8217;t promise to do everything for you.</p><p>The end product will sell the API: spend your time delighting your users with your product before worrying about delighting the devs who integrate with it</p><p><strong>Don&#8217;t break things</strong></p><p>If your integration is foundational to another person&#8217;s product, then go slow.</p><p>Spend more time testing the migration.</p><p>Get feedback on the docs before launching them.</p><p>Send &#8220;heads up&#8221; emails and terminal messages so no one is surprised.</p><p>This requires an identity shift from &#8220;crackhead vibe coder&#8221; who breaks things in prod to &#8220;disciplined software engineer.&#8221;</p><p>You won&#8217;t always get it right, but take the responsibility seriously.</p><p>One breaking change will do more damage than three features will do good.</p><p>GCal&#8217;s API is stable, so my sleep score thankfully hasn&#8217;t dropped since using 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_!YH5v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YH5v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YH5v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:290552,&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.fullstack.zip/i/185585252?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.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_!YH5v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!YH5v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5c7f6c-3dac-48a0-a5f1-27fc3796a47a_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>When integrating a public sync API</h3><p><strong>Don&#8217;t start with an integration</strong></p><blockquote><p>&#8220;My users won&#8217;t use my app unless it integrates with the tools they&#8217;re already using.&#8221;</p></blockquote><p>Maybe, but let them tell you that.</p><p>Adding an integration is an expensive side quest on your product-market fit journey.</p><p>If the value prop is good enough, they&#8217;ll have no problem creating a new account and adding data from scratch.</p><p><strong>Accept that Pareto is right</strong></p><p>In other words, the last 20% of tasks will take 80% of the time.</p><p>The surface for edge cases and gotchas widens as you implement.</p><p>Google&#8217;s docs aren&#8217;t the only ones that will tempt you into thinking that things can be simple AND free.</p><p>Temper their promises by considering retries, idempotency, fallback, delta syncs, offline, token invalidation, quotas, and conditional requests (ETags).</p><p>You don&#8217;t need all of those for your MVP, but expect that they&#8217;ll come up eventually.</p><p><strong>Simplicity for one party means complexity for another</strong></p><p>Simple UI &#8594; complex backend</p><p>Good for regular users &#8594; difficult for power-users</p><p>Simple pricing &#8594; complex R&amp;D</p><p>Simple API &#8594; complex integration</p><p>The next time you think, &#8220;I&#8217;ll just use this free API, it looks straightforward,&#8221; remember: </p><p><strong>It&#8217;s either free or simple; Someone always pays.</strong></p><p>Now go get your pancakes.</p><div id="youtube2-mWqUnBX2PaI" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;mWqUnBX2PaI&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/mWqUnBX2PaI?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Commit like an engineer]]></title><description><![CDATA[How to pick your constraints]]></description><link>https://newsletter.fullstack.zip/p/commit-like-an-engineer</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/commit-like-an-engineer</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 11 Jan 2026 16:00:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gyIC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>How can we systemize our progression as software engineers?</p><p><a href="https://fullstackeng.substack.com/p/77-things-to-avoid-in-2026-developer">Doing fewer things</a> is a great place to start, because it&#8217;ll give you more room for error as you figure out what works best for you.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The next best method is to <strong>commit</strong> to the goal: saying you&#8217;ll do something, and then doing it. </p><p>There are many ways to make commitments. </p><ul><li><p>The founder promises to go back to corporate if he doesn&#8217;t get his app profitable within 3 months.</p></li><li><p>Nathan Berry said he&#8217;d create an app that makes 5k MRR within 6 months (<a href="https://www.youtube.com/watch?v=hCRMzMnAb40">he did it</a>).</p></li><li><p>Elon committed to raising Tesla&#8217;s market cap to 8.5T in 10 years. </p></li></ul><p>What no one tells you is that <em>how </em>you commit is even more important than what you commit to.</p><h3>Anatomy of a commitment</h3><p>A commitment enforces constraints. </p><p>Here&#8217;s a chart that explains what constraint to select and how to communicate 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_!gyIC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gyIC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gyIC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:248120,&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.compasscalendar.com/i/184121369?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.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_!gyIC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!gyIC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6816daa-d36d-4d5c-9f52-95338ea09fa2_1456x1048.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Analysis</h3><p><strong>The more constraints, the more difficult the commitment</strong></p><p>Getting ripped is harder than getting strong because it requires effort in the gym and the kitchen.</p><p>Profit is harder than revenue because it requires spending discipline.</p><p>Getting promoted is harder than completing a course because it requires approval.</p><p>Before committing to a bold <em>outcome</em> like becoming a millionaire within 5 years, focus on an <em>input </em>commitment like deep-working for 2 hrs a day.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3Nz3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3Nz3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 424w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 848w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 1272w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3Nz3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png" width="1202" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1202,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:381213,&quot;alt&quot;:&quot;&quot;,&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.compasscalendar.com/i/184121369?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.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_!3Nz3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 424w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 848w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 1272w, https://substackcdn.com/image/fetch/$s_!3Nz3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad231b1b-6d46-462b-a39a-158186af9c98_1202x832.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Inputs are worth celebrating sometimes</figcaption></figure></div><p><strong>Commit to the right audience.</strong></p><p>Your Instagram audience doesn&#8217;t care that you work 70-hr weeks; they care about seeing cool pictures in their feed.</p><p>The users of your app don&#8217;t care about your margins; they care about how well your app solves their problem.</p><p>A good commitment shared with the wrong audience shows that you don&#8217;t know what people want.</p><h3>Standup Example</h3><p>Last year, we had three senior developers working on Compass. </p><p>Our yearly internal commitment was to become profitable.</p><p>Each week, we made individual commitments that moved us closer to that.</p><p>Here were our requirements for a commitment.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GcEZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GcEZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 424w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 848w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 1272w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GcEZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png" width="1456" height="698" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:698,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:219834,&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.compasscalendar.com/i/184121369?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.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_!GcEZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 424w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 848w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 1272w, https://substackcdn.com/image/fetch/$s_!GcEZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7df8a958-9996-41e0-8366-0bb6317e989a_1966x942.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Basically, we just had to commit to closing a set of issues each week.</strong></p><p>Since we don&#8217;t track hours, these were <em>internal</em>, <em>outcome</em> commitments.</p><p>This forced us to scope the work ahead of the meeting and allowed others to push back.</p><p>Most importantly, it made it clear whether we were executing well. </p><p>If everyone agreed that our commitments were realistic, but we kept missing them, then we knew we had an issue.</p><p>This cut through all the B.S. and helped us make corrections quicker than if we never put our work on the line in the first place.</p><h3>Traps to avoid</h3><p>Commitments also came with traps.</p><p><strong>If you treat all commitments as equal, you&#8217;ll be less effective.</strong></p><p>Which of these matters most for an unemployed junior software engineer?</p><ol><li><p>Waking up at 5 am and building his portfolio for 5 hours</p></li><li><p>Submitting 20 quality jobs applications/week</p></li><li><p>Getting hired within 3 months</p></li></ol><p>Answer: #3</p><p>If that engineer realizes he works best at night, he should drop the 5 am commitment.</p><p>If he hasn&#8217;t gotten one interview after 100 cold-applications, he should drop that approach and consider another, like networking.</p><div id="youtube2-X_a4JkCWfFc" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;X_a4JkCWfFc&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/X_a4JkCWfFc?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p><strong>If you make a big commitment, you&#8217;ll be less willing to change it as you get new data.</strong></p><p>For example, you committed to writing a book about Framework X. But then AI happened, making Framework X irrelevant. You&#8217;ll want to keep writing instead of adapting to the new world.</p><p><strong>If you make a public commitment and fail, you&#8217;ll want to pretend it never happened.</strong></p><p>Sure, most people already forgot. </p><p>But you haven&#8217;t. </p><p>Staying quiet will do more damage to your psyche and reputation than owning it.</p><p>Have you ever filled out an internal survey and then realized that they never shared the results? It&#8217;s because they didn&#8217;t like the results, and they were too afraid to face the root problems.</p><p>BTW - We failed to become profitable last year. We owned it, made a lot of changes, and are moving forward (see, not that hard). </p><div><hr></div><h3>Why this work</h3><p>It takes guts to put your reputation on the line.</p><p>It takes discipline to keep doing the work when life gets hectic.</p><p>The better you get at this, the more confidence you&#8217;ll have.</p><p>Your commitments will get more ambitious.</p><p>You&#8217;ll get better at keeping them.</p><p>People will notice that your words predict reality, which will make them more valuable.</p><p><strong>Code is getting cheaper, but your credibility isn&#8217;t.</strong></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my wor</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>]]></content:encoded></item><item><title><![CDATA[You Don't Get Extra Points for Understanding How Everything Works]]></title><description><![CDATA[Stop studying for "the test"]]></description><link>https://newsletter.fullstack.zip/p/you-dont-get-extra-points-for-understanding</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/you-dont-get-extra-points-for-understanding</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Sun, 04 Jan 2026 15:01:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VeQd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There&#8217;s a sneaky trap we engineers fall into:</p><p>We treat &#8220;understanding&#8221; like the goal.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</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>But the world doesn&#8217;t reward us for comprehension.</p><p>It rewards us for helping people.</p><p>That&#8217;s 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_!VeQd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VeQd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VeQd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:479704,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.compasscalendar.com/i/183350997?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.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_!VeQd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!VeQd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49578586-998f-4bfc-a769-30fc466a8689_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h3>Stories from history</h3><p>When Edison was asked what he thought of &#8220;the Einstein theory,&#8221; his reply shocked everyone:</p><blockquote><p>I don&#8217;t think anything of Einstein&#8217;s theory because I can&#8217;t understand it.</p></blockquote><p>Einstein&#8217;s papers were dense and challenging, and the practical applications of relativity weren&#8217;t yet clear.</p><p>Edison could&#8217;ve stopped everything for weeks to study the paper until he could give a better answer and seem smart. </p><p>Instead, he continued to focus on creating a domestic source of rubber, saving the phonograph economy, and establishing a succession plan for his company &#8212; all problems that he could actually solve.</p><div><hr></div><p>A lawyer was grilling Henry Ford on the witness stand with random facts in an attempt to make him look uneducated.</p><p>&#8220;Who was Benedict Arnold?&#8221; </p><p>&#8220;How many soldiers did the British send over to America to put down the Rebellion of 1776?&#8221;</p><p>Ford finally snapped and said,</p><blockquote><p>&#8220;WHY should I clutter up my mind with general knowledge, for the purpose of being able to answer questions, when I have men around me who can supply any knowledge I require?&#8221;</p></blockquote><div><hr></div><h2>In real life</h2><p>We can snicker at that reporter and lawyer for missing the plot.</p><p>Yet we&#8217;re the ones who refuse to apply for a job until we have 3 more portfolio pieces &#8230; even though <a href="https://youtu.be/RhGHW0Ttalg">no one cares about your portfolio</a>.</p><p>We refuse to launch our app on Product Hunt until it&#8217;s visually perfect &#8230; even though it solves user problems better than the incumbent.</p><p>We refuse to touch AWS before getting certified &#8230;even though no one asked us to be certified.</p><h3>Root cause</h3><p>Our early education followed the rhythms of time.</p><p>A 10-week quarter.</p><p>12 grades before high school graduation.</p><p>4 years of undergrad.</p><p>2 more years for the master&#8217;s.</p><p>Since these slots were pre-allocated, the task was to learn as much as possible and outperform others on the test.</p><p><strong>We hoarded knowledge to outperform when we should&#8217;ve been using knowledge to help.</strong></p><p>You might&#8217;ve learned enough about multiplication after 3 weeks of arithmetic to create a calculator app. </p><p>The app would&#8217;ve worked, but because you didn&#8217;t memorize the time tables, you would&#8217;ve only gotten a 70/100 on the test. So you put your creation on hold and kept <s>learning</s> memorizing instead.</p><p></p><p><strong>This pattern of continuing to learn past the point of usefulness is what causes us engineers to feel like we&#8217;re never ready.</strong> </p><p></p><p>It&#8217;s why we force ourselves to finish the 200-page data structure book even though we got what we needed on page 20.</p><p>It&#8217;s why we optimize for performance before a user ever notices the lag</p><p>It&#8217;s why we avoid the hard problems at work because we don&#8217;t know how to solve them (yet).</p><p></p><h3>The fix</h3><p>Stop thinking in terms of exam scores (0-100).</p><p>Start thinking in terms of problems solved (Solved / Not solved).</p><p>Except there&#8217;s a catch:</p><p><strong>You have to start with </strong><em><strong>other people&#8217;s problems</strong></em><strong>.</strong> </p><p></p><p>Once you&#8217;ve successfully solved someone&#8217;s problem, then you can ship it.</p><p></p><blockquote><p>&#8220;But what if I don&#8217;t know enough to solve the problem?&#8221; </p></blockquote><p></p><p>Then take a course or read a book&#8230;.but stop once you have enough knowledge to solve the problem. </p><p></p><p>The task isn&#8217;t completing the course with a high grade. </p><p><strong>The task is solving someone else&#8217;s problem.</strong></p><p></p><p>An English student only needs to understand <em>Macbeth </em>enough to write a thesis that makes the teacher go, &#8220;Huh, interesting.&#8221;</p><p>A Junior Developer only needs to code well enough to close the issue assigned to them.</p><p>The Principal Architect only needs to know enough about distributed system design to write a doc for the team to start prototyping.</p><p></p><h3>Final words</h3><p>Whatever you want in life, you&#8217;ll get it faster by giving more.</p><p>Once you realize that the only thing stopping you from getting what you want is a bunch of other people&#8217;s problems, it&#8217;ll feel silly to delay the fix in the pursuit of obscure knowledge.</p><p><strong>No one will ever say, &#8220;Your app would solve my problem perfectly, but I don&#8217;t think you understand Dijkstra&#8217;s algorithm, so I&#8217;m going to pass.&#8221;</strong></p><div><hr></div><blockquote><p>&#8220;But I like learning.&#8221;</p></blockquote><p>If amassing knowledge beyond the point of utility is fun, and you have time, then have fun. </p><p>But don&#8217;t trick yourself: maxing out your knowledge doesn&#8217;t automatically help others. </p><div><hr></div><p>Unfortunately, productivity really is this simple: </p><p><strong>Just help people.</strong></p><p></p><p>For a deep-dive on how to set up a <em>system</em> to help others, see my latest video:</p><div id="youtube2-mDkJmYlIQy0" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;mDkJmYlIQy0&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/mDkJmYlIQy0?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Google Meet: Real-time Video with WebRTC]]></title><description><![CDATA[Reverse-engineering how Meet uses WebRTC to make seamless video calls]]></description><link>https://newsletter.fullstack.zip/p/reverse-engineering-google-meet</link><guid isPermaLink="false">https://newsletter.fullstack.zip/p/reverse-engineering-google-meet</guid><dc:creator><![CDATA[Tyler Dane]]></dc:creator><pubDate>Wed, 31 Dec 2025 15:00:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7VvO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Google Meet quietly powers billions of calls using free, open-source tech. But what makes it &#8220;just work&#8221; without the bloat?</p><p>It&#8217;s a careful integration of the WebRTC framework into a reliable product that makes it successful.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</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><h2>TL;DR</h2><p>How real-time video conferencing works</p><ol><li><p>A cloud server helps two users make a connection</p></li><li><p>The two users share data privately, with some oversight from the cloud server</p></li><li><p>After the call, the users disconnect &amp; the cloud server processes the data</p></li></ol><h2>WebRTC: The Foundation</h2><p><em>How to use an open-source protocol to stream real-time video</em></p><p>Peer-to-peer connection is an important foundation of open real-time communication (RTC). The WebRTC framework makes that happen by establishing a standard way to connect and then share data &#8230; without needing to fuss about plugins, licenses, or apps. (Remember the Flash-era video tools that required clunky downloads?)</p><p><strong>WebRTC</strong> handles:</p><ul><li><p>Connecting to peers</p></li><li><p>Sharing audio, video, and chat data.</p></li><li><p>IPs, ports, and exchange it with other WebRTC clients</p></li><li><p>client resolution &amp; codecs</p></li></ul><p></p><p><code>// sample for creating a P2P connection<br>async function createOffer() {    <br>  const offer = await peerConnection.createOffer(offerOptions);</code></p><p><code>  await peerConnection.setLocalDescription(offer);</code></p><p><code>  outputTextarea.value = offer.sdp;</code></p><p><code>  const peerConnection = new RTCPeerConnection(null);</code></p><p><code>  const tracks = parseInt(numAudioTracksInput.value);</code></p><p>}</p><p>There are a couple of pieces that make all that possible</p><ul><li><p>A <strong>signaling server</strong> that acts like a match-maker between two clients</p></li><li><p>A STUN/TURN <strong>relay server </strong>that keeps track of client IPs (even through NATs &amp; firewalls!)</p></li><li><p>The <code>MediaStream</code><strong> API</strong>, which synchronizes camera and mic inputs</p></li><li><p><strong>Packets</strong> that are encoded and decoded so quickly that it appears &#8220;real-time&#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_!7VvO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7VvO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7VvO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_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;:355694,&quot;alt&quot;:&quot;&quot;,&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.compasscalendar.com/i/182737469?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_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_!7VvO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!7VvO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c3cc0b3-af8f-4d00-9fec-3f36f48327a0_1280x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p></li></ul><h2>How Google Meet Brings It Together</h2><p>Having a capable open-source framework is one thing, but turning that into a product for billions is another. </p><p>Here are some of the things that the Google Meet team had to do to make your call run smoothly</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZriQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZriQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 424w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 848w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 1272w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZriQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png" width="1280" height="665" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11b8a498-920e-418e-8f17-734d507e8460_1280x665.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:665,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98604,&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.compasscalendar.com/i/182737469?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.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_!ZriQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 424w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 848w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 1272w, https://substackcdn.com/image/fetch/$s_!ZriQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b8a498-920e-418e-8f17-734d507e8460_1280x665.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">P2P communication with WebRTC &amp; Google Meet</figcaption></figure></div><h3></h3><p><strong>Maintaining a strong connection</strong></p><ul><li><p>Using its Selective Forwarding Unit (SFU) to avoid P2P mesh overload.</p></li><li><p>Creating its own API to multiplex multiple virtual streams with large groups (WebRTC alone would crumble)</p></li><li><p>Switching codes, IPs, and stream quality to respond to restrictive networks</p></li><li><p>Reporting errors and closing sessions</p></li></ul><p><strong>Offering a lightweight client</strong></p><ul><li><p>Minimal code: CSS, HTML, JS, libs are surprisingly straightforward</p></li><li><p>Minimal Storage: mostly cookies for network info, LocalStorage for CPU stats</p></li></ul><p><strong>Other</strong></p><ul><li><p>Using the Google Events API and Pub/Sub to respond to the meeting events</p></li><li><p>Uses an in-house AI library (now powered by Gemini) to differentiate between subject/background to support the filters feature </p></li></ul><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7Jht!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Jht!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Jht!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png" width="724" height="407.25" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a5c0cef0-2254-4b1b-bab5-d685beccadbe_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;:724,&quot;bytes&quot;:188043,&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.compasscalendar.com/i/182737469?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.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_!7Jht!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!7Jht!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5c0cef0-2254-4b1b-bab5-d685beccadbe_1280x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_gwV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_gwV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 424w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 848w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 1272w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_gwV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png" width="1280" height="665" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:665,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126049,&quot;alt&quot;:&quot;&quot;,&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.compasscalendar.com/i/182737469?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.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_!_gwV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 424w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 848w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 1272w, https://substackcdn.com/image/fetch/$s_!_gwV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c90d4b8-2a70-45f4-afa0-126ba89bba18_1280x665.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Product</h3><p>Tech aside &#8212; creating a <strong>unified video product</strong> for the Google Workspace was an accomplishment in product coordination. Google launched Hangouts in 2013. They rebranded it as Meet in 2020 to compete with Zoom. They incorporated their VoIP product (Duo) in 2022. They added Gemini in 2025. All while maintaining performance and keeping the UX light.</p><h3>Takeaways </h3><p><strong>Start with the primitives, then solve the problems as they come. </strong>If you were to make a competing product, I&#8217;d suggest getting it working with WebRTC alone. Then continue to develop your signaling server algorithms as problems arise. A lot of &#8220;boring&#8221; work will come up, like NAT traversal, firewall rules, device permissions, and echo cancellation. Instead of trying to anticipate all these at the start, build upon a simple yet flexible foundation.</p><p><strong>Don&#8217;t go cross-platform unless it&#8217;s necessary</strong>. Much like Google Calendar, Meet has resisted the urge to bloat the product with features or release a desktop app. This makes it easier to update and keeps it quick.</p><p><strong>Use the platform&#8217;s APIs. </strong>The WebRTC docs are clunky. It&#8217;s an old and unsexy framework. But it works. Instead of rolling out their own protocol or plugins, Meet wisely built upon something reliable and focused on the UX. The web might not evolve as quickly as AI or mobile, but it has a lot to offer. </p><p><strong>Stay out of the way</strong>. What makes Meet great is what it <em>doesn&#8217;t </em>do. No forced installs. No performance issues. No complex UX or onboarding. It&#8217;s integrated into Gmail and Google Calendar, making it seamless to set up a meeting. </p><p></p><p>Users don&#8217;t care whether the app is a pure-play like Meet or whether it uses native codes and a heavy WebAssembly media stack (like Zoom). <br><br>But the former will always be easier to make it seem like it &#8220;just works.&#8221;</p><p>It already takes a lot to make it seem like you do so little, so why make it harder than it has to be?</p><p></p><div id="youtube2-Dw-vurrD5hw" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;Dw-vurrD5hw&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/Dw-vurrD5hw?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h3>Further Reading</h3><p>WebRTC: <a href="https://web.dev/articles/webrtc-basics">https://web.dev/articles/webrtc-basics</a></p><p>Mozilla&#8217;s guide: <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API">https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API</a></p><p>Google&#8217;s WebRTC Code: <a href="https://webrtc.googlesource.com/src/">https://webrtc.googlesource.com/src/</a></p><div><hr></div><p>What app would you like to learn about next?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.fullstack.zip/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">Thanks for reading Fullstack Engineer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>