<?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[ByteMonk]]></title><description><![CDATA[ByteMonk – Deep tech insights | System design strategies | AI advancements.]]></description><link>https://blog.bytemonk.io</link><image><url>https://substackcdn.com/image/fetch/$s_!ZeRe!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faecc17d3-7369-4947-a58d-bc1a527e2007_500x500.png</url><title>ByteMonk</title><link>https://blog.bytemonk.io</link></image><generator>Substack</generator><lastBuildDate>Wed, 06 May 2026 10:49:48 GMT</lastBuildDate><atom:link href="https://blog.bytemonk.io/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Himalay]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[thebytemonk@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[thebytemonk@substack.com]]></itunes:email><itunes:name><![CDATA[Himalay]]></itunes:name></itunes:owner><itunes:author><![CDATA[Himalay]]></itunes:author><googleplay:owner><![CDATA[thebytemonk@substack.com]]></googleplay:owner><googleplay:email><![CDATA[thebytemonk@substack.com]]></googleplay:email><googleplay:author><![CDATA[Himalay]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The Engineering Guide to CI/CD in 2026]]></title><description><![CDATA[From the basics to why your pipelines slow down, and what modern infrastructure looks like]]></description><link>https://blog.bytemonk.io/p/the-engineering-guide-to-cicd-in</link><guid isPermaLink="false">https://blog.bytemonk.io/p/the-engineering-guide-to-cicd-in</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Wed, 25 Mar 2026 23:01:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!L3-2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 style="text-align: justify;"><strong>What CI/CD Actually Means?</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L3-2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L3-2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 424w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 848w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 1272w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L3-2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif" width="728" height="440.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:881,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3866488,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L3-2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 424w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 848w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 1272w, https://substackcdn.com/image/fetch/$s_!L3-2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b6e46f-4d2d-46a1-ab45-0eaaa20c041d_1612x975.gif 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 style="text-align: justify;">CI/CD stands for Continuous Integration and Continuous Deployment. The two halves solve different problems and are worth understanding separately.</p><p style="text-align: justify;"><strong>Continuous Integration</strong> is about keeping a shared codebase healthy.</p><p style="text-align: justify;">Before CI became standard, teams would work in isolation for days or weeks, then attempt to merge everything together at once. The result was integration hell: conflicting changes, broken dependencies, and bugs nearly impossible to trace back to a specific commit.</p><p style="text-align: justify;">CI changes the model. Every developer pushes frequently, sometimes multiple times a day. Each push triggers an automated pipeline that runs tests, checks code quality, and verifies the build. If something breaks, you find out within minutes, while the change is still fresh in your mind.</p><p style="text-align: justify;">The feedback loop is tight by design.</p><p style="text-align: justify;"><strong>Continuous Deployment</strong> picks up where CI leaves off. Once a change passes all checks, it gets packaged and deployed automatically. No manual handoff. No waiting for a release window.</p><blockquote><p>The combined effect is that the distance between writing code and running code in production shrinks from days to minutes. Teams that ship continuously ship better software because they get real feedback faster, fix smaller problems before they compound, and develop genuine confidence in their deployment process.</p></blockquote><p style="text-align: justify;">The key word in both halves is <em>continuous</em>. Not &#8220;sometimes automated.&#8221; Not &#8220;automated when someone remembers to trigger it.&#8221; Continuous means every single change goes through the same process, without exception. When you can bypass CI, its guarantees mean nothing.</p><div><hr></div><p style="text-align: justify;"><strong>GitHub Actions<br></strong><em>The Default Starting Point</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zu5t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zu5t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 424w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 848w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 1272w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zu5t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif" width="1456" height="646" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:646,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2185094,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zu5t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 424w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 848w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 1272w, https://substackcdn.com/image/fetch/$s_!Zu5t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e80cf79-1fff-4894-a3b1-172b80058fa1_1524x676.gif 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 style="text-align: justify;">GitHub Actions became the dominant CI/CD platform not because it is the most powerful, but because it lives where the code already is.</p><p style="text-align: justify;">No separate account. No webhook configuration. No third-party integration to maintain. You push code to GitHub, and GitHub runs your pipeline.</p><p style="text-align: justify;">The core concept is a <strong>workflow</strong>: a YAML file stored in .github/workflows that defines what should happen and when. Workflows are triggered by events: a push to main, a pull request opened, a tag created, a scheduled cron job.</p><p style="text-align: justify;">When the event fires, GitHub provisions a <strong>runner</strong>, which is a virtual machine hosted by GitHub, and executes the steps you defined.</p><p style="text-align: justify;">A basic workflow looks like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S8cj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S8cj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 424w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 848w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 1272w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S8cj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png" width="1241" height="754" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:754,&quot;width&quot;:1241,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:199182,&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://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8c58c37-5ab7-4da9-a125-4d31a5e94cc2_1460x1008.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S8cj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 424w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 848w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.png 1272w, https://substackcdn.com/image/fetch/$s_!S8cj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a753b60-8c1b-4799-96d0-1d324b9a56e6_1241x754.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 style="text-align: justify;">Four things are happening here. The on: block defines the trigger. The jobs: block defines what to run. The runs-on: tells GitHub what kind of machine to provision. And steps: is the actual sequence of commands.</p><p style="text-align: justify;">The on: block is worth understanding early because it controls how often your pipeline runs. on: [push] triggers on every push to every branch. Most teams get more specific as the project grows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IkLs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IkLs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 424w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 848w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 1272w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IkLs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png" width="1164" height="559" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:559,&quot;width&quot;:1164,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:519406,&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://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0249c83d-5dd0-4b9a-b28a-a0020955f7fd_1352x819.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IkLs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 424w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 848w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.png 1272w, https://substackcdn.com/image/fetch/$s_!IkLs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a0fb17f-cceb-45d1-a042-ec5a057130aa_1164x559.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 style="text-align: justify;">This runs CI only when code touches main, either through a direct push or a pull request targeting it. You can also trigger on tags, scheduled cron jobs, or manual dispatch.</p><p>Inside a workflow you can define multiple jobs. By default they run in parallel. If you want one job to wait for another to finish first, you use the <code>needs</code>: keyword:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ylXY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ylXY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 424w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 848w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 1272w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ylXY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png" width="1127" height="809" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1127,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:943556,&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://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4604b7c-cc15-49ff-b56c-121486776845_1291x1010.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ylXY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 424w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 848w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.png 1272w, https://substackcdn.com/image/fetch/$s_!ylXY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9149d457-9e14-4d42-9b31-e303cd652bb4_1127x809.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>Here <code>test</code> will not start until <code>lint</code> finishes. If <code>lint</code> fails, <code>test</code> never runs. This is a small detail that has a big effect on how you design your pipeline.</p><p style="text-align: justify;">What makes Actions useful beyond the basics is its ecosystem. The marketplace has thousands of pre-built actions for deploying to AWS, sending Slack notifications, scanning for security vulnerabilities, and almost anything else a pipeline needs. Most problems have already been solved by someone else. You compose them.</p><p style="text-align: justify;">For small and medium projects, this setup works exactly as advertised. The free tier is generous. The feedback loop is fast enough. The tooling is familiar.</p><p style="text-align: justify;">Then the project grows.</p><div><hr></div><h2 style="text-align: justify;"><strong>Where GitHub Actions Starts to Break</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ilbH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ilbH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 424w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 848w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ilbH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif" width="1456" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:826837,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ilbH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 424w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 848w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!ilbH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd87698c7-9ca6-4e2e-9b86-f19b57e38eec_1456x720.gif 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 style="text-align: justify;">Most teams start with a pipeline that looks something like what we just covered. A few jobs, a handful of steps, done in under 10 minutes. It works well and there is no reason to think about it too deeply.</p><p style="text-align: justify;">The problems come gradually, not all at once.</p><p style="text-align: justify;">A new service gets added to the repo. The test suite grows as the codebase matures. The Docker image picks up more dependencies. An integration test gets added that spins up a real database. None of these feel like big decisions individually. Each one adds a minute here, two minutes there.</p><p style="text-align: justify;">Six months later the pipeline takes 25 minutes.</p><p style="text-align: justify;">You add caching. You get it back to 18. It creeps up to 22.</p><p style="text-align: justify;">The frustrating part is that nothing feels wrong. The pipeline is doing exactly what you told it to do. You push a one-line fix and watch the same 22-minute pipeline run as if it had never seen your codebase before. Every dependency reinstalled. Every Docker layer rebuilt. Every step from scratch.</p><p style="text-align: justify;">This is not a configuration problem. It is an architectural one. And to understand why, you need to understand what is actually happening underneath every GitHub Actions run.</p><div><hr></div><h2><strong>The Stateless Model</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0ZMc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0ZMc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 424w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 848w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 1272w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0ZMc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif" width="1038" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:1038,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4633025,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0ZMc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 424w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 848w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 1272w, https://substackcdn.com/image/fetch/$s_!0ZMc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aa8d11b-fdfc-47e4-be6e-45df3b23ac0c_1038x500.gif 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 style="text-align: justify;">The model underlying GitHub Actions, and most CI platforms, is stateless by design. Every pipeline run gets a fresh virtual machine. The previous run left nothing behind. No memory, no cache that survived, no state of any kind.</p><p style="text-align: justify;">When the run starts, it installs your dependencies from scratch. It pulls your Docker base image from a registry. It initializes your build tools. It does all of this even if the exact same work was done an hour ago and nothing relevant changed.</p><p style="text-align: justify;">Think of it like a chef who cleans the entire kitchen after every dish. Wipes down every surface, puts everything back in storage, turns off the stove. The next dish starts from a completely cold kitchen. The process is clean and predictable. But it is also slow, and the overhead compounds.</p><blockquote><p>Every CI run pays the full setup tax regardless of what actually changed. The platform is not doing anything wrong. It is faithfully executing the model it was built on.</p></blockquote><p style="text-align: justify;">GitHub Actions has a caching mechanism to help. You can save your node_modules or pip environment between runs using a cache key, usually a hash of your dependency manifest. When the key matches, the cache restores and you skip the installation.</p><p style="text-align: justify;">In practice, caching helps at the margins. Cache keys are fragile: if your package.json changes, the cache misses entirely and you reinstall from scratch. Cache restoration adds its own latency. Cache size has limits. And fundamentally, caching is an afterthought layered on top of a stateless model. You are working around the architecture rather than changing it.</p><p style="text-align: justify;">Docker builds make this especially visible.</p><p style="text-align: justify;">Docker&#8217;s layer cache is what makes local builds fast. If a layer has not changed, Docker skips it. But on a fresh CI runner, there is no Docker daemon and no layer cache. Every layer rebuilds from scratch, every time, even if nothing in that layer changed.</p><blockquote><p>The layer cache that makes Docker fast on your laptop disappears completely in a stateless CI environment. A tool designed around persistence, running inside a system designed around ephemerality.</p></blockquote><p style="text-align: justify;">For teams with large images and complex multi-stage builds, the result is pipelines where the actual test execution is a fraction of the total run time. Most of the time is reconstruction: reinstalling dependencies, pulling the same base images, rebuilding layers that have not changed in days. The code changed. The pipeline acts like nothing did.</p><div><hr></div><h2 style="text-align: justify;"><strong>Slow CI Has a Hidden Cost</strong></h2><p style="text-align: justify;">The frustration of slow pipelines is obvious. The deeper cost is less visible.</p><p style="text-align: justify;">When pipelines are slow, developers start batching their pushes. Instead of small, frequent commits that are easy to review and easy to revert, they accumulate changes and push larger batches to amortize the wait. This is a rational response to a slow feedback loop. But larger changes are harder to review, harder to debug when something breaks, and harder to roll back cleanly.</p><p style="text-align: justify;">Slow CI also changes how a team thinks about the pipeline itself. When a run takes 30 minutes, you stop treating it as a real-time feedback mechanism. You push and context-switch to something else. By the time the result comes back, you have lost the thread. The cognitive cost of re-engaging is higher than it looks.</p><p style="text-align: justify;">Teams working with AI agents feel this even more acutely. When CI is part of an automated workflow, a slow pipeline becomes a blocking dependency in an otherwise fast chain. An agent that commits and then waits 25 minutes for validation is not a fast agent.</p><div><hr></div><h2 style="text-align: justify;"><strong>Depot: A Different Architecture</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ydG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ydG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 424w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 848w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 1272w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ydG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png" width="444" height="869" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:869,&quot;width&quot;:444,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:356195,&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://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8849f69-478b-4983-bda9-bd13a2974302_444x972.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ydG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 424w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 848w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.png 1272w, https://substackcdn.com/image/fetch/$s_!5ydG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3d53890-02f4-4b80-bb66-c050c7b98cb0_444x869.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 style="text-align: justify;">The question worth asking is: what would CI look like if it were designed around persistence instead of ephemerality?</p><p style="text-align: justify;">Instead of provisioning a fresh VM per run, you maintain warm compute that knows about your project. The Docker layer cache survives between runs. Dependencies installed yesterday are still there today. The build system has memory. You only do the work that actually changed.</p><p style="text-align: justify;">This is not a new idea in computing. Databases do not reconstruct their storage on every query. Servers do not reinstall their runtime on every request. Persistence is the default assumption everywhere except CI, where ephemerality became the standard and workarounds got built around it.</p><p style="text-align: justify;">The engineering challenge is preserving isolation while abandoning ephemerality. Each run still needs clean boundaries. A broken pipeline from one team cannot contaminate another. A well-designed persistent system solves this by separating the compute layer from the isolation layer. The underlying machines stay warm and maintain caches. A durable orchestrator sits on top, managing job scheduling and enforcing boundaries between runs. The two layers have different lifecycles and different responsibilities.</p><p style="text-align: justify;">This separation is harder to build than it sounds. The stateless model gets isolation for free by throwing everything away. A persistent model has to engineer isolation deliberately, at every layer, without sacrificing the performance gains that made persistence worth pursuing in the first place.</p><p><a href="https://depot.dev/blog/now-available-depot-ci/?utm_medium=influencer&amp;utm_campaign[&#8230;]_source=newsletter&amp;utm_content=ad&amp;utm_term=bytemonk&amp;ref=plug.dev">Depot CI, which launches on March 24th</a>, is built around this architecture. Their compute layer is persistent. An orchestrator called Switchyard sits on top and handles scheduling and isolation. GitHub Actions YAML is the first supported workflow format, and migration is straightforward: move your workflows from a .github folder into a .depot folder. Your existing pipeline definitions work as shown.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KaxG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KaxG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 424w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 848w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 1272w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KaxG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif" width="1456" height="626" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1236094,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KaxG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 424w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 848w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 1272w, https://substackcdn.com/image/fetch/$s_!KaxG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd199ed-14b0-4b00-b17f-bf77b0ee87b9_1920x826.gif 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>That&#8217;s it. The CLI scans your .github/workflows/ directory, checks each workflow for compatibility, and copies your selections into .depot/workflows/. Your original .github/ folder stays untouched. GitHub Actions keeps running in parallel while you test Depot CI.</p><p style="text-align: justify;">If your workflows reference secrets, the wizard catches those too and prompts you to configure them. Or you can supply them inline and skip the prompts entirely:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!euRS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!euRS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 424w, https://substackcdn.com/image/fetch/$s_!euRS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 848w, https://substackcdn.com/image/fetch/$s_!euRS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 1272w, https://substackcdn.com/image/fetch/$s_!euRS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!euRS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif" width="1456" height="712" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:712,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2419832,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!euRS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 424w, https://substackcdn.com/image/fetch/$s_!euRS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 848w, https://substackcdn.com/image/fetch/$s_!euRS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 1272w, https://substackcdn.com/image/fetch/$s_!euRS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9de5ee7a-6b23-43b0-97e1-c626d1892c7f_1689x826.gif 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 style="text-align: justify;">One thing to be aware of: once you push that .depot/ directory, both pipelines run simultaneously. If a workflow triggers a deploy or writes to an artifact store, it&#8217;ll fire twice. Keep that in mind before you merge.</p><p style="text-align: justify;">Container builds get the same treatment. Depot&#8217;s build product gives Docker layer caches a persistent home on remote infrastructure, so the warm cache from yesterday&#8217;s build is available today. For teams with large images and complex multi-stage builds, this changes the build time profile significantly.</p><p style="text-align: justify;">Observability is another meaningful difference. Most CI platforms give you logs. Depot gives you full job observability, including SSH access into a running job and the ability to replay from a specific step when something fails. Debugging a flaky test or a strange environment issue becomes something you can actually investigate, rather than just re-run and hope for a different result.</p><blockquote><p style="text-align: justify;"><em>Depot CI has a free trial at <a href="https://depot.dev/blog/now-available-depot-ci/?utm_medium=influencer&amp;utm_campaign[&#8230;]_source=newsletter&amp;utm_content=ad&amp;utm_term=bytemonk&amp;ref=plug.dev">depot.dev</a>. Container builds and Depot CI are both available. Depot CI launched March 24th. </em></p></blockquote><div><hr></div><h2 style="text-align: justify;"><strong>The Trade-offs</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JBcF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JBcF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 424w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 848w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 1272w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JBcF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif" width="1456" height="704" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:704,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1839230,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JBcF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 424w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 848w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 1272w, https://substackcdn.com/image/fetch/$s_!JBcF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67644e6-742a-442b-81c6-c7fa9b80a3c9_1534x742.gif 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 style="text-align: justify;">Persistent compute is not strictly better. It is a different set of trade-offs.</p><p style="text-align: justify;">Warm state that makes builds fast also means state can linger unexpectedly. A previous run that left a file in the wrong place, a corrupted cache entry, an environment variable that carried over: these are problems the stateless model eliminates by design. Well-built persistent systems isolate at the job level, but the operational model requires more deliberate thinking.</p><p style="text-align: justify;">Cold starts still happen. When you first onboard a project, or when caches are invalidated, you pay the full startup cost. The speed advantage compounds over time, not on the first run.</p><p style="text-align: justify;">Migrating workflows is low friction but still a migration. Understanding what you are adopting, and what moving away would require, is worth thinking through before committing at scale.</p><p style="text-align: justify;">These are not reasons to avoid the approach. They are reasons to evaluate it clearly rather than treating faster CI as unconditionally free.</p><div><hr></div><h2 style="text-align: justify;"><strong>The Broader Pattern</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zoQG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zoQG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 424w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 848w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 1272w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zoQG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png" width="1026" height="365" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:365,&quot;width&quot;:1026,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67534,&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://blog.bytemonk.io/i/192133594?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F352323f0-1963-4241-81a1-36afb641d364_1080x460.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zoQG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 424w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 848w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.png 1272w, https://substackcdn.com/image/fetch/$s_!zoQG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6d267f7-a1a3-4645-bd21-26bf4e74aae9_1026x365.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 style="text-align: justify;">The shift from stateless to stateful infrastructure is a recurring theme in platform engineering.</p><p style="text-align: justify;">Early serverless functions were completely stateless. Cold starts were painful but acceptable. As teams moved latency-sensitive workloads onto serverless, the cold start cost became a real problem. Providers added warm instances, provisioned concurrency, and connection pooling. The stateless model was clean. The performance reality forced persistence back in.</p><p style="text-align: justify;">Early container orchestration treated every pod as disposable. Real applications needed state to live somewhere. Persistent volumes, StatefulSets, and local storage abstractions followed.</p><p style="text-align: justify;">CI is going through the same evolution. The stateless runner model solved real problems when it was introduced. Reproducible builds. Strong isolation. No operational overhead.</p><p style="text-align: justify;">What is changing is that the default assumption of ephemerality is being questioned. For a long time, starting fresh felt safe. Predictable. The cost was slow pipelines, and teams accepted that as the price of clean builds. That trade-off made sense when pipelines were short and teams were small. At scale, it quietly became the thing slowing everyone down. The architecture that made CI simple is now what makes it slow. And that is worth knowing, whether you change anything or not.</p><div><hr></div><p style="text-align: justify;">Thanks for reading. If you have questions or want to push back on anything, the comments are open.</p>]]></content:encoded></item><item><title><![CDATA[Understanding Quantum Computing]]></title><description><![CDATA[A Gentle Introduction]]></description><link>https://blog.bytemonk.io/p/understanding-quantum-computing</link><guid isPermaLink="false">https://blog.bytemonk.io/p/understanding-quantum-computing</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Sun, 26 Oct 2025 16:45:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!yftK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif" 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_!yftK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yftK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 424w, https://substackcdn.com/image/fetch/$s_!yftK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 848w, https://substackcdn.com/image/fetch/$s_!yftK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 1272w, https://substackcdn.com/image/fetch/$s_!yftK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yftK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif" width="1060" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1060,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3937414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yftK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 424w, https://substackcdn.com/image/fetch/$s_!yftK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 848w, https://substackcdn.com/image/fetch/$s_!yftK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 1272w, https://substackcdn.com/image/fetch/$s_!yftK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e94d292-1981-4313-bb29-db69de365b14_1060x600.gif 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>When people first encounter quantum computing, they usually hear about how it will solve problems that would take regular computers thousands of years. But what actually makes quantum computers different? And why can&#8217;t we just build faster regular machines instead?</p><p>I&#8217;ll start with the basics: what a qubit is and how it differs from a normal bit. Then we&#8217;ll build up to superposition, entanglement, and interference. These are the three ideas that make quantum computing work.</p><div><hr></div><h2><strong>Bit vs Qubit</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7OCC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7OCC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 424w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 848w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 1272w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7OCC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif" width="1060" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1060,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1680629,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7OCC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 424w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 848w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 1272w, https://substackcdn.com/image/fetch/$s_!7OCC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a40e269-99ae-4a6c-ba3d-5c82d24703e6_1060x600.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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 we get into quantum stuff, let&#8217;s talk about what we already know. A classical bit is the basic unit of information in regular computing. It&#8217;s binary: at any moment, it&#8217;s either 0 or 1. No ambiguity, no in-between.</p><p>Think of a bit like a coin lying flat on a table. It shows either heads (0) or tails (1). When you compute something, you flip these bits around using logic gates like AND, OR, and NOT. One definite state becomes another definite state.</p><p>Here&#8217;s what this means in practice: if you want to check a million different possibilities, you have to go through them one by one. Even if you split the work across multiple processors, each one is still checking individual cases, one at a time. Each operation takes one specific input and gives you one specific output.</p><p>A qubit (quantum bit) is different. Instead of being locked into 0 or 1, a qubit can exist in what we call superposition. Think of it as a blend of both states at the same time.</p><blockquote><p>If a classical bit is a coin lying flat showing heads or tails, a qubit is like a coin spinning in the air. While it spins, it hasn&#8217;t committed to either outcome. It has some chance of landing heads and some chance of landing tails. That spread of chances is its quantum state.</p></blockquote><p>A qubit might be 70% likely to end up as 0 and 30% likely to be 1. Or it could be a perfect 50/50 split. The important thing is that until you actually look at it, the qubit represents this blend of possibilities. It&#8217;s not that we just don&#8217;t know which one it is. The qubit genuinely holds both at once.</p><p>When you do check the qubit (like catching that spinning coin), the superposition collapses. The qubit picks one outcome: either 0 or 1. You never see it as both. The moment you look, it commits.</p><div><hr></div><h2><strong>Classical vs Quantum: A Tale of Two Computers</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AgR-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AgR-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 424w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 848w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AgR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif" width="1456" height="573" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:573,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3804428,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AgR-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 424w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 848w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!AgR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07f8132f-1545-4d16-b515-7ac6a6ca7fcf_1830x720.gif 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><blockquote><p>The difference between regular computers and quantum computers isn&#8217;t just about speed. It&#8217;s about how they represent and work with information.</p></blockquote><p>Regular computers operate step by step. Each bit stores exactly one value. If you need to test multiple possibilities, like trying different passwords or searching a huge database, you check them one at a time. Sure, you can split the work across multiple cores, but each core is still looking at individual cases. The basic process is sequential.</p><p>Quantum computers work differently because of superposition. They can represent many possibilities at once. Here&#8217;s where it gets interesting:</p><ul><li><p>1 qubit in superposition can represent 2 states at the same time</p></li><li><p>2 qubits can represent 4 states (00, 01, 10, 11) at once</p></li><li><p>3 qubits can represent 8 states</p></li><li><p>10 qubits can represent 1,024 states</p></li><li><p>n qubits can represent 2^n states</p></li></ul><p>This exponential growth is wild. It means a quantum system can handle all these combinations simultaneously within a single quantum state.</p><p>But here&#8217;s something that confuses people.</p><h2><strong>Why One Qubit Isn&#8217;t the Same as Two Regular Bits</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gcDa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gcDa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 424w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 848w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 1272w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gcDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif" width="1030" height="420" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:420,&quot;width&quot;:1030,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1564902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gcDa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 424w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 848w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 1272w, https://substackcdn.com/image/fetch/$s_!gcDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88df19e-c9c4-4c66-b87f-999a31154d4f_1030x420.gif 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>You might be thinking: &#8220;If one qubit can be 0 or 1 like a regular bit, isn&#8217;t one qubit basically two bits?&#8221;</p><p>Not quite. Two regular bits give you four possible combinations (00, 01, 10, 11), but they can only hold one of those at any moment. Maybe it&#8217;s 10 right now. That&#8217;s it. One definite state.</p><p>One qubit changes everything. It exists in a superposition of 0 and 1 at the same time. Two qubits can represent all four combinations at once. Three qubits hold eight states simultaneously.</p><div class="pullquote"><p>Regular bits store one answer. Qubits carry whole libraries of possibilities all at once. That&#8217;s the real difference.</p></div><h2><strong>Visualizing Qubit States: The Bloch Sphere</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z1PE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z1PE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 424w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 848w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 1272w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z1PE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif" width="640" height="453.76" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:709,&quot;width&quot;:1000,&quot;resizeWidth&quot;:640,&quot;bytes&quot;:1897867,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z1PE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 424w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 848w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 1272w, https://substackcdn.com/image/fetch/$s_!Z1PE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd79b3ef5-dc64-45f6-9828-39be7eac447e_1000x709.gif 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>To understand how qubits work, physicists use something called the Bloch sphere. It&#8217;s basically a globe that maps all possible states of a single qubit.</p><p>At the top of this globe, you have the pure 0 state. At the bottom, the pure 1 state. A regular bit could only sit at one of these two spots.</p><p>But a qubit can point anywhere on the surface of this sphere. Tilt it slightly toward the bottom and it&#8217;s mostly 1 with a small chance of 0. Put it on the equator and it&#8217;s a perfect 50/50 mix. Every point on the sphere represents a valid quantum state with different odds of measuring 0 or 1.</p><p>This isn&#8217;t just a pretty picture. It&#8217;s how we think about changing qubits. To move a qubit to a different state, we rotate it around the sphere using operations called quantum gates.</p><div><hr></div><h2><strong>Superposition: Holding Multiple Possibilities</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WGV3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WGV3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 424w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 848w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 1272w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WGV3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif" width="1285" height="990" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:990,&quot;width&quot;:1285,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3865316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WGV3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 424w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 848w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 1272w, https://substackcdn.com/image/fetch/$s_!WGV3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fcebd6d-4c21-4670-9812-1b95712a3cf9_1285x990.gif 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>Superposition is the ability of a qubit to be in a combination of states at the same time. It&#8217;s not that we don&#8217;t know which state it&#8217;s in (that would just be regular uncertainty). The qubit actually holds both possibilities at once, each with a certain probability.</p><p>Think back to that coin spinning in the air. The qubit isn&#8217;t secretly heads or tails while we&#8217;re not looking. It&#8217;s genuinely in a state that contains both outcomes. Only when we check does it collapse into one answer.</p><blockquote><p>When you have several qubits in superposition together, you can represent a huge space of possibilities. Imagine you want to test millions of different coin flips. A regular computer would check them one by one. A quantum computer, because each qubit can be in superposition, handles all those tests in parallel inside one system.</p></blockquote><p>This parallel processing doesn&#8217;t come from having more hardware. It comes from the quantum properties of the qubits themselves.</p><div><hr></div><h2><strong>Interference: Amplifying the Right Answer</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kpyx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kpyx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 424w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 848w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 1272w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kpyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif" width="337" height="434.9316239316239" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:755,&quot;width&quot;:585,&quot;resizeWidth&quot;:337,&quot;bytes&quot;:1371946,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kpyx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 424w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 848w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 1272w, https://substackcdn.com/image/fetch/$s_!kpyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F099983ab-c2e0-4d80-b7d0-83ce97f281b9_585x755.gif 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>Having qubits explore many possibilities at once sounds great. But if we just measured them right away, we&#8217;d get one random outcome from all those possibilities. The real magic comes from interference.</p><p>Think of interference like ripples on a pond. When two ripples meet, sometimes they add up to make a bigger wave (constructive interference). Sometimes they cancel each other out and leave flat water (destructive interference).</p><p>Quantum states work the same way. Their probabilities can build up or cancel out depending on how we manipulate them. This is the secret of quantum algorithms: we set things up so wrong answers cancel out, while the correct answer gets amplified.</p><p>When you finally measure the qubits, you still only see one result, like picking one book from a library. But we&#8217;ve arranged the math so the wrong answers have mostly cancelled themselves out. The correct answer becomes the most likely thing to show up when we measure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kuFD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kuFD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 424w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 848w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 1272w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kuFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif" width="1456" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2024954,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kuFD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 424w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 848w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 1272w, https://substackcdn.com/image/fetch/$s_!kuFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd72a06d-e9a6-416a-b8af-48e3c67fe5a8_1800x709.gif 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>Constructive interference happens when quantum states line up and reinforce each other. The probabilities add up, making certain outcomes more likely. This is what we want for the correct answer.</p><p>Destructive interference happens when quantum states work against each other and cancel out. The probabilities shrink or disappear. This is what we want for wrong answers.</p><blockquote><p>Quantum algorithms are carefully designed routines that use interference to push probability toward the solution we&#8217;re looking for.</p></blockquote><div><hr></div><h2><strong>Quantum Gates: Choreographing Probability</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!icyh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!icyh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 424w, https://substackcdn.com/image/fetch/$s_!icyh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 848w, https://substackcdn.com/image/fetch/$s_!icyh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 1272w, https://substackcdn.com/image/fetch/$s_!icyh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!icyh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif" width="1456" height="518" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:518,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3765532,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!icyh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 424w, https://substackcdn.com/image/fetch/$s_!icyh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 848w, https://substackcdn.com/image/fetch/$s_!icyh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 1272w, https://substackcdn.com/image/fetch/$s_!icyh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12444e46-f7ba-495c-9dcd-295d6f4b19c9_1800x640.gif 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>Just as regular computers use logic gates (AND, OR, NOT) to work with bits, quantum computers use quantum gates to work with qubits. But instead of flipping between definite values, quantum gates rotate qubits around the Bloch sphere, changing their probabilities.</p><h3><strong>Classical Gates as a Baseline</strong></h3><p>In regular computing, a gate like NOT just flips a bit. If it&#8217;s 0, it becomes 1. If it&#8217;s 1, it becomes 0. An AND gate takes two bits and gives you 1 only if both inputs are 1. These operations are predictable and definite.</p><h3><strong>Quantum Gates: Rotation and Mixing</strong></h3><p>Quantum gates are different. They transform a qubit&#8217;s state by rotating it to a different point on the Bloch sphere.</p><p>The X gate is the quantum version of NOT. If a qubit is in state 0, applying X rotates it to 1. If it&#8217;s in 1, X rotates it to 0. Simple flip, just like the regular NOT gate.</p><p>The Hadamard gate is more interesting. It doesn&#8217;t just flip. It creates superposition. If a qubit starts in the definite 0 state (top of the Bloch sphere), the Hadamard gate rotates it to the equator, creating a perfect 50/50 mix of 0 and 1.</p><p>Going back to our coin analogy, it&#8217;s like taking a coin lying flat showing heads and giving it a perfect spin so it&#8217;s equally likely to land heads or tails.</p><p>This is where the magic happens. By stacking many quantum gates in a row, we control how qubits rotate and tilt, building up complex probability patterns. These sequences of gates form quantum circuits. They&#8217;re like choreographed dances for probabilities, steering the qubits toward the answers we want.</p><div><hr></div><h2><strong>Entanglement: Qubits Working in Harmony</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2qmU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2qmU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 424w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 848w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 1272w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2qmU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif" width="990" height="520" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13358807-5eaa-46c8-845b-de22995c264d_990x520.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:520,&quot;width&quot;:990,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2202660,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2qmU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 424w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 848w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 1272w, https://substackcdn.com/image/fetch/$s_!2qmU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13358807-5eaa-46c8-845b-de22995c264d_990x520.gif 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>So far we&#8217;ve talked about individual qubits and how superposition lets each one represent multiple possibilities. But the real power shows up when qubits start working together through entanglement.</p><p>Entanglement is a special connection between qubits. When two qubits are entangled, their states become linked. If you check one, you instantly know something about the other, even if they&#8217;re far apart.</p><p>This isn&#8217;t because they&#8217;re sending signals to each other. There&#8217;s no hidden communication happening. It&#8217;s just how quantum mechanics works. </p><div class="pullquote"><p>Einstein called it &#8220;spooky action at a distance&#8221; because it seemed so strange. </p></div><p>But entanglement is real, proven in experiments, and completely essential to quantum computing. With entanglement, a group of qubits can coordinate in ways regular bits never could. They don&#8217;t just work independently. They act as one unified system where the state of one qubit depends on the state of others.</p><h3><strong>Superposition Plus Entanglement Equals Quantum Power</strong></h3><p>Here&#8217;s where everything comes together. Let&#8217;s compare:</p><p>Two regular bits can store one of four possible values (00, 01, 10, 11) at any time. If you want to work with all four, you process them separately.</p><p>Two qubits in superposition can represent all four values at the same time until you measure them. But that alone isn&#8217;t enough for quantum advantage.</p><p>When those two qubits are entangled in the right way, quantum algorithms can use their combined state to do computations that consider multiple inputs at once. By using interference, we amplify correct answers and cancel out wrong ones across this entangled superposition.</p><p>Scale this up. Ten entangled qubits in superposition can represent 1,024 states at once. A hundred qubits can represent more states than there are atoms in the observable universe. Through interference, quantum algorithms can navigate this massive space efficiently, finding solutions that would take regular computers forever.</p><h2><strong>Putting It All Together</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2ghW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2ghW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 424w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 848w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 1272w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2ghW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif" width="1456" height="494" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:494,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3917533,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/177187985?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2ghW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 424w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 848w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 1272w, https://substackcdn.com/image/fetch/$s_!2ghW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be18e1a-a59c-425d-a253-78d039a0dc66_1588x539.gif 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>Quantum computing rests on three pillars:</p><ol><li><p>Superposition lets each qubit explore many possibilities at the same time, giving quantum computers massive parallelism inside a single system.</p></li><li><p>Entanglement ties qubits together so they work in harmony, creating connections impossible for regular bits.</p></li><li><p>Interference lets us design computations where wrong answers cancel out and correct answers build up, steering the system toward solutions.</p></li></ol><blockquote><p>When you combine these three things (superposition to hold many states at once, entanglement to coordinate qubits, and interference to boost the right outcome), you get quantum computers that can handle certain problems incredibly efficiently.</p></blockquote><p>Notice I said &#8220;certain problems.&#8221; Quantum computers aren&#8217;t faster than regular computers at everything. They excel at specific tasks where quantum interference helps, like factoring large numbers, searching unsorted databases, simulating quantum systems, and solving optimization problems. For most everyday computing, regular computers work just fine and are much easier to build and maintain.</p><h2><strong>Looking Ahead</strong></h2><p>We&#8217;ve covered the basic ideas that make quantum computing work: qubits, superposition, interference, quantum gates, and entanglement. These aren&#8217;t just theoretical concepts. They&#8217;re the building blocks that let quantum algorithms solve problems regular computers struggle with.</p><p>In the next post, we&#8217;ll look at quantum algorithms. These are the actual procedures that use these quantum phenomena to deliver real advantages. We&#8217;ll explore algorithms like Grover&#8217;s search and Shor&#8217;s factoring, see how they use interference and entanglement to beat their regular counterparts, and talk about what kinds of real problems quantum computing might help us solve.</p><div><hr></div><p><em>Thanks for reading. If you have questions or want me to clarify anything, let me know.</em></p>]]></content:encoded></item><item><title><![CDATA[Understanding MCP]]></title><description><![CDATA[How AI Assistants Connect to External Tools]]></description><link>https://blog.bytemonk.io/p/model-context-protocol</link><guid isPermaLink="false">https://blog.bytemonk.io/p/model-context-protocol</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Sun, 28 Sep 2025 17:00:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tWxZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>AI assistants today can connect to external tools and data sources, but each system does this differently. ChatGPT uses its own plugin architecture, Claude has its tools system, and other AI assistants implement their own proprietary methods for external integrations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tWxZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tWxZ!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 424w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 848w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 1272w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tWxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif" width="1456" height="694" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:694,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5759745,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tWxZ!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 424w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 848w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 1272w, https://substackcdn.com/image/fetch/$s_!tWxZ!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88f74df1-4fc3-4ae6-af6c-5e5fc10c4ccc_1713x816.gif 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><blockquote><p>MCP was introduced by Anthropic in late 2024 as an open standard that functions like a universal adapter for AI systems.</p></blockquote><p><strong>Model Context Protocol (MCP)</strong> solves this fragmentation by creating a standardized way for any AI assistant to connect with external tools, databases, APIs, and services. Instead of requiring custom integration work for each AI system, MCP provides a universal protocol that works across different AI assistants and tools.</p><h2>Architecture: Client-Server Communication</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BHK1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BHK1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 424w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 848w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 1272w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BHK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif" width="1456" height="699" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:699,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2119977,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BHK1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 424w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 848w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 1272w, https://substackcdn.com/image/fetch/$s_!BHK1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3422cd06-f9c8-4e27-ac1a-8d240736b7a2_1498x719.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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><blockquote><p>MCP follows a client-server architecture similar to how web browsers communicate with websites. </p></blockquote><p>The system consists of three main components:</p><p><strong>Host Application (AI Agent)</strong>: The main AI-powered system, such as a chatbot, coding assistant, or voice assistant. This includes the Large Language Model and decision-making logic that determines when to use external tools.</p><p><strong>MCP Client</strong>: A component within the AI Agent that acts as the connector between the AI and external tools. The AI doesn&#8217;t communicate with tools directly&#8212;it uses the MCP Client to handle all external interactions. If an AI agent needs to connect to both a calendar and a database, it spawns separate MCP clients for each server.</p><p><strong>MCP Server</strong>: The external tool or data source wrapped in the MCP interface. This could be a local program running on the same machine or a remote cloud service. MCP servers provide capabilities to the AI through three types of offerings:</p><ul><li><p><strong>Prompts</strong>: Pre-defined instructions that guide the AI on how to interact with tools efficiently</p></li><li><p><strong>Resources</strong>: External data sources the AI can query, such as databases, APIs, or file systems</p></li><li><p><strong>Tools &amp; Functions</strong>: Actions the AI can perform, like sending emails, running calculations, or executing commands</p></li></ul><div><hr></div><h2><strong>Communication Protocol and Transport</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L7h7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L7h7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 424w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 848w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 1272w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L7h7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif" width="1182" height="428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:428,&quot;width&quot;:1182,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:511618,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L7h7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 424w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 848w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 1272w, https://substackcdn.com/image/fetch/$s_!L7h7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3d278-5d55-4343-9feb-1b28d2953dcb_1182x428.gif 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>MCP uses JSON-RPC 2.0 as its communication format, meaning clients and servers exchange structured JSON messages including requests, responses, and notifications. The protocol is transport-agnostic, supporting multiple communication methods:</p><p><strong>Standard Input/Output (stdio)</strong>: For local communication between processes on the same machine</p><p><strong>Server-Sent Events (SSE)</strong>: For real-time updates over web connections</p><p><strong>WebSockets, HTTP, or custom transport layers</strong>: For cloud-based AI agents and more complex networking scenarios</p><blockquote><p>The transport layer ensures that JSON-RPC messages travel reliably between clients and servers, regardless of whether they&#8217;re running locally or across networks.</p></blockquote><h2><strong>Implementation: Building MCP Servers</strong></h2><p>Creating an MCP server involves defining the tools and resources you want to expose to AI assistants. Using the official Python SDK, you might implement something like this</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UUjm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UUjm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 424w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 848w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 1272w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UUjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png" width="1330" height="772" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:772,&quot;width&quot;:1330,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:175612,&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://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.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_!UUjm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 424w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 848w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.png 1272w, https://substackcdn.com/image/fetch/$s_!UUjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2fc21db-5e6b-4f04-939f-f645b01bff84_1330x772.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>The SDK handles packaging function names, arguments, and return values into the proper MCP protocol format. When you run this server, it opens a <strong>JSON-RPC</strong> communication channel waiting for AI clients to call <code>send_emai</code>l or request <code>get_latest_report</code><strong>.</strong></p><div><hr></div><h2><strong>Deployment and Integration</strong></h2><p>MCP servers can be deployed in various configurations. For local deployments, servers might run as background processes communicating via stdio. For remote deployments, they typically operate as microservices accessible over HTTP with Server-Sent Events.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zFZW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zFZW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 424w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 848w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 1272w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zFZW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif" width="1456" height="649" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:649,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2115336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zFZW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 424w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 848w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 1272w, https://substackcdn.com/image/fetch/$s_!zFZW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fbed76f-2a51-4300-9317-cd241008d10c_1648x735.gif 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 the AI system side, integrating MCP requires implementing what&#8217;s called the &#8220;LLM loop&#8221; the process that:</p><ol><li><p>Analyzes the AI model&#8217;s output</p></li><li><p>Identifies which specific MCP tool should be called</p></li><li><p>Invokes the appropriate tool through the MCP client</p></li><li><p>Feeds the tool&#8217;s response back to the AI model</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_!54OY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!54OY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 424w, https://substackcdn.com/image/fetch/$s_!54OY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 848w, https://substackcdn.com/image/fetch/$s_!54OY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 1272w, https://substackcdn.com/image/fetch/$s_!54OY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!54OY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png" width="1402" height="678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:678,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:249430,&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://blog.bytemonk.io/i/174751526?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.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_!54OY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 424w, https://substackcdn.com/image/fetch/$s_!54OY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 848w, https://substackcdn.com/image/fetch/$s_!54OY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.png 1272w, https://substackcdn.com/image/fetch/$s_!54OY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff94dcfb5-c8e2-4d0e-b8d1-57368712ffee_1402x678.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><strong>Benefits and Practical Implications</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AlqP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AlqP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 424w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 848w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 1272w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AlqP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png" width="1352" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1352,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AlqP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 424w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 848w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.png 1272w, https://substackcdn.com/image/fetch/$s_!AlqP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59a2c962-694f-4dab-b01f-ce5a517b55d1_1352x933.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>MCP transforms AI assistants into adaptable powerhouses.</strong> Like adding apps to your phone, new tools snap in seamlessly without breaking what&#8217;s already there. Instead of relying on stale training data, AI can tap into live information streams and specialized tools for razor-sharp accuracy. When things change, developers just swap out the relevant piece, no costly retraining or code rewrites needed. </p><blockquote><p>MCP provides a clean framework for tool interactions, though you&#8217;ll still want dedicated security solutions to lock down access to your critical systems. (More on this in my future posts).</p></blockquote><div><hr></div><h2><strong>The Path Forward</strong></h2><p>As the protocol matures and adoption grows, we&#8217;ll see AI assistants become seamlessly integrated into existing workflows and business systems. The open nature of MCP enables tool developers and AI builders to innovate independently while maintaining interoperability, accelerating the development of specialized solutions across different domains.</p><p>In my next post, I&#8217;ll explore emerging MCP trends, compare it with alternative integration approaches, and discuss how it fits into the broader AI tooling ecosystem.</p>]]></content:encoded></item><item><title><![CDATA[How Amazon S3 Promises to Never Lose Your Data]]></title><description><![CDATA[The Engineering Behind 11 Nines]]></description><link>https://blog.bytemonk.io/p/how-amazon-s3-promises-to-never-lose</link><guid isPermaLink="false">https://blog.bytemonk.io/p/how-amazon-s3-promises-to-never-lose</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Sun, 07 Sep 2025 14:01:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oWOR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif" 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_!oWOR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oWOR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 424w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 848w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 1272w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oWOR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif" width="1456" height="703" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:703,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2389231,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oWOR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 424w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 848w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 1272w, https://substackcdn.com/image/fetch/$s_!oWOR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F540a8d78-9dc9-43f2-ba2f-5f4d81c2b682_1600x772.gif 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>Amazon S3 makes an extraordinary promise: <strong>99.999999999% durability</strong>. That's eleven nines, meaning if you stored 10,000 files in S3, you might statistically lose one file every 10 million years.</p><p>Companies store exabytes of data in S3, Netflix's video catalog, NASA's satellite imagery, millions of corporate backups. At that scale, achieving this level of reliability requires sophisticated engineering.</p><p>How does a system handling trillions of objects across millions of customers achieve this level of reliability? The answer reveals fundamental principles about building resilient systems that apply far beyond cloud storage.</p><h2><strong>Understanding Durability vs. Availability</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kAiI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kAiI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kAiI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4533771,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kAiI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!kAiI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38fc3137-2d74-48d5-8403-deccfef4a039_1920x1080.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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 diving into S3's architecture, we need to clarify what durability actually means, because it's often confused with availability, and the distinction is crucial.</p><p><strong>Availability</strong> is about accessing your data when you need it. If S3 is unavailable, you might get error messages or timeouts, but your data still exists somewhere in Amazon's infrastructure. Availability problems are inconvenient and can cost money, but they're typically temporary.</p><p><strong>Durability</strong> is about ensuring your data never disappears or becomes corrupted. If S3 has a durability failure, your data is gone forever, no amount of waiting or retrying will bring it back. Durability failures are catastrophic and permanent.</p><p>This distinction shapes every architectural decision in S3. While availability problems can be solved with redundancy and failover mechanisms, durability requires a fundamentally different approach to how data is stored, protected, and maintained over time.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T2cT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T2cT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 424w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 848w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 1272w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T2cT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif" width="1456" height="634" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:634,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3231911,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!T2cT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 424w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 848w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 1272w, https://substackcdn.com/image/fetch/$s_!T2cT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc865d9a4-7276-473a-88e4-8d4354d4b133_1600x697.gif 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>S3's first principle is simple: don't put all your eggs in one basket. At the massive scale AWS operates, hard drives fail constantly, not occasionally, but every single day across their infrastructure.Instead of fighting this reality, S3 embraces it by spreading your data across multiple physical devices from the moment it arrives.</p><div class="pullquote"><p>When you upload a file, S3 doesn't just save it to one disk and call it done. It immediately replicates that data across different servers, different storage racks, and different availability zones.</p></div><p>Availability zones are essentially separate data centers, each with independent power systems, network connections, and cooling infrastructure. They're often located miles apart within a region. This means that even if an entire data center loses power or faces a natural disaster, your data remains intact and accessible from other zones.</p><p>But S3 goes beyond simple replication with a technique called <strong>erasure coding</strong>: a more sophisticated approach borrowed from telecommunications and refined for cloud-scale storage.</p><h2><strong>Erasure Coding: The Mathematics of Resilience</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MGXm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MGXm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 424w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 848w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 1272w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MGXm!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:2604605,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MGXm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 424w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 848w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 1272w, https://substackcdn.com/image/fetch/$s_!MGXm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78782a2-12cd-4bce-932b-a1263bb09933_1600x900.gif 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>Instead of making exact copies of your data, S3 Erasure Coding breaks each object into smaller pieces called data shards, then generates additional parity shards using mathematical algorithms.</p><p>Here's the clever part: you only need a subset of these shards to reconstruct your original file. If S3 creates 10 shards total and needs only 6 to rebuild your data, then 4 shards can disappear completely without any data loss.</p><blockquote><p>This approach is far more efficient than simple duplication. Instead of storing 3 complete copies of your data (requiring 3x the storage space), erasure coding might provide the same level of protection using only 1.5x the space, while actually providing better fault tolerance.</p></blockquote><p>The shards are distributed not just across different disks, but across different servers, racks, and even data centers. The mathematical probability that enough shards would fail simultaneously to cause data loss becomes astronomically small&#8212;which is how S3 can confidently promise those eleven nines.</p><h2><strong>Proactive Health Monitoring and Recovery</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zVEQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zVEQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 424w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 848w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 1272w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zVEQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif" width="1456" height="844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4087173,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zVEQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 424w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 848w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 1272w, https://substackcdn.com/image/fetch/$s_!zVEQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5386bf56-8897-409f-8f3c-70c76ee6b4e5_1600x927.gif 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>S3 continuously monitors every storage device, tracking metrics like read/write latency, error rates, and performance degradation. When a disk shows signs of trouble, automated systems begin moving data to healthy storage before the device actually fails.</p><p>Here's where S3's architecture gets particularly clever: each storage device doesn't run at full capacity. Every disk reserves some free space specifically for recovery operations. When a drive fails, the recovery process doesn't burden just one or two replacement drives. Instead, a swarm of drives across the system contributes small amounts of their reserved capacity to the reconstruction effort.</p><blockquote><p>This distributed recovery approach means that data restoration happens in parallel across hundreds or thousands of drives simultaneously. It's like having a traffic jam suddenly gain dozens of new lanes, the data flows quickly and efficiently to its new home.</p></blockquote><p>The speed of this recovery process is crucial because it affects the window of vulnerability. The faster S3 can restore full redundancy after a failure, the lower the risk of additional failures affecting the same data. The system is designed to keep recovery speed ahead of failure speed, even during periods of elevated hardware problems.</p><h2><strong>Checksums</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3O-j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3O-j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 424w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 848w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 1272w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3O-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif" width="1456" height="899" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:899,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3306823,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3O-j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 424w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 848w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 1272w, https://substackcdn.com/image/fetch/$s_!3O-j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b674092-a1f2-4e1a-8846-f6cd5394e97a_1600x988.gif 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>Protecting against hardware failure is only part of the durability challenge. Data can also become corrupted in subtler ways, a cosmic ray flips a bit in memory, a network error corrupts bytes in transit, or a software bug introduces corruption during processing.</p><p>S3 addresses this through comprehensive checksum verification. </p><blockquote><p>Think of a checksum as a digital fingerprint for your data. When you upload a file, S3 calculates a unique mathematical signature based on the exact contents of your data. Even changing a single bit produces a completely different checksum.</p></blockquote><p>But S3 doesn't just calculate checksums once during upload. The system continuously verifies data integrity through background scanning processes. Each erasure-coded shard has its own embedded checksum, and S3 routinely validates these checksums across its entire storage fleet.</p><p>When the system detects corruption in a shard, it doesn't panic or alert operations teams. Instead, it quietly reconstructs the corrupted shard from healthy replicas using erasure coding, then replaces the bad data with the corrected version. This healing process happens automatically and transparently, maintaining data integrity without human intervention.</p><p>This continuous auditing and automatic repair creates a self-healing storage system that becomes more reliable over time, not less reliable as components age.</p><h2><strong>Bracketing</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cz8D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cz8D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 424w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 848w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 1272w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cz8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif" width="472" height="466.90830636461703" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:917,&quot;width&quot;:927,&quot;resizeWidth&quot;:472,&quot;bytes&quot;:2877103,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cz8D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 424w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 848w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 1272w, https://substackcdn.com/image/fetch/$s_!cz8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d65c534-a5e3-4703-94aa-56ddb47591b2_927x917.gif 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>When you upload a file to S3, the system doesn't immediately respond with "upload successful" once the data hits storage devices.</p><p>Instead, S3 performs "bracketing", it attempts to reconstruct your original file from the erasure-coded shards it just created. Only if this reconstruction succeeds perfectly does S3 confirm that your upload was successful.</p><p>This extra verification step catches problems that might otherwise go unnoticed until you actually need to retrieve your data. By testing recoverability immediately, S3 ensures that every successful upload is genuinely recoverable.</p><p>The bracketing process adds slight latency to upload operations, but it provides enormous confidence in data durability. When S3 says your data is safely stored, it has literally proven that claim by reconstructing your file from its stored components.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fs46!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fs46!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 424w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 848w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 1272w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fs46!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif" width="1200" height="512.6373626373627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:622,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:3150833,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fs46!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 424w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 848w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 1272w, https://substackcdn.com/image/fetch/$s_!Fs46!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac5d6f6b-a5b5-4ddb-a72d-f189dd335e77_1600x684.gif 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>S3's durability strategy extends beyond individual hardware failures to consider larger-scale disasters. Data is distributed not just across different storage devices, but across multiple availability zones that are physically separated by miles within each AWS region.</p><div class="pullquote"><p>Each availability zone operates as an independent failure domain with separate power grids, network connections, and cooling systems. </p></div><p>The zones are far enough apart that localized disasters, fires, floods, power grid failures can't affect multiple zones simultaneously, but close enough that network latency between zones remains minimal.</p><p>For customers requiring even greater protection, S3 offers cross-region replication, where data is automatically copied to entirely different geographic regions. This protects against region-wide disasters and provides additional options for disaster recovery planning.</p><p>The geographic distribution also helps with performance optimization. When you request data, S3 can serve it from the closest available location, reducing latency while maintaining the same durability guarantees.</p><h2><strong>Human Error Protection</strong></h2><p><em>Versioning and Access Controls</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dxfX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dxfX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 424w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 848w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 1272w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dxfX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif" width="1456" height="510" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:510,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4830487,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dxfX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 424w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 848w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 1272w, https://substackcdn.com/image/fetch/$s_!dxfX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24d8f66d-7732-4045-8ce8-e3f2e06c29ed_1600x560.gif 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>Not all data loss comes from hardware failures or natural disasters. Human errors such as accidental deletions, incorrect overwrites, malicious actions by compromised accounts, represent a significant threat to data durability.</p><p>S3 addresses these risks through several complementary features. Object versioning maintains multiple versions of objects automatically, so accidentally overwriting or deleting a file doesn't destroy previous versions. The data remains accessible, and you can restore earlier versions when needed.</p><p>Object Lock provides even stronger protection by making objects immutable for specified time periods. Even users with administrative access cannot delete or modify locked objects until the retention period expires. This feature proves particularly valuable for compliance requirements and protecting against ransomware attacks.</p><p>Multi-factor authentication and detailed access logging provide additional layers of protection against unauthorized access. S3 can track exactly who accessed what data when, making it easier to detect suspicious activity and understand the scope of any security incidents.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FAqW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FAqW!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 424w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 848w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 1272w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FAqW!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif" width="1456" height="1018" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1018,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5509432,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/172982860?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FAqW!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 424w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 848w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 1272w, https://substackcdn.com/image/fetch/$s_!FAqW!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7ba753c-34da-4a33-b97e-e3bc87f204f1_1600x1119.gif 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>Perhaps the most important factor in S3's durability isn't visible in any architecture diagram: the engineering culture and processes that govern how the system evolves.</p><p>Every change to S3, new features, configuration updates, infrastructure modifications, undergoes rigorous durability review. Engineers must demonstrate that their changes won't compromise data protection, even under failure scenarios. This includes modeling worst-case situations, running simulations, and proving that the eleven nines target remains achievable.</p><p>Amazon S3's eleven nines of durability isn't just a marketing claim, it's the result of thoughtful engineering, careful implementation, and disciplined operations at massive scale. The system combines multiple layers of protection, from mathematical redundancy through proactive monitoring to comprehensive testing, creating a storage platform that approaches theoretical perfection in data preservation.</p><p>For organizations evaluating storage solutions, S3's approach provides a benchmark for what's possible with modern engineering. For system designers, it offers a case study in building reliable systems through principled architecture rather than hoping that individual components won't fail.</p><p>The next time you upload a file to the cloud and trust that it will be there years from now, remember that this seemingly simple act relies on some of the most sophisticated reliability engineering ever deployed at scale. It's a reminder that behind every effortless user experience lies extraordinary technical complexity, working invisibly to keep our digital world running.</p>]]></content:encoded></item><item><title><![CDATA[The Architecture Behind NGINX]]></title><description><![CDATA[How One Server Handles Millions of Requests]]></description><link>https://blog.bytemonk.io/p/the-architecture-behind-nginx</link><guid isPermaLink="false">https://blog.bytemonk.io/p/the-architecture-behind-nginx</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Tue, 26 Aug 2025 00:30:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dIt0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif" 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_!dIt0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dIt0!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 424w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 848w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1272w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif" width="1456" height="858" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:858,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!dIt0!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 424w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 848w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1272w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 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>When Netflix streams a movie to your living room, when Amazon processes your order, or when GitHub serves code to millions of developers, there's a good chance NGINX is quietly working behind the scenes, handling the digital traffic with remarkable efficiency.</p><p>NGINX doesn't handle this massive load by throwing more hardware at the problem or spinning up thousands of threads like traditional servers. Instead, it uses an architectural approach so elegant and efficient that a single server can handle hundreds of thousands of concurrent connections without breaking a sweat.</p><p>Understanding how NGINX works reveals fundamental principles about building scalable systems, principles that apply whether you're designing web servers, real-time applications, or any system that needs to handle high concurrency. It's a masterclass in doing more with less.</p><h2><strong>The Traditional Approach: Why More Threads Don't Always Help</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ni8J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ni8J!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 424w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 848w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ni8J!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif" width="1456" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;: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_!Ni8J!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 424w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 848w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!Ni8J!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8c2f65b-0264-493e-a358-366ce53f2377_1460x720.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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>Traditional web servers like Apache HTTP Server use what's called a <strong>"thread-per-request"</strong> model. The concept seems straightforward: when a user connects to your website, the server creates a dedicated thread to handle their request from start to finish.</p><p>Imagine three users visiting your website simultaneously. The server dutifully creates three threads, one for each user. If you have a dual-core processor, two threads can run immediately while the third waits its turn. This sounds manageable until you scale up.</p><p>Now imagine 10,000 users. Suddenly you have 10,000 threads competing for CPU time, each consuming memory for its stack space, and the operating system spending significant time just switching between threads, a process called <strong>context switching</strong>. What started as a simple model becomes a performance nightmare.</p><p>Each thread typically requires 2-8MB of memory just for its stack. With 10,000 concurrent connections, you're looking at 20-80GB of RAM before your application even does anything useful. Add the CPU overhead of context switching between thousands of threads, and your server becomes more busy managing threads than serving actual requests.</p><p>Apache has evolved sophisticated mechanisms to handle this&#8212;worker pools, event modules, and process limits&#8212;but the fundamental challenge remains: the thread-per-request model doesn't scale linearly with load.</p><p>This is where NGINX took a radically different approach.</p><h2><strong>The NGINX Revolution</strong></h2><p><em>Event-Driven Architecture</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iSjk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iSjk!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 424w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 848w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iSjk!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif" width="1456" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iSjk!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 424w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 848w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 1272w, https://substackcdn.com/image/fetch/$s_!iSjk!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac2815d0-ea58-4506-b09c-5222a27015fb_1460x720.gif 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>Instead of creating a new thread for every request, NGINX flips the problem on its head. It runs a small number of worker processes, typically one per CPU core, and each worker can handle thousands of concurrent connections simultaneously.</p><p>The architecture looks deceptively simple. At the top sits a master process that doesn't handle traffic directly but manages configuration, spawns worker processes, and handles graceful reloads. Below it are the worker processes, the real engines that serve requests. You might also see cache manager and cache loader processes that handle static content optimization in the background.</p><p>But the magic happens inside each worker process, where NGINX implements what's called an event loop.</p><h2><strong>Inside the Event Loop</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dIt0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dIt0!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 424w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 848w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1272w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif" width="1456" height="858" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:858,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dIt0!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 424w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 848w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 1272w, https://substackcdn.com/image/fetch/$s_!dIt0!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84406b82-7841-4a98-aae4-8a30debc69e0_1460x860.gif 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>When requests arrive, they queue up on what's called a listen socket. A socket, in networking terms, is like a communication channel between the server and a client, it stays open for the entire conversation. The listen socket maintains a backlog of new connections waiting to be accepted, like a waiting room for new customers.</p><p>Once a worker accepts a connection, it doesn't sit idle if that connection is waiting for something&#8212;like reading a file from disk or fetching data from a database. Instead, it sets the connection aside and moves on to handle other connections that are ready to proceed. When the I/O operation completes, the connection rejoins the queue of ready connections.</p><p>The worker uses an event loop to rapidly cycle through all active connections, processing whichever ones are ready. It's not managing just a few connections, a single worker can handle thousands of connections simultaneously, switching between them faster than human perception.</p><h2><strong>The Secret Weapon</strong></h2><p><em>epoll, kqueue</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K4aP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K4aP!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 424w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 848w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 1272w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K4aP!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif" width="1456" height="798" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:798,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!K4aP!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 424w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 848w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 1272w, https://substackcdn.com/image/fetch/$s_!K4aP!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fead10954-3ef9-4a5d-94b4-721b49e27e71_1460x800.gif 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>The technical breakthrough that makes this possible involves system calls like epoll on Linux and kqueue on BSD/macOS. These are efficient ways for programs to monitor thousands of network connections simultaneously without the overhead of checking each one individually.</p><p>Traditional approaches would require the server to constantly ask, "Is connection 1 ready? Is connection 2 ready? Is connection 3 ready?" thousands of times per second. </p><div class="pullquote"><p>With <strong>epoll</strong> the server instead tells the operating system, "Monitor all these connections for me, and let me know when any of them have something to do."</p></div><p>When a client sends data, like requesting a web page, epoll immediately notifies the event loop: "Connection #451 is ready." The worker processes that specific event instantly and moves on. No time wasted checking connections that aren't ready.</p><p>This creates a remarkably efficient cycle. The event loop processes all ready connections, then immediately asks epoll, "What's ready now?" If new connections become ready even microseconds later, epoll catches them and the cycle continues. The server stays completely non-blocking and responsive.</p><p>Even if thousands of connections become active simultaneously, NGINX handles them with extraordinary efficiency because epoll tells it exactly which connections need attention, and most operations&#8212;reading HTTP headers, serving cached files, or sending responses, are lightweight and fast.</p><h2><strong>NGINX vs. Node.js</strong></h2><p><em>Similar Concepts, Different Implementations</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BX4d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BX4d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 424w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 848w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 1272w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BX4d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png" width="1456" height="1228" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1228,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BX4d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 424w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 848w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.png 1272w, https://substackcdn.com/image/fetch/$s_!BX4d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02fbbf1b-a31d-4ffb-818e-b40cbc836321_1600x1349.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>If you've worked with Node.js, this event-driven approach might sound familiar. Both NGINX and Node.js use non-blocking, event-driven architectures, but they implement them differently.</p><p>Node.js starts with a single thread running JavaScript code. It uses a library called libuv to handle I/O operations asynchronously, with a hidden thread pool managing disk reads and database connections. For CPU-intensive tasks, you need to explicitly use worker threads to avoid blocking the main event loop.</p><p>NGINX takes a more structured approach. It creates multiple worker processes, not threads, typically one per CPU core. Each worker process is independent, with its own memory space and event loop. This provides better isolation and stability since workers don't share memory and can't interfere with each other.</p><p>The distinction between processes and threads matters. Threads share memory within the same process, which can lead to race conditions and complex synchronization requirements. NGINX workers are separate processes that communicate through well-defined channels, making the system more predictable and easier to debug.</p><h2><strong>Real-World Performance</strong></h2><p>The practical implications are dramatic. A traditional threaded server might handle hundreds or low thousands of concurrent connections before performance degrades. A well-configured NGINX server can handle hundreds of thousands of concurrent connections on the same hardware.</p><div class="pullquote"><p>Companies routinely run NGINX instances serving 100,000+ concurrent connections on standard server hardware. </p></div><p>The memory footprint remains modest because you're not allocating thread stacks for each connection. CPU usage stays efficient because there's minimal context switching overhead.</p><p>The architecture also provides natural load balancing across CPU cores. If you have an 8-core server, you typically run 8 worker processes, each pinned to a specific core. This eliminates CPU cache thrashing and provides predictable performance scaling.</p><h2><strong>Configuration and Tuning</strong></h2><p>Understanding the architecture is only half the battle. Making NGINX perform optimally requires thoughtful configuration. The number of worker processes should typically match your CPU cores. The worker_connections setting determines how many simultaneous connections each worker can handle&#8212;values of 1024-4096 are common starting points.</p><p>Operating system limits become crucial at scale. The maximum number of open file descriptors must be increased since each connection requires a file descriptor. Network buffer sizes might need tuning for high-throughput applications. The listen socket backlog should be large enough to handle traffic spikes without dropping connections.</p><p>Monitoring becomes essential. Key metrics include active connections per worker, request processing time, and system resource utilization. Unlike threaded servers where you might monitor thread pool exhaustion, with NGINX you're watching for event loop saturation and connection queue depths.</p><h2><strong>The Trade-offs: When NGINX Isn't the Answer</strong></h2><p>NGINX's architecture excels for I/O-bound workloads but isn't optimal for every scenario. CPU-intensive operations can block the event loop since workers process events sequentially. </p><div class="pullquote"><p>If your application needs to perform complex calculations or data processing for each request, traditional threaded servers might provide better performance by utilizing multiple CPU cores simultaneously.</p></div><p>The single-threaded nature of each worker also means careful error handling is crucial. An unhandled exception or infinite loop in one request can freeze an entire worker, affecting thousands of other connections. Traditional threaded servers provide better fault isolation since problems in one thread don't directly impact others.</p><p>Memory usage patterns differ too. While NGINX uses less memory per connection, it can use more memory per worker for shared resources like SSL session caches or application state. The optimal architecture depends on your specific use case and traffic patterns.</p><h2><strong>Looking Forward</strong></h2><p><em>The Evolution of High-Performance Systems</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q_z_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q_z_!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 424w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 848w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 1272w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q_z_!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif" width="1196" height="669" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:669,&quot;width&quot;:1196,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q_z_!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 424w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 848w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 1272w, https://substackcdn.com/image/fetch/$s_!Q_z_!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15bd4df7-7abf-4f9b-8017-f8e601e7fb04_1196x669.gif 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>NGINX's architectural principles continue influencing modern system design. Container orchestration platforms like Kubernetes use similar event-driven approaches to manage thousands of pods efficiently. Cloud computing platforms apply these concepts to handle massive numbers of virtual machines and serverless functions.</p><p>The rise of WebAssembly and edge computing creates new opportunities for NGINX-style architectures. When applications need to run close to users with minimal resource overhead, event-driven systems provide excellent performance density. The same principles that allow NGINX to handle massive web traffic enable edge applications to run efficiently on resource-constrained hardware.</p><p>Programming languages and frameworks increasingly adopt similar patterns. Go's goroutines, Rust's async/await, and even Java's Project Loom all draw inspiration from the event-driven model that made NGINX successful. The future of high-performance computing isn't necessarily about faster processors, it's about using existing resources more efficiently.</p><h2><strong>The Enduring Lessons</strong></h2><p>NGINX succeeded not by brute force but by reimagining how servers should work. Instead of fighting the limitations of traditional threading, it embraced a fundamentally different approach that turns I/O waiting time into an opportunity rather than a bottleneck.</p><p>When building systems that handle high concurrency, the architecture matters more than raw performance. Sometimes the most elegant solution isn't about doing things faster, it's about doing them differently.</p>]]></content:encoded></item><item><title><![CDATA[Inside High-Frequency Trading]]></title><description><![CDATA[How Machines Trade in Microseconds]]></description><link>https://blog.bytemonk.io/p/inside-high-frequency-trading</link><guid isPermaLink="false">https://blog.bytemonk.io/p/inside-high-frequency-trading</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Thu, 17 Jul 2025 14:31:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!QlJn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif" 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_!QlJn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QlJn!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 424w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 848w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 1272w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QlJn!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif" width="1053" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1053,&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;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QlJn!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 424w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 848w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 1272w, https://substackcdn.com/image/fetch/$s_!QlJn!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a2ed0e-25ee-4bf2-a914-08e8a767df23_1053x832.gif 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>While you're reading this sentence, somewhere in a data center near the New York Stock Exchange, a computer system has already ingested thousands of market updates, evaluated hundreds of trading opportunities, and executed dozens of trades&#8212;all in the time it takes you to blink once.</p><p>This isn't science fiction. This is high-frequency trading, where algorithms and specialized hardware battle for microsecond advantages in financial markets. Every day, these systems process millions of trades, moving billions of dollars based on mathematical models that react faster than human cognition is even possible.</p><p>But here's what most people don't realize HFT isn't just about speed for speed's sake. It's about solving a fundamental economic puzzle. </p><blockquote><p>HFT is about finding tiny price inefficiencies in markets and correcting them before anyone else notices they exist. </p></blockquote><p>The engineering challenge is extraordinary: building systems that can process market data, make trading decisions, and execute orders in less time than it takes light to travel from New York to Chicago.</p><p>Let me take you inside one of these systems and show you exactly how they work.</p><div><hr></div><h2><strong>The Speed Imperative: Why Microseconds Matter</strong></h2><p>Before we dive into the technical architecture, we need to understand why speed matters so profoundly in financial markets. The answer lies in a simple principle: information has value, but only until everyone else has it too.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KUWc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KUWc!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KUWc!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif" width="1351" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1351,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KUWc!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!KUWc!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc770b1e-dad8-4c95-b699-829dc9df8ffb_1351x1080.gif 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>Consider a market-making strategy&#8212;one of the most common HFT approaches. You're essentially acting as a middleman, continuously offering to buy stocks at <strong>$9.99</strong> and sell them at <strong>$10.01</strong>. When someone accepts your sell order, you've earned a <strong>$0.02</strong> spread. Multiply this by thousands of stocks and thousands of transactions per second, and those pennies add up to significant profits.</p><p>But here's the catch: this only works if you can react to market changes faster than your competitors. If the stock's true value suddenly jumps to <strong>$10.50</strong>, you need to pull your <strong>$10.01</strong> sell order immediately&#8212;before someone buys your shares at the old price and leaves you holding a loss.</p><p>In this environment, a single millisecond delay can mean the difference between profitable trading and catastrophic losses. That's why HFT firms spend millions on specialized hardware and co-locate their servers in the same buildings as stock exchanges. </p><blockquote><p>They're not just buying faster computers; they're buying time itself.</p></blockquote><p>This economic reality drives every architectural decision in HFT systems. Let's see how they're built to win this race against time.</p><div><hr></div><h2><strong>The Data Stream: Capturing Market Reality at Light Speed</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0cPE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0cPE!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 424w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 848w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 1272w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0cPE!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26efb223-a841-4039-8314-771b10e19498_1600x900.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0cPE!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 424w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 848w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 1272w, https://substackcdn.com/image/fetch/$s_!0cPE!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26efb223-a841-4039-8314-771b10e19498_1600x900.gif 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>Every HFT system begins with the same fundamental challenge: how do you capture and process the firehose of market data that exchanges produce? We're not talking about the stock prices you see on financial websites&#8212;those are already ancient history by HFT standards.</p><p>Instead, these systems tap directly into exchange data feeds using specialized network protocols. Think of it as the difference between getting news from a newspaper versus having a direct line to the newsroom. </p><blockquote><p>The NASDAQ alone produces millions of market updates per second during active trading hours&#8212;every price change, every new order, every cancellation.</p></blockquote><p>The hardware receiving this data looks nothing like a typical server. Ultra-low-latency network interface cards bypass the operating system entirely, using techniques like kernel bypass to shave off precious microseconds. Some firms use custom hardware from companies like Solarflare (now part of Xilinx) that can process network packets faster than traditional TCP/IP stacks.</p><p>But raw speed means nothing without accuracy. The market data feed handler&#8212;a critical piece of software&#8212;must parse this incoming stream perfectly. It's decoding millions of messages per second, each containing order book updates, trade executions, or administrative notifications. A single parsing error could trigger incorrect trading decisions worth millions of dollars.</p><p>The decoded market data then flows into what might be the most performance-critical component of the entire system: the in-memory order book.</p><div><hr></div><h2><strong>The Order Book: A Real-Time Portrait of Market Intent</strong></h2><p>If market data is the nervous system of an HFT system, the order book is its memory&#8212;a constantly updated snapshot of every buy and sell order for each traded security.</p><blockquote><p>Traditional databases are far too slow for this task. Instead, HFT systems maintain these <strong>order books</strong> entirely in RAM, using specialized data structures optimized for microsecond updates. </p></blockquote><p>When a new bid comes in at $9.98, the system doesn't just add it to a list&#8212;it must immediately recalculate the best bid price, update depth calculations, and trigger any dependent algorithms.</p><p>The engineering challenge is immense. Consider that Apple's stock might receive thousands of order updates per second. Each update must be processed in sequence, maintaining perfect accuracy while updating derived calculations like volume-weighted average prices or liquidity imbalances. A single race condition or lock contention could introduce millisecond delays that render the entire system uncompetitive.</p><p>Most HFT firms solve this through replication&#8212;maintaining multiple synchronized copies of each order book across different CPU cores or even different servers. If one replica falls behind or encounters an error, the system can instantly fail over to another copy without missing a beat. It's like having multiple photographers capturing the same event from different angles, ensuring you never miss the critical moment.</p><p>But maintaining perfect order books is only the beginning. The real challenge is deciding what to do with this information&#8212;and doing it fast enough to matter.</p><div><hr></div><h2><strong>The Decision Engine: Algorithms That Think in Nanoseconds</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jx3a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jx3a!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 424w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 848w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 1272w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jx3a!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif" width="1456" height="459" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:459,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jx3a!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 424w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 848w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 1272w, https://substackcdn.com/image/fetch/$s_!Jx3a!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6376b66b-9bf8-46a7-aeae-21d75f9cf654_1600x504.gif 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>Here's where HFT systems become truly fascinating from an engineering perspective. The strategies these systems run aren't just faster versions of human trading decisions&#8212;they're fundamentally different approaches that exploit the physics of electronic markets.</p><p>Take latency arbitrage, for example. When the price of Apple stock changes on NASDAQ, it takes time for that information to propagate to other exchanges. We're talking about microseconds, but in HFT terms, that's an eternity. Systems that can detect these price discrepancies and execute trades on slower exchanges before the price updates can earn risk-free profits.</p><div class="pullquote"><p>The algorithms running these strategies operate under constraints that would make most software developers nervous.</p></div><p> Every calculation must be deterministic and blazingly fast. Many firms use lookup tables instead of mathematical calculations, trading memory for computational speed. Where traditional software might calculate an optimal bid price using complex formulas, HFT systems often pre-compute thousands of scenarios and simply look up the answer.</p><p>But even software has its limits. For the most time-critical decisions, many HFT firms turn to hardware acceleration through FPGAs&#8212;Field-Programmable Gate Arrays that can execute custom logic at nearly the speed of light.</p><div><hr></div><h2><strong>Hardware Acceleration: When Software Isn't Fast Enough</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vjXa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vjXa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 424w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 848w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 1272w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vjXa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png" width="1534" height="302" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:302,&quot;width&quot;:1534,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:166351,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vjXa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 424w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 848w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 1272w, https://substackcdn.com/image/fetch/$s_!vjXa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5add68-91db-426d-b6b5-f84f64255d4e_1534x302.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><blockquote><p>FPGAs represent the bleeding edge of HFT technology&#8212;custom silicon programmed to execute specific trading logic faster than any general-purpose processor ever could. </p></blockquote><p>When market data arrives at an FPGA, there's no operating system overhead, no software stack, no uncertain execution time. The logic is literally wired into the hardware.</p><p>The concept is called "tick-to-trade"&#8212;the time from receiving a market data update to sending a trading order. While software-based systems might achieve tick-to-trade times of 10-50 microseconds, FPGA-based systems can respond in under a microsecond. That's faster than sound travels one foot through air.</p><p>Programming FPGAs requires a completely different mindset from traditional software development. Instead of writing sequential instructions, developers describe parallel logic circuits using hardware description languages like Verilog. Every operation must be precisely timed, and the entire data path must be optimized for the worst-case scenario.</p><p>The trade-off is flexibility. Software strategies can be updated with a simple deployment; FPGA changes require recompiling and reflashing the hardware, a process that can take hours. Many HFT firms use a hybrid approach&#8212;FPGAs for the most time-critical decisions, with software systems handling more complex strategies that can tolerate additional latency.</p><p>But speed without safety is reckless. Even microsecond trading decisions must pass through sophisticated risk management systems.</p><div><hr></div><h2><strong>Risk Management: The Safety Net for Lightning-Fast Decisions</strong></h2><p>The same speed that makes HFT profitable also makes it potentially catastrophic. A malfunctioning algorithm could lose millions of dollars in seconds, as demonstrated by events like the 2012 Knight Capital incident, where a software glitch resulted in $440 million in losses in just 45 minutes.</p><p>This is why every HFT system includes pre-trade risk checks that operate almost as fast as the trading logic itself. These systems monitor position limits, order sizes, correlation exposures, and dozens of other risk metrics in real-time. If any parameter exceeds preset thresholds, the risk engine can instantly block orders or even shut down entire strategies.</p><p>The challenge is implementing these checks without introducing significant latency. Traditional risk management systems might query databases or perform complex calculations, but HFT risk engines must operate in microseconds. Many use in-memory position tracking and pre-computed risk scenarios, similar to the optimization techniques used in the trading algorithms themselves.</p><p>Smart order routing adds another layer of complexity. When an algorithm decides to buy 1,000 shares of Apple, the system must choose which exchange to target, what order type to use, and how to split large orders across multiple venues. The routing decision might consider current liquidity, historical fill rates, exchange fee structures, and the likelihood of adverse selection&#8212;all evaluated in real-time.</p><div><hr></div><h2><strong>The Complete System: Orchestrating Microsecond Precision</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zF9I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zF9I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 424w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 848w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 1272w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zF9I!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png" width="1200" height="458.24175824175825" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:556,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:4467650,&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://blog.bytemonk.io/i/168525500?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zF9I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 424w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 848w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.png 1272w, https://substackcdn.com/image/fetch/$s_!zF9I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F809c3554-4fbe-4ac9-8f9b-222a0909098e_15550x5935.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>Putting it all together, a modern HFT system resembles a Formula 1 car more than a traditional computer application. Every component is optimized for performance, with elaborate monitoring systems tracking latency at every stage of the pipeline.</p><p>The market data flows from exchange feeds through ultra-low-latency NICs into custom feed handlers. The order books update in real-time across replicated in-memory data structures. Event-driven pipelines carry market updates to strategy engines and FPGAs, where algorithms evaluate opportunities and generate orders. Smart order routers select optimal execution venues while risk engines validate every decision.</p><p>Throughout this entire pipeline, nanosecond-precision clocks timestamp every event, allowing firms to measure and optimize performance with extraordinary precision. They track not just average latency, but 99th percentile delays, worst-case jitter, and the timing of every individual component.</p><p>The monitoring systems are equally sophisticated. Real-time dashboards track system health, strategy performance, and market conditions. Alerts trigger if any component shows signs of degradation, and automated failover systems can redirect traffic within microseconds. It's like having a pit crew for software, constantly monitoring and optimizing performance.</p><div><hr></div><h2><strong>The Broader Implications: Technology Pushing Financial Evolution</strong></h2><p>HFT systems represent more than just fast computers&#8212;they're a window into how technology transforms entire industries. The same techniques developed for microsecond trading are now being applied to other low-latency challenges: high-frequency data analytics, real-time fraud detection, and automated industrial control systems.</p><p>The engineering lessons are profound. When every microsecond matters, you can't rely on traditional software development approaches. You must think about cache behavior, memory allocation patterns, and CPU instruction pipelines. You design for the worst case, not the average case. You measure everything and optimize relentlessly.</p><blockquote><p>These systems also raise important questions about market structure and fairness. </p></blockquote><p>When trading decisions happen faster than human perception, traditional concepts of market participation and price discovery evolve. Regulators struggle to monitor markets that move at machine speed, while exchanges invest billions in technology to keep pace with their most demanding customers.</p><p>Yet for all their complexity, HFT systems ultimately serve a simple economic function: they provide liquidity and help prices adjust to new information more quickly. In doing so, they've made markets more efficient, even as they've made them more complex to understand.</p><h2><strong>Looking Forward: The Race Continues</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u1UN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u1UN!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 424w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 848w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 1272w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u1UN!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif" width="1456" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!u1UN!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 424w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 848w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 1272w, https://substackcdn.com/image/fetch/$s_!u1UN!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0454e6ae-fae1-44f9-8eb5-365500956111_1600x545.gif 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>The technology arms race in HFT shows no signs of slowing. Firms are experimenting with quantum computing for certain types of optimization problems. Others are exploring direct connections to satellite networks to shave microseconds off transcontinental communication. Some are even investigating whether neutrino beams could carry trading signals through the Earth faster than fiber optic cables can carry them around its surface.</p><p>What's certain is that this industry will continue pushing the boundaries of what's technically possible. Every breakthrough in low-latency computing, network optimization, or hardware acceleration finds eager adoption in HFT systems. These firms aren't just trading securities&#8212;they're trading time itself, and they're willing to invest extraordinary resources to buy nanoseconds of advantage.</p><blockquote><p>For technologists outside finance, HFT systems offer lessons in extreme performance optimization and real-time system design. </p></blockquote><p>The next time you buy or sell a stock, remember that your order enters a world where computers make thousands of decisions in the time it takes you to move your finger. It's a world built on the marriage of advanced mathematics, cutting-edge engineering, and the eternal human desire to be first.</p>]]></content:encoded></item><item><title><![CDATA[The Scale Cube]]></title><description><![CDATA[A Thoughtful Approach to Application Scaling]]></description><link>https://blog.bytemonk.io/p/the-scale-cube</link><guid isPermaLink="false">https://blog.bytemonk.io/p/the-scale-cube</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Sat, 05 Jul 2025 20:00:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Dlxd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif" 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_!Dlxd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dlxd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 424w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 848w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 1272w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dlxd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif" width="728" height="355" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:710,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3784973,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/167603390?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Dlxd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 424w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 848w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 1272w, https://substackcdn.com/image/fetch/$s_!Dlxd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1baa41bc-d23f-45d4-9368-72cb30dfd9ac_1920x936.gif 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><blockquote><p>Scaling isn&#8217;t just about throwing more machines at a problem. It&#8217;s about architectural thinking.</p></blockquote><p>The Scale Cube emerged from "The Art of Scalability" as a deceptively simple yet profoundly useful model for thinking about application scaling. Rather than approaching scalability as a chaotic collection of techniques and technologies, the Scale Cube provides a structured way to understand your options across three distinct dimensions.</p><p>What makes the Scale Cube particularly valuable is its recognition that scalability isn't a single problem with a single solution. Instead, it acknowledges that different types of growth create different types of pressure on your system, and these different pressures require different approaches. The model organizes these approaches into three axes: X, Y, and Z, each representing a fundamentally different strategy for handling increased load.</p><p>Whether you're building distributed systems, designing microservices, or preparing for a system design interview, the Scale Cube gives you a powerful mental model to navigate the complexity of scaling.</p><p>Let&#8217;s unpack it.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_wfP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_wfP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 424w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 848w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 1272w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_wfP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif" width="1456" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2858788,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/167603390?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_wfP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 424w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 848w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 1272w, https://substackcdn.com/image/fetch/$s_!_wfP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc0c3290-696d-4611-bb32-e9d82875f8ae_1525x652.gif 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><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><strong>The X-Axis: When More is Simply More</strong></h2><p>Let's start with the most intuitive dimension&#8212;the <strong>X-axis</strong>. This represents what most developers first reach for when their application starts struggling: horizontal scaling through replication. The concept is beautifully straightforward: if one server can handle 1,000 users, then two identical servers should handle 2,000 users, and ten servers should handle 10,000 users.</p><p>X-axis scaling involves running multiple identical instances of your application, typically behind a load balancer that distributes incoming requests across these instances. The load balancer acts as a traffic director, ensuring that no single instance becomes overwhelmed while others sit idle. This approach works because it transforms a single point of failure and bottleneck into a distributed system where the failure of any individual component doesn't bring down the entire service.</p><p>Consider a typical web application serving an e-commerce site. During normal business hours, a single server might comfortably handle the load. But during a flash sale or holiday shopping period, that same server becomes completely overwhelmed. By deploying multiple identical instances behind a load balancer, you can absorb those traffic spikes without degrading the user experience.</p><p>The beauty of X-axis scaling lies in its simplicity and broad applicability. It doesn't require you to fundamentally rethink your architecture or decompose your application into smaller pieces. You're essentially creating photocopies of your existing system and distributing the workload among them. This makes it an excellent first step for many scaling challenges, particularly for stateless applications where each request can be handled independently.</p><p>However, X-axis scaling has its limitations. While it can handle increased traffic, it doesn't address other types of scaling challenges. If your database becomes the bottleneck, adding more application servers won't help. If your codebase becomes unwieldy and difficult to maintain, more instances of that unwieldy codebase won't solve the problem. X-axis scaling is powerful, but it's not a universal solution.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xrjl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xrjl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 424w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 848w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 1272w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xrjl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif" width="1456" height="481" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:481,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2444648,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/167603390?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xrjl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 424w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 848w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 1272w, https://substackcdn.com/image/fetch/$s_!xrjl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe093d846-593d-4a9a-ae3f-33c209311c0d_1518x502.gif 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><strong>The Y-Axis: Divide and Conquer</strong></h2><p>The <strong>Y-axis</strong> represents a more sophisticated approach to scaling: functional decomposition. Instead of creating identical copies of your entire application, Y-axis scaling involves breaking your application into smaller, specialized services, each responsible for a specific business function. This is the architectural pattern we now commonly call microservices.</p><p>In practical terms, your monolithic e-commerce application might be decomposed into separate services for <em><strong>user authentication, product catalog management, shopping cart functionality, order processing,</strong></em> and <em><strong>payment handling</strong></em>. Each service becomes a focused, self-contained unit with its own database, its own development team, and its own deployment schedule.</p><p>This functional decomposition offers several compelling advantages. Different services can be scaled independently based on their specific load patterns&#8212;your product catalog might need to handle thousands of read operations per second during peak browsing times, while your payment service might have a much lower but more critical transaction volume. Development teams can work on different services simultaneously without stepping on each other's toes, accelerating feature development and reducing coordination overhead.</p><p>Y-axis scaling also provides better fault isolation. When your monolithic application fails, everything fails together. When a microservice fails, it only affects its specific functionality, leaving the rest of the system operational. Your users might not be able to add items to their cart during a shopping cart service outage, but they can still browse products and view their order history.</p><p>The relationship between Y-axis scaling and microservices is more than coincidental&#8212;microservices architecture is essentially the systematic application of Y-axis scaling principles. This is why understanding the Scale Cube provides such valuable context for microservices discussions. It helps you see microservices not as a trendy architectural style, but as a specific solution to specific scaling challenges.</p><p>However, Y-axis scaling introduces its own complexity. Service boundaries must be carefully designed to minimize inter-service communication. You need to solve problems like distributed transactions, service discovery, and network partitions. The operational complexity of managing many small services can be significantly higher than managing a single large application, especially for smaller teams.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pZaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pZaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 424w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 848w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 1272w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pZaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif" width="1427" height="502" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:502,&quot;width&quot;:1427,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2492089,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/167603390?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pZaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 424w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 848w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 1272w, https://substackcdn.com/image/fetch/$s_!pZaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F398d6b48-2aa1-4fc9-bd48-2e8c5c18eeb0_1427x502.gif 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><h2><strong>The Z-Axis: Splitting by Data</strong></h2><p>The <strong>Z-axis</strong> represents perhaps the most sophisticated scaling approach: data partitioning or sharding. While X-axis scaling distributes identical requests across identical instances, and Y-axis scaling distributes different functions across specialized services, Z-axis scaling distributes different subsets of data across different instances.</p><p>Z-axis scaling recognizes that not all data is created equal. Some users generate more load than others, some geographic regions have different usage patterns, and some customers have different performance requirements. Rather than treating all data identically, Z-axis scaling routes requests to different instances based on attributes of the data or the request itself.</p><p>Consider a social media platform with millions of users. A naive approach might be to replicate the entire user database across multiple servers (X-axis scaling). But this becomes increasingly expensive and complex as the database grows. Z-axis scaling offers a more elegant solution: partition users by geographic region, user ID ranges, or account type. European users might be served by servers physically located in Europe, while American users are served by servers in the United States. Premium users might be served by high-performance instances, while free users are served by more modest infrastructure.</p><p>The routing logic for Z-axis scaling typically lives in a layer above the application instances&#8212;a smart load balancer or routing service that examines incoming requests and directs them to the appropriate partition. This router becomes a critical component of your architecture, as it must understand the partitioning scheme and route requests correctly.</p><p>Z-axis scaling offers several powerful advantages. It can significantly improve performance by ensuring that data is physically closer to users and that high-value customers get dedicated resources. It also enables you to tailor your infrastructure to different usage patterns&#8212;you might use different database configurations for analytical workloads versus transactional workloads, or different security configurations for different customer tiers.</p><p>However, Z-axis scaling introduces significant complexity. The partitioning scheme must be carefully designed to avoid hotspots where some partitions become overloaded while others remain underutilized. Cross-partition operations become expensive and complex&#8212;imagine trying to generate a report that requires data from multiple geographic regions or customer tiers. The routing logic must be highly available and performant, as it becomes a critical path for all requests.</p><div><hr></div><h2><strong>Why This Matters for System Design</strong></h2><p>For those preparing for system design interviews, the Scale Cube provides a structured vocabulary for discussing scalability trade-offs. Instead of jumping immediately to specific technologies, you can use the Scale Cube to demonstrate systematic thinking about the problem space.</p><p>When asked to design a system that can handle millions of users, you can walk through each axis of the Scale Cube, explaining when and why you might apply each approach. This shows that you understand not just the mechanics of scaling, but the strategic thinking that goes into choosing the right scaling approach for the right situation.</p><blockquote><p>The Scale Cube also helps you avoid the trap of over-engineering solutions. </p></blockquote><p>Not every application needs microservices (Y-axis scaling). Not every system needs complex data partitioning (Z-axis scaling). By understanding the specific problems each axis addresses, you can make more informed decisions about when the complexity of advanced scaling approaches is justified.</p><div><hr></div><h2><strong>The Path Forward</strong></h2><p>The Scale Cube isn't a prescription for how to scale your application&#8212;it's a framework for thinking about scalability in a structured way. </p><blockquote><p>Your specific context, constraints, and requirements will ultimately determine which approaches make sense for your situation.</p></blockquote><p>Start by understanding where your current bottlenecks lie. Are you CPU-bound, memory-bound, or I/O-bound? Are you struggling with traffic volume, feature complexity, or data diversity? Use the Scale Cube to map these challenges to potential solutions, but remember that the simplest solution that addresses your actual constraints is usually the right one.</p><p>Most importantly, remember that scalability is a journey, not a destination. The Scale Cube provides a map for that journey, helping you navigate from where you are to where you need to be, one axis at a time.</p>]]></content:encoded></item><item><title><![CDATA[From Monoliths to Microservices]]></title><description><![CDATA[Why Modern Systems Evolved]]></description><link>https://blog.bytemonk.io/p/from-monoliths-to-microservices</link><guid isPermaLink="false">https://blog.bytemonk.io/p/from-monoliths-to-microservices</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Tue, 24 Jun 2025 16:01:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WIKR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the early days, teams wrote monoliths&#8212;applications where everything lived together in one codebase. The user interface, business logic, and database access were all bundled up tightly and deployed as a single unit. This approach made sense when your app had a few simple screens and a handful of users.</p><p>But as applications grew in complexity and user demand exploded, this &#8220;all-in-one&#8221; architecture started to crack.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WIKR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WIKR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 424w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 848w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 1272w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WIKR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif" width="1350" height="749" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:749,&quot;width&quot;:1350,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1762671,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WIKR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 424w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 848w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 1272w, https://substackcdn.com/image/fetch/$s_!WIKR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eaec7b-9c11-41d1-aa49-da62d4d59fa5_1350x749.gif 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><strong>Why Monoliths Struggled to Keep Up</strong></h2><p>A monolith can feel like a massive tangle of wires&#8212;pull one, and five others move. Making a small change becomes risky, testing gets slower, and deployment becomes a coordination nightmare. The entire system has to be tested and released together, even if you only modified one feature.</p><p>It also becomes harder to scale. Let&#8217;s say your app has a search feature that&#8217;s heavily used. In a monolith, you can&#8217;t scale just the search functionality&#8212;you have to scale the entire application, even parts that don&#8217;t need the extra horsepower. That&#8217;s expensive and inefficient.</p><p>Worse, when one part fails, it often brings the whole system down with it.</p><div><hr></div><h2><strong>Moving One Step Forward: Layered Architecture</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SkHV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SkHV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 424w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 848w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 1272w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SkHV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif" width="568" height="332.5817633760362" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:777,&quot;width&quot;:1327,&quot;resizeWidth&quot;:568,&quot;bytes&quot;:2663550,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SkHV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 424w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 848w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 1272w, https://substackcdn.com/image/fetch/$s_!SkHV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F397ac913-2cbb-46be-a92d-93db991d2688_1327x777.gif 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>To tackle some of these pain points, the software industry introduced layered&#8212;or multi-tier&#8212;architecture. The idea was to separate concerns: one layer for handling user interfaces, another for processing business logic, and a third for storing and retrieving data.</p><p>This helped organize code and streamline development. Teams could now focus on one layer at a time. But here's the catch&#8212;these layers were still part of one large application. If the logic layer needed an update, you often had to redeploy the whole system. Fundamentally, the application was still packaged and deployed as a single unit. The deployment pains, scalability limits, and tight coupling remained.</p><div><hr></div><h2><strong>Rethinking the Architecture: Enter Microservices</strong></h2><p>As organizations like Amazon, Netflix, and Google hit massive scale, they realized the monolithic approach couldn&#8217;t sustain them. They needed something more modular, something that let teams move faster without stepping on each other&#8217;s toes.</p><p>That&#8217;s when microservices began to emerge&#8212;not just as a technical shift, but a cultural one.</p><blockquote><p>At a high level, <strong>microservices are small, independently deployable services</strong>, each responsible for a specific business function. Think of them like Lego blocks&#8212;individually useful, but powerful when snapped together.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cJwS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cJwS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 424w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 848w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 1272w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cJwS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png" width="405" height="672.9139072847682" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2258,&quot;width&quot;:1359,&quot;resizeWidth&quot;:405,&quot;bytes&quot;:255265,&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://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.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_!cJwS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 424w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 848w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.png 1272w, https://substackcdn.com/image/fetch/$s_!cJwS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a58c513-c86c-4412-9e85-f119c908f52f_1359x2258.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>Take order processing as an example. When a customer places an order, it might trigger a series of services, each doing its own job:</p><ul><li><p>The <strong>Inventory Service</strong> checks whether the requested item is in stock.</p></li><li><p>The <strong>Discount Service</strong> applies any eligible offers or coupons.</p></li><li><p>The <strong>Payment Service</strong> processes the transaction securely.</p></li><li><p>The <strong>Notification Service</strong> sends a confirmation email or SMS to the customer.</p></li></ul><p>Each of these services runs independently, owns its own database, and exposes its own API. They're loosely coupled but tightly focused&#8212;just like a team where everyone knows their role. And together, they form the full experience of placing an order, without any single service becoming a bottleneck.</p><p>You don&#8217;t have one big codebase anymore&#8212;you have many smaller ones, loosely connected.</p><div><hr></div><h2><strong>Why Microservices Took Off</strong></h2><p>The real strength of microservices lies in how each service operates independently. Teams can build, test, and deploy their services in isolation, without stepping on each other&#8217;s toes. If your Inventory system is under pressure during a sale, scale just that service. If the Notification system crashes, the rest of the flow&#8212;from checking discounts to processing payments&#8212;still works.</p><p>Let&#8217;s say a user places an order. That single action might trigger multiple services behind the scenes. Each one handles its own responsibility and talks over RESTful APIs:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YjF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YjF2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 424w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 848w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 1272w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YjF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png" width="409" height="363.8824940047962" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:742,&quot;width&quot;:834,&quot;resizeWidth&quot;:409,&quot;bytes&quot;:157193,&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://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.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_!YjF2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 424w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 848w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.png 1272w, https://substackcdn.com/image/fetch/$s_!YjF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef615741-f7d1-4f90-92a5-dc8df920001c_834x742.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>Each of these calls goes to a separate service:</p><ul><li><p>InventoryService ensures the product is in stock.</p></li><li><p>DiscountService applies promotions or coupons.</p></li><li><p>PaymentService handles the transaction securely.</p></li><li><p>NotificationService sends confirmation to the customer.</p></li></ul><p>Because these services are loosely coupled, they can be scaled, updated, or replaced independently. Teams move faster. The system becomes more resilient. And most importantly, you avoid the fragile ripple effects of tightly-bound monolithic code.</p><p>In short, microservices don&#8217;t just divide your system&#8212;they decouple your risk, and this unlocked a whole new level of agility and resilience in software systems.</p><div><hr></div><h2><strong>The Hidden Complexity of Microservices</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K7p9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K7p9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 424w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 848w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 1272w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K7p9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png" width="1456" height="613" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:613,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:713937,&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://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.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_!K7p9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 424w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 848w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.png 1272w, https://substackcdn.com/image/fetch/$s_!K7p9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fdc07a3-d33a-4931-ac79-0fc2dbe45b1f_5919x2493.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>While microservices offer flexibility and scalability, they also introduce a new layer of operational overhead. With monoliths, you deal with a single codebase and a shared database. But in a microservices world, you're suddenly managing dozens&#8212;if not hundreds&#8212;of independently deployed services, each with its own code, database, and lifecycle.</p><p>This shift brings real challenges. Logging and debugging become more fragmented. A simple request might touch five services, and if something fails along the way, pinpointing the issue is no longer straightforward. Deployment, once a single pipeline, now becomes a web of interconnected CI/CD workflows. Service coordination&#8212;what talks to what, and how&#8212;needs careful planning.</p><p>This complexity demanded a new generation of tooling&#8212;and thankfully, the ecosystem stepped up.</p><div><hr></div><h2><strong>The Tools That Make Microservices Work</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XfNr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XfNr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 424w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 848w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 1272w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XfNr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png" width="1392" height="1088" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1088,&quot;width&quot;:1392,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:148836,&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://blog.bytemonk.io/i/166691135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.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_!XfNr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 424w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 848w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.png 1272w, https://substackcdn.com/image/fetch/$s_!XfNr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ce8e6c8-bd03-4109-b34a-d179ab81395e_1392x1088.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>Managing a microservices-based system today requires more than just good intentions. It needs the right tools and automation to keep everything running smoothly:</p><ul><li><p><strong>Containers (Docker)</strong> make it easy to package services into portable, isolated units that run reliably across environments.</p></li><li><p><strong>Container orchestration tools like Kubernetes</strong> help automate deployment, scaling, and failover, so you're not manually managing service instances.</p></li><li><p><strong>CI/CD pipelines</strong> streamline the development workflow, enabling fast, frequent, and safe deployments across services.</p></li><li><p><strong>Message brokers</strong> such as Kafka and RabbitMQ support asynchronous communication, reducing tight coupling between services and improving resilience.</p></li></ul><p>When these tools are in place and well-integrated, microservices can feel surprisingly nimble. Teams can deploy independently, recover quickly from failures, and scale only what&#8217;s necessary.</p><p>But none of this comes for free. Microservices offer freedom&#8212;but they demand discipline.</p><div><hr></div><h2><strong>Should You Break the Monolith?</strong></h2><p>Not always. If you're building a simple app&#8212;say, a local restaurant reservation system&#8212;it&#8217;s probably better to start with a monolith. You can move fast without worrying about network overhead or deployment pipelines. A monolith is easier to reason about when you&#8217;re a small team solving a straightforward problem.</p><p>But as your system grows, the signs will start to show: long deployment times, growing coordination costs, difficulty in scaling parts of the system independently. That&#8217;s usually the moment to consider a transition to microservices&#8212;not before.</p><p>Imagine that restaurant app expanding to 50 locations, introducing loyalty programs, online orders, and inventory tracking across kitchens. Now you have multiple teams, different business functions, and peaks in user traffic. At this point, microservices aren&#8217;t just helpful&#8212;they&#8217;re necessary.</p><div><hr></div><h2><strong>Final Thoughts</strong></h2><p>Monoliths got us started, but microservices help us scale. They enable faster iteration, team autonomy, and targeted scaling. But they also demand discipline, observability, and the right tooling.</p><p>Don&#8217;t fall for the hype blindly. Instead, evaluate your system&#8217;s needs, your team&#8217;s maturity, and the complexity of your business. The right architecture is the one that helps you move fast without breaking things.</p><p>I'll be diving deeper into individual microservices patterns&#8212;like Saga, Circuit Breaker, API Gateway, and more&#8212;in upcoming blog posts. If you're curious about how to design robust and scalable systems, stay tuned.</p>]]></content:encoded></item><item><title><![CDATA[API Gateways Demystified]]></title><description><![CDATA[The One Layer That Powers Resilient Systems]]></description><link>https://blog.bytemonk.io/p/api-gateway-architectures-command</link><guid isPermaLink="false">https://blog.bytemonk.io/p/api-gateway-architectures-command</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Tue, 17 Jun 2025 23:19:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Do47!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In a microservices architecture, exposing services via external APIs is essential. But direct interaction between clients and services often leads to complexity, latency, and tight coupling. That&#8217;s where the API Gateway Pattern becomes critical &#8212; acting as a unified entry point that abstracts internal service boundaries while offering performance and security benefits.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Do47!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Do47!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!Do47!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!Do47!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!Do47!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Do47!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif" width="868" height="488.25" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:868,&quot;bytes&quot;:2275463,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/165036492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Do47!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!Do47!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!Do47!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!Do47!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif 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><strong>The Problem with Direct Client-Service Interaction</strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XTwg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XTwg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 424w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 848w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 1272w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XTwg!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png" width="728" height="410.4802942722018" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1073,&quot;width&quot;:1903,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:211441,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://blog.bytemonk.io/i/165036492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f30d473-972b-41ac-9711-dde914f3650a_1920x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XTwg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 424w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 848w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 1272w, https://substackcdn.com/image/fetch/$s_!XTwg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec12a5a7-17d5-407f-a19b-c917c9cf7dd7_1903x1073.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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><blockquote><p><em>This diagram above shows exactly how one mobile request gets split across microservices &#8212; all hidden neatly behind the gateway</em></p></blockquote><p>Let&#8217;s say your mobile app needs to show a detailed product page. Without an API Gateway, it would have to make 4 separate calls: one to the Products Service for item info, another to Inventory for stock levels, another to Cart for saved items, and yet another to Orders for purchase history.</p><p>That&#8217;s a lot of <em>round-trips, error handling, and logic baked into the client. increasing latency and degrading user experience</em>. The client also becomes tightly coupled to the internal service architecture &#8212; it needs to know which services to call, how to call them, and how to handle their responses.</p><p>Any change in the backend, such as merging or splitting services, risks breaking the client. Protocol mismatches can also creep in. Your backend might use gRPC or event-driven messaging internally, but clients typically expect standard HTTP/JSON interfaces. </p><blockquote><p><em>Exposing internal protocols externally introduces unnecessary complexity and security risks.</em></p></blockquote><p>Instead, with an API Gateway, when a client makes a single API request&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R9ua!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R9ua!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 424w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 848w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 1272w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R9ua!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png" width="1549" height="180" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:180,&quot;width&quot;:1549,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85460,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R9ua!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 424w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 848w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 1272w, https://substackcdn.com/image/fetch/$s_!R9ua!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23da9655-5c29-41e1-bb24-8f838d831ccc_1549x180.png 1456w" sizes="100vw" loading="lazy"></picture><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_!7Jd1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Jd1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 424w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 848w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 1272w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Jd1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png" width="1920" height="1059" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1059,&quot;width&quot;:1920,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241222,&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://blog.bytemonk.io/i/165036492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F518cbb61-cd67-4dff-8b46-6f30a4965efd_1920x1080.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_!7Jd1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 424w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 848w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.png 1272w, https://substackcdn.com/image/fetch/$s_!7Jd1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dee47a1-b965-43aa-bad3-20acb6cca7c5_1920x1059.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>The gateway first fans out the request to multiple backend services. Each service is queried independently to fetch its respective data. Once the data is returned, the gateway aggregates the responses&#8212;combining them into a single, unified structure. Finally, the aggregated result is returned to the client as one consistent response. This process hides backend complexity, it keeps the client lean and the backend flexible. If your internal services evolve, your frontend doesn&#8217;t break &#8212; the gateway shields it from the chaos.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q90N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q90N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 424w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 848w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 1272w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q90N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png" width="1920" height="852" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:852,&quot;width&quot;:1920,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:238494,&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://blog.bytemonk.io/i/165036492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e0b631d-7dee-41bc-b187-f48d4a87ae54_1920x1080.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_!Q90N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 424w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 848w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.png 1272w, https://substackcdn.com/image/fetch/$s_!Q90N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d878654-1d67-477f-ade0-8ec8b5c9c180_1920x852.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>As microservices architectures scale, managing how clients interact with services becomes increasingly complex. An API Gateway addresses this by providing a single, unified entry point that centralizes control and reduces friction between frontend and backend layers.</p><p>Here&#8217;s how its core features help:</p><ol><li><p><strong>Request Routing</strong> ensures that incoming calls are directed to the right service without exposing internal service URLs or structure.</p></li><li><p><strong>Protocol Mediation</strong> bridges the gap between different communication standards&#8212;allowing, for example, clients to use HTTP while services run on gRPC or AMQP.</p></li><li><p><strong>Payload Transformation </strong>allows clients and services to communicate using different data formats, reducing tight coupling and simplifying client code.</p></li><li><p><strong>Security and Access Control</strong> protects the backend by enforcing authentication, authorization, rate limiting, and IP filtering at the edge.</p></li><li><p><strong>Rate Limiting</strong> prevents abuse by restricting how frequently a client can call an API within a given time window. This protects backend services from overload, mitigates DDoS risks, and ensures fair usage across consumers.</p></li><li><p><strong>Caching</strong> improves performance by serving frequent responses directly from the gateway, reducing load on backend services.</p></li><li><p><strong>Monitoring and Observability</strong> enable teams to track usage, debug failures, and optimize performance through centralized metrics and logging.</p></li><li><p><strong>Response Aggregation</strong> minimizes the number of client calls by combining data from multiple services into one optimized response.</p></li></ol><p>Together, these capabilities make the API Gateway not just a convenience, but a foundational component for operating microservices securely, efficiently, and at SCALE.</p><div><hr></div><h2><strong>Implementation Approaches</strong></h2><p>Once you&#8217;ve decided to implement an API Gateway, the next step is choosing how to build it. The right approach depends on your team&#8217;s priorities&#8212;speed, control, scalability, or flexibility. Below is a comparison of common implementation strategies, including managed solutions, framework-based gateways, and GraphQL-based gateways:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gzif!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gzif!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 424w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 848w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 1272w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gzif!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png" width="1920" height="998" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:998,&quot;width&quot;:1920,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:709219,&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://blog.bytemonk.io/i/165036492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6faf297e-9bb4-46df-acfc-3a27d949610a_1920x1080.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_!Gzif!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 424w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 848w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.png 1272w, https://substackcdn.com/image/fetch/$s_!Gzif!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e8a06f-f7f7-44a4-a5e2-8906889344d7_1920x998.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><hr></div><h2><strong>Trade-offs</strong></h2><p>API Gateways offer many benefits, but they also introduce complexity and risk:</p><ul><li><p><strong>Single Point of Failure:</strong> By definition, all requests go through the gateway. If it goes down, <em>all</em> your APIs become unreachable, even if the backend services themselves are healthy. You must architect the gateway for high availability (e.g. multiple instances, failover). <br></p></li><li><p><strong>Added Latency:</strong> Every request has an extra hop. The gateway parses, enforces policies, and potentially waits for multiple services. This adds a bit of network and processing latency. Depending on your implementation, it might be minor or noticeable. <br></p></li><li><p><strong>Operational Complexity:</strong> The gateway configuration can become complex as you support more services and clients. Mistakes in routing or policies can break many APIs at once. You need good tests and monitoring on the gateway itself.<br></p></li><li><p><strong>Vendor Lock-In:</strong> Using a cloud-managed gateway can tie you to that ecosystem. Migrating to a different gateway solution later may require significant rework of your API definitions and policies.<br></p></li><li><p><strong>Scope Creep:</strong> There&#8217;s a temptation to cram too much logic into the gateway. Avoid making it a catch-all for business logic; it should mostly handle cross-cutting concerns.<br></p></li></ul><blockquote><p><em>The API Gateway is powerful, but it&#8217;s not a silver bullet. In small systems, it might be overkill. For very high-performance needs, the extra latency or cost might not justify the benefits. Always weigh the trade-offs for your project.</em></p></blockquote><div><hr></div><h2><strong>Conclusion</strong></h2><p>The API Gateway pattern abstracts internal service complexity, enhances performance through aggregation and caching, and centralizes control over external access.</p><p>When implemented effectively, it decouples frontend and backend teams, accelerates development, and hardens your architecture against change. Whether you&#8217;re serving mobile clients, partner APIs, or internal tools, the gateway becomes your architecture&#8217;s trusted front door.</p><p>In a distributed world, clarity matters &#8212; and the API Gateway helps keep the chaos on the inside.</p>]]></content:encoded></item><item><title><![CDATA[🚀 My First ByteMonk Post Is Live: API Gateways, Demystified]]></title><description><![CDATA[Hey everyone &#8212;]]></description><link>https://blog.bytemonk.io/p/my-first-bytemonk-post-is-live-api</link><guid isPermaLink="false">https://blog.bytemonk.io/p/my-first-bytemonk-post-is-live-api</guid><dc:creator><![CDATA[Himalay]]></dc:creator><pubDate>Tue, 17 Jun 2025 17:43:16 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faecc17d3-7369-4947-a58d-bc1a527e2007_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey everyone &#8212;</p><p>I just published the very first post on ByteMonk! &#127881;<br>It&#8217;s a deep dive into <strong>API Gateways</strong> &#8212; the one layer that holds microservices together while keeping them resilient, secure, and cleanly abstracted.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;57c75978-cd04-4e66-a19e-497f210d39fe&quot;,&quot;caption&quot;:&quot;In a microservices architecture, exposing services via external APIs is essential. But direct interaction between clients and services often leads to complexity, latency, and tight coupling. That&#8217;s where the API Gateway Pattern becomes critical &#8212; acting as a unified entry point that abstracts internal service boundaries while offering performance and se&#8230;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;API Gateways Demystified&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:109522387,&quot;name&quot;:&quot;Himalay&quot;,&quot;bio&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f5cb01e-f9a7-4ac5-aac6-ef6609d0ced0_707x707.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-06-17T23:19:00.000Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73763a27-ac41-4a94-96aa-42a7fc1fa947_1920x1080.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.bytemonk.io/p/api-gateway-architectures-command&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:165036492,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:2,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;ByteMonk&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faecc17d3-7369-4947-a58d-bc1a527e2007_500x500.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>If you enjoy it, I&#8217;d love your support:</p><ul><li><p>&#10084;&#65039; Tap the &#8220;heart&#8221; on the post</p></li><li><p>&#128172; Leave a comment with your thoughts or questions</p></li><li><p>&#128228; Share it with a friend or teammate who&#8217;s into system design</p></li></ul><p>Your early support means a lot &#8212; it helps more engineers discover this newsletter and keeps me fired up to write more. &#128293;</p><p>Thank you for being here at the start.<br>More coming soon.</p><p>&#8212; Himalay<br><em>ByteMonk</em></p><p></p>]]></content:encoded></item></channel></rss>