<?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[OpsBR Magazine]]></title><description><![CDATA[A newsletter about "Operational Excellence" of software systems from Operations Bar Raiser a.k.a. OpsBR.]]></description><link>https://magazine.opsbr.com</link><image><url>https://substackcdn.com/image/fetch/$s_!4mo_!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png</url><title>OpsBR Magazine</title><link>https://magazine.opsbr.com</link></image><generator>Substack</generator><lastBuildDate>Sun, 19 Apr 2026 01:09:30 GMT</lastBuildDate><atom:link href="https://magazine.opsbr.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[OpsBR Software Technology Inc.]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[opsbr@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[opsbr@substack.com]]></itunes:email><itunes:name><![CDATA[Ryosuke Iwanaga]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ryosuke Iwanaga]]></itunes:author><googleplay:owner><![CDATA[opsbr@substack.com]]></googleplay:owner><googleplay:email><![CDATA[opsbr@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ryosuke Iwanaga]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Large scale distributed systems patterns]]></title><description><![CDATA[Although I shifted my job role to the AI engineering, I still have passion about the distributed systems.]]></description><link>https://magazine.opsbr.com/p/large-scale-distributed-systems-patterns</link><guid isPermaLink="false">https://magazine.opsbr.com/p/large-scale-distributed-systems-patterns</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Sat, 04 Oct 2025 04:37:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!SH5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Although I shifted my job role to the AI engineering, I still have passion about the distributed systems. Recently, I had an opportunity to talk about my experience in the large scale distributed systems in a private meetup organized by my Japanese friends in Vancouver.</p><p>Feel free to let me know if you want me to talk about this topic publicly or privately. It will take ~20 mins to talk and you&#8217;ll be able to learn a few patterns of the large scale distributed systems and their failure modes.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading OpsBR Magazine! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="directMessage button" data-attrs="{&quot;userId&quot;:128671635,&quot;userName&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/riywo/&quot;,&quot;text&quot;:&quot;Linkedin&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/riywo/"><span>Linkedin</span></a></p><div><hr></div><p>These are the slides I used but it will be difficult to understand my messages only from the slides. I&#8217;m wondering to create a YouTube video as well if this is an interesting topic for many people.</p><div class="poll-embed" data-attrs="{&quot;id&quot;:385294}" data-component-name="PollToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SH5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SH5p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 424w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 848w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 1272w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SH5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png" width="854" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6210391-5f09-4ced-9fc0-515496c4234f_854x480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:854,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:23797,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://magazine.opsbr.com/i/175249256?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.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_!SH5p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 424w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 848w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 1272w, https://substackcdn.com/image/fetch/$s_!SH5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6210391-5f09-4ced-9fc0-515496c4234f_854x480.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZFM6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZFM6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 424w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 848w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 1272w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZFM6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png" width="854" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:854,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:29617,&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://magazine.opsbr.com/i/175249256?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.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_!ZFM6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 424w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 848w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.png 1272w, https://substackcdn.com/image/fetch/$s_!ZFM6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58efc61e-f23b-478c-a3cf-b12253f1f1b2_854x480.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><a href="https://speakerdeck.com/opsbr/large-scale-distributed-systems-patterns">https://speakerdeck.com/opsbr/large-scale-distributed-systems-patterns</a></p><div><hr></div><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading OpsBR Magazine! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA["Decoding Attention" Chapter 2 - Understanding Embedding and Linear layers]]></title><description><![CDATA[I&#8217;ve launched the chapter 2 of &#8220;Decoding Attention&#8221;.]]></description><link>https://magazine.opsbr.com/p/decoding-attention-chapter-2-understanding</link><guid isPermaLink="false">https://magazine.opsbr.com/p/decoding-attention-chapter-2-understanding</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Wed, 02 Jul 2025 09:33:59 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pqve!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pqve!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pqve!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 424w, https://substackcdn.com/image/fetch/$s_!pqve!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 848w, https://substackcdn.com/image/fetch/$s_!pqve!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 1272w, https://substackcdn.com/image/fetch/$s_!pqve!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pqve!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png" width="1456" height="840" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:840,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:260718,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://magazine.opsbr.com/i/167337407?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.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_!pqve!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 424w, https://substackcdn.com/image/fetch/$s_!pqve!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 848w, https://substackcdn.com/image/fetch/$s_!pqve!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 1272w, https://substackcdn.com/image/fetch/$s_!pqve!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F655fcff1-7480-4dee-8a52-687fe44435fc_1836x1059.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I&#8217;ve launched the chapter 2 of &#8220;Decoding Attention&#8221;. In this chapter, you&#8217;ll learn about the first and last layers of Transformer - Embedding and Linear.</p><ul><li><p>Code: <a href="https://github.com/opsbr/decoding-attention">https://github.com/opsbr/decoding-attention</a></p></li><li><p>Live demo: <a href="https://decoding-attention.opsbr.dev/chapter2">https://decoding-attention.opsbr.dev/chapter2</a></p></li></ul><div><hr></div><p>The progress is good as I&#8217;ve completed my own Qwen3 implementation, thanks to <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sebastian Raschka, PhD&quot;,&quot;id&quot;:27393275,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F61f4c017-506f-4e9b-a24f-76340dad0309_800x800.jpeg&quot;,&quot;uuid&quot;:&quot;1b2f9842-cc36-4f45-b88e-a4c02c2cfff5&quot;}" data-component-name="MentionToDOM"></span>&#8217;s reference implementation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://x.com/riywo/status/1937751326949322856" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8BJN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 424w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 848w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 1272w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8BJN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png" width="488" height="689.2193832599119" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1603,&quot;width&quot;:1135,&quot;resizeWidth&quot;:488,&quot;bytes&quot;:565973,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://x.com/riywo/status/1937751326949322856&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://magazine.opsbr.com/i/167337407?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.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_!8BJN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 424w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 848w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.png 1272w, https://substackcdn.com/image/fetch/$s_!8BJN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dabb3fe-078e-4c28-8054-0668ffb85b7a_1135x1603.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><p>I&#8217;ll keep working on &#8220;Decoding Attention&#8221;. The next chapter is the neural network and I&#8217;ll explain from the basic perceptron to Qwen3&#8217;s MLP.</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/decoding-attention-chapter-2-understanding?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">If you feel &#8220;Decoding Attention&#8220; is interesting, please share this post so that I can motivate myself more :)</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/decoding-attention-chapter-2-understanding?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/decoding-attention-chapter-2-understanding?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading OpsBR Magazine! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA["Decoding Attention" Chapter 1 - A learning material of Transformer for software engineers]]></title><description><![CDATA[As I promised in the last post, I&#8217;ve started building a learning content about Transformer for software engineers who don&#8217;t have machine learning background.]]></description><link>https://magazine.opsbr.com/p/decoding-attention-chapter-1-a-learning</link><guid isPermaLink="false">https://magazine.opsbr.com/p/decoding-attention-chapter-1-a-learning</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Fri, 20 Jun 2025 07:57:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!OzYs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As I promised in the last post, I&#8217;ve started building a learning content about Transformer for software engineers who don&#8217;t have machine learning background.</p><h2>tl;dr - &#8220;Decoding Attention&#8220;</h2><p>&#8220;Decoding Attention&#8221; is the course name and I&#8217;ve published the chapter 1:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OzYs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OzYs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OzYs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg" width="728" height="517" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1034,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:null,&quot;alt&quot;:0,&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="0" srcset="https://substackcdn.com/image/fetch/$s_!OzYs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OzYs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F838e48a4-e497-40d9-9f36-3a9dfdce40ca_1460x1037.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Chapter 1: Tokenization and Sampling - Decoding Attention</figcaption></figure></div><p><em>&#8220;Attention&#8221;</em> is the core of the majority of the current AI systems and the AI architecture handling Attention very well is called <em>&#8220;Transformer&#8221;</em>. Now, <strong>Decoding Attention</strong> is intended to describe Attention/Transformer to non-ML (Machine Learning) experts so that they can start their journey to the AI-era.</p><p>The first chapter of Decoding Attention is explaining the input and output of Transformer model so that you can at least understand Transformer as a black box function for now. As a software engineer, understanding a new thing from its in/out should be the straightforward method, I believe:</p><ul><li><p>Code: <a href="https://github.com/opsbr/decoding-attention">https://github.com/opsbr/decoding-attention</a></p></li><li><p>Live demo: <a href="https://decoding-attention.opsbr.dev/chapter1">https://decoding-attention.opsbr.dev/chapter1</a></p><ul><li><p>Note: It&#8217;s running on a Raspberry Pi 5, so it might be disconnected sometime!</p></li></ul></li></ul><div><hr></div><h2>Why do I need to understand Transformer? I&#8217;m a software engineer!</h2><p>To answer this question, I&#8217;d like to introduce <a href="https://x.com/karpathy/status/1935518272667217925">Andrej Karpathy&#8217;s &#8220;Software 3.0&#8221; idea</a>.</p><h3>Software 3.0</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sQs8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sQs8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 424w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 848w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 1272w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sQs8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:942924,&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://magazine.opsbr.com/i/166313339?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.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_!sQs8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 424w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 848w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 1272w, https://substackcdn.com/image/fetch/$s_!sQs8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b43253a-8117-412b-bc59-4b9bf3a12b52_2852x1598.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Software 1.0 to 2.0, then 3.0. The diagram of Software 3.0 is actually Transformer architecture. (<a href="https://x.com/karpathy/status/1935518272667217925">Tweet</a>)</figcaption></figure></div><p>We, as a software engineer, have been working on Software 1.0 for decades and <a href="https://a16z.com/why-software-is-eating-the-world/">&#8220;Software was eating the world&#8221;</a> really. However, about 10 years ago, probably because of Deep Learning, the neural network started eating the world, like visual recognition, machine translation, etc. &#8212; <a href="https://karpathy.medium.com/software-2-0-a64152b37c35">Software 2.0</a> began. Now, for the last few years, LLMs are becoming much popular and the natural language is the hottest programing language today i.e. Software 3.0.</p><p>However, this doesn&#8217;t mean all Software 1.0 territory is taken by Software 2.0 or 3.0. <strong>Today&#8217;s best applications need all phases so that you should know all of them to build a good application today.</strong> Thankfully, you already know Software 1.0. So, you can focus on learning Software 2.0 and 3.0, then you&#8217;ll be the top talent of software engineer today.</p><h3>Transformer</h3><p>Both Software 2.0 and 3.0 are backed by neural network (that we&#8217;ll learn later in Decoding Attention), especially Transformer architecture. People who build Software 2.0 today is basically machine learning experts and that hasn&#8217;t been changed even since before Software 2.0 began because it requires careful ML training design and execution. However, these days LLM&#8217;s training is being democratized thanks to &#8220;post&#8221; training phases. Without fully training LLM from scratch, you can fine-tune the existing models (and that was the breakthrough of ChatGPT). I don&#8217;t say it&#8217;s super easy for everyone so far, but it is getting easier e.g. <a href="https://x.com/SakanaAILabs/status/1932972420522230214">Text-to-LoRA</a> is opening this by just typing natural language. That&#8217;s why I&#8217;m very interested in post training today.</p><p>Software 3.0 is already open for everyone even who doesn&#8217;t have any coding experience e.g. I really love this video &#8212; <a href="https://x.com/Thom_Wolf/status/1924399746447269963">9-13 years old kids can vibe-code</a>. However, it&#8217;s still rough, and just like you understand OS/CPU/etc. as a software (1.0) engineer, understanding the foundational system is quite useful to build sophisticated applications. Andrej called it <em>&#8220;LLM OS&#8221;</em> that I love, 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_!Ymv9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ymv9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 424w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 848w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 1272w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ymv9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png" width="1456" height="815" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:815,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:239777,&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://magazine.opsbr.com/i/166313339?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.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_!Ymv9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 424w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 848w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 1272w, https://substackcdn.com/image/fetch/$s_!Ymv9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3efc24f2-770e-4bec-a839-94d340cd8883_2850x1595.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">LLM is CPU. The information they pass is token, not bit. (<a href="https://x.com/karpathy/status/1935518272667217925">Tweet</a>)</figcaption></figure></div><p>So, going back to the original question: <em>&#8220;Why do I need to learn Transformer?&#8221;</em> <strong>My answer is because it&#8217;s core of Software 2.0 and 3.0.</strong></p><p>At least to me, who didn&#8217;t know Transformer at all 2 months ago, this understanding gives the clear picture of LLM OS and it&#8217;s the basic of understanding Software 2.0 stack (I&#8217;m learning post training now). Thus, I&#8217;d love to share the same experience to you.</p><div><hr></div><h2>What&#8217;s next?</h2><p>I&#8217;ll keep publishing the remaining chapters. The next chapter is one layer deeper &#8212; <em>&#8220;Embedding&#8221;</em>. Stay tuned!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Breaking the Black Box: A Software Developer’s Deep Dive into Transformers]]></title><description><![CDATA[I was a software developer for 15 years and have now started learning AI/LLM, but my learning path is a bit different from what a typical software developer follows.]]></description><link>https://magazine.opsbr.com/p/breaking-the-black-box-a-software</link><guid isPermaLink="false">https://magazine.opsbr.com/p/breaking-the-black-box-a-software</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Sat, 31 May 2025 05:02:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!rWln!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was a software developer for 15 years and have now started learning AI/LLM, but my learning path is a bit different from what a typical software developer follows.</p><p>As of May 2025, most software developers see AI/LLM as:</p><ul><li><p>Coding agents</p></li><li><p>HTTP APIs</p></li></ul><p>So, if they want to use AI/LLM in their traditional software development, they typically try to find the best model and the best way to utilize a coding agent. When they need to embed AI/LLM in their products, they tend to treat it as just another third-party API dependency&#8212;i.e., a black box.</p><p>However, I see AI/LLM as an emerging computing model that is poised to dominate new ideas for at least the next few years. In this post, I&#8217;d like to explain my understanding of AI/LLM and recommend several learning resources that I have used.</p><div><hr></div><h3>Why start with the foundations?</h3><p>We, as software engineers, learn about CPUs that have been dominant in computing for decades. Although most software developers today won&#8217;t build a CPU themselves, learning how a CPU works is critical because it&#8217;s the system we operate every day. That&#8217;s why many computer-science programs include a course to build a CPU from scratch!</p><p>In addition to the CPU, the OS is also important because the majority of software runs on an OS. So, software engineers learn about one or more modern OSs, including processes, memory management, system calls, etc. (One of my favorite UNIX commands is <code>strace</code>.)</p><p>Learning how compilers and interpreters work also has huge benefits for understanding how your programs run, because they ultimately become 0/1 binaries.</p><p>I learned these topics while working as an SRE, DBA, and SWE. I also <a href="https://github.com/riywo/go8086">built a CPU (8086) emulator and tried to run a MINIX binary</a> to see how the CPU and OS actually work, and I <a href="https://riywo.medium.com/llforth-experimental-implementation-of-forth-in-llvm-2298c76ec3ac">built a Forth compiler and interpreter with LLVM</a> to understand virtual machines. Of course, I&#8217;ve never worked on building a CPU, OS, or programming language/VM professionally, but knowing these low-level details helps me see what&#8217;s happening under the hood. Because all the software engineers I respect are experts in these areas, I tried to catch up, and these have been my foundational skills as a senior engineer for years.</p><div><hr></div><h3>Enter the Transformer</h3><p>When I decided to shift my career toward AI development, the first thing I wanted to understand wasn&#8217;t how to use coding agents or build AI agents. Instead, I knew it was more important to learn the foundational technology of AI so I could anticipate what&#8217;s going on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rWln!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rWln!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 424w, https://substackcdn.com/image/fetch/$s_!rWln!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 848w, https://substackcdn.com/image/fetch/$s_!rWln!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 1272w, https://substackcdn.com/image/fetch/$s_!rWln!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rWln!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png" width="494" height="571.8377535101404" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1484,&quot;width&quot;:1282,&quot;resizeWidth&quot;:494,&quot;bytes&quot;:238858,&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://magazine.opsbr.com/i/164847714?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.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_!rWln!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 424w, https://substackcdn.com/image/fetch/$s_!rWln!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 848w, https://substackcdn.com/image/fetch/$s_!rWln!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 1272w, https://substackcdn.com/image/fetch/$s_!rWln!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F977748ac-a6b4-4e91-9a44-c6dab6930b23_1282x1484.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">https://arxiv.org/abs/1706.03762</figcaption></figure></div><p>One friend mentioned the word <strong>&#8220;Transformer.&#8221;</strong> I&#8217;d never heard it at the time, but I now know the Transformer is the dominant technology in the AI world today (though that may change tomorrow).</p><p>Luckily, I had a little experience with machine learning, so I recalled some basics of neural networks and backpropagation from college 20 years ago. That tiny advantage became a bridge I want to share with software engineers learning AI/LLM today:</p><div class="poll-embed" data-attrs="{&quot;id&quot;:325219}" data-component-name="PollToDOM"></div><p>A Transformer is a special neural-network architecture that&#8217;s incredibly powerful&#8212;not only for LLMs but also for image and voice generation, among many other tasks. I originally thought an LLM was just a large stack of perceptron layers (sometimes called an MLP&#8212;Multi-Layer Perceptron). This isn&#8217;t true. The Transformer network is a purposefully designed, complex architecture. Although it contains MLP layers, its key component&#8212;the <strong>attention mechanism</strong>&#8212;is essentially a sophisticated matrix multiplication, not an MLP.</p><p>At first, I wasn&#8217;t sure what the Transformer architecture was because most online courses assumed students already knew it. Transformers are that ubiquitous today, and I felt embarrassed for not knowing about this 2017 invention sooner.</p><div><hr></div><h2>Learning resources that clicked</h2><p>To understand Transformer, I watched many online video courses. For example, this is the very passionate explanation from one of the authors of the origin of today&#8217;s AI - <a href="https://arxiv.org/abs/1706.03762">&#8220;Attention is All You Need&#8220;</a> paper: </p><div id="youtube2-rBCqOTEfxvg" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;rBCqOTEfxvg&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/rBCqOTEfxvg?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>I guess this is too hard to understand without NLP background, however. Actually, before watching the video above, I went through <a href="https://www.youtube.com/playlist?list=PLoROMvodv4rOaMFbaqxPDoLWjDaRAdP9D">Stanford CS224N</a> NLP course. I recommend the entire series, but these two lectures gave me &#8220;aha&#8221; moments:</p><ul><li><p><a href="https://www.youtube.com/watch?v=J7ruSOIzhrE&amp;list=PLoROMvodv4rOaMFbaqxPDoLWjDaRAdP9D&amp;index=8">Stanford CS224N | Spring 2024 | Lecture 7 - Attention</a></p></li><li><p><a href="https://www.youtube.com/watch?v=LWMzyfvuehA&amp;list=PLoROMvodv4rOaMFbaqxPDoLWjDaRAdP9D&amp;index=9">Stanford CS224N | Spring 2023 | Lecture 8 - Self-Attention and Transformers</a></p></li></ul><p>I also just found this video today that is well visualizing LLM in just 7 minutes. I highly recommend to start from here now:</p><div id="youtube2-LPZh9BOjkQs" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;LPZh9BOjkQs&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/LPZh9BOjkQs?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div><hr></div><p>After that, my instinct was: <em>&#8220;I want to build one.&#8221;</em> There are many prebuilt libraries and models to run Transformers in PyTorch locally, but I wanted to write the code myself. For that, <a href="https://www.youtube.com/playlist?list=PLoROMvodv4rOY23Y0BoGoBGgQ1zmU_MT_">Stanford CS336</a> was perfect. It provided the logical architecture of a Transformer plus PyTorch implementations for every component, including most popular improvements since 2017.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;86b7124f-1db8-40ac-9eb9-f44bbf5bd8d8&quot;,&quot;caption&quot;:&quot;I&#8217;m sorry I hadn&#8217;t had chances to continue the previous episodes, but recently I switched my career to AI engineer entirely: Fifteen Years of Dev, Deleted &#8212; Hello AI&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The best course to catch up LLM - Stanford CS336: Language Modeling from Scratch&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:128671635,&quot;name&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;bio&quot;:&quot;Operations Bar Raiser.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24586191-86c0-465e-b548-b5374a2f3d0a_1037x1101.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-05-18T09:21:10.814Z&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%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://magazine.opsbr.com/p/the-best-course-to-catch-up-llm-stanford&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:163836928,&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;OpsBR Magazine&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%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>A great companion blog post is <a href="https://www.stephendiehl.com/posts/post_transformers/">&#8220;Attention Wasn&#8217;t All We Needed,&#8221;</a> which lists key techniques that evolved the Transformer&#8212;CS336 covers almost all of them.</p><p>CS336 also covers hardware&#8212;specifically GPUs. Just like CPUs, GPUs are at the core of AI/LLM, so understanding GPU architecture is essential. (Flash Attention, for example, is a hardware-aware optimization of attention calculation.)</p><div><hr></div><h3>Putting it all together</h3><p>I&#8217;ll probably never build foundational LLMs myself; that work happens in huge GPU farms and belongs to LLM researchers. However, just as CPU/OS/compiler knowledge helps traditional software development, learning about GPUs, Transformers, and post-training lets me understand AI/LLM discussions.</p><p>When you build AI agents, this understanding is critical to using LLMs effectively. For instance, you won&#8217;t fully grasp why context size is limited&#8212;or how some models overcome it&#8212;until you study Transformer internals. I won&#8217;t claim to fully understand everything yet, but I can now at least imagine and research these issues.</p><p>I&#8217;ve skipped post-training here, but I believe <strong>fine-tuning</strong> is becoming a key to AI applications. It doesn&#8217;t need the massive data and hardware dictated by scaling laws, but it does require techniques beyond the Transformer itself, such as reinforcement learning (which I&#8217;m currently studying). Still, understanding GPUs and Transformers is foundational.</p><p>I hope my investment in these foundations pays off. As mentioned, I also plan to build learning content for software developers who lack machine-learning experience. Let me know if you&#8217;re interested!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/breaking-the-black-box-a-software?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/breaking-the-black-box-a-software?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[The best course to catch up LLM - Stanford CS336: Language Modeling from Scratch]]></title><description><![CDATA[I&#8217;m sorry I hadn&#8217;t had chances to continue the previous episodes, but recently I switched my career to AI engineer entirely: Fifteen Years of Dev, Deleted &#8212; Hello AI]]></description><link>https://magazine.opsbr.com/p/the-best-course-to-catch-up-llm-stanford</link><guid isPermaLink="false">https://magazine.opsbr.com/p/the-best-course-to-catch-up-llm-stanford</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Sun, 18 May 2025 09:21:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qNy3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;m sorry I hadn&#8217;t had chances to continue the previous episodes, but recently I switched my career to AI engineer entirely: <strong><a href="https://riywo.medium.com/fifteen-years-of-dev-deleted-hello-ai-1ee0aa849f8e">Fifteen Years of Dev, Deleted &#8212; Hello AI</a></strong></p><p>So, in this magazine, I&#8217;ll keep posting about AI engineering, too. Let&#8217;s start from how I&#8217;m learning about the foundation of AI.</p><div><hr></div><p>When I started to change my career to AI engineer, the biggest mysterious part for me was <strong>&#8220;What is LLM?&#8221;</strong> I knew it&#8217;s a neural network learned from the internet and it can predict the next token. But I didn&#8217;t know how it works under the hood. At that moment, I didn&#8217;t know <em>&#8220;Transformer&#8221;</em> nor <em>&#8220;Attention&#8221;</em> as my NLP knowledge wasn&#8217;t updated since Word2Vec.</p><p>Fortunately, I encountered the best online course that is actually running in this term - <strong><a href="https://stanford-cs336.github.io/spring2025/">Stanford CS336 | Language Modeling from Scratch</a>. </strong>I jumped on this course right away, keep watching the lecture videos and tackling the assignments at my own pace. Their YouTube list is <a href="https://www.youtube.com/playlist?list=PLoROMvodv4rOY23Y0BoGoBGgQ1zmU_MT_">here</a>.</p><p>This course describes LLM in details as well as provides the very handy assignments. Let me show you what I've learned from <a href="https://github.com/stanford-cs336/assignment1-basics/tree/main">the assignment 1</a>.</p><div><hr></div><p>The assignment 1 guides you to build the latest Transformer architecture from scratch, that means you don&#8217;t use PyTorch&#8217;s built-in modules but reimplement them by using only primitive functions. While it&#8217;s better to use those built-in modules for most of the cases, it&#8217;s difficult for me to understand the inside without writing the logic by myself.</p><p>I take this type of approach usually when I learn something new; I built B+Tree to understand database, Multi-Paxos to understand consensus, Forth interpreter to understand compiler and virtual machine, 8086 emulator to understand CPU. This time, <strong>I built Transformer to understand the language model.</strong></p><p>Here is the list of building blocks I built. All have unit tests, so it&#8217;s easy to verify:</p><ul><li><p>BPE (Byte-Pair Encoding) Tokenizer</p></li><li><p>Linear layer</p></li><li><p>Embedding</p></li><li><p>RMS Norm</p></li><li><p>SwiGLU</p></li><li><p>RoPE (Rotary Positional Embeddings)</p></li><li><p>Softmax</p></li><li><p>Scaled Dot-Product Attention</p></li><li><p>Causal Multi-Head Self-Attention</p></li><li><p>Transformer (decoder-only)</p></li><li><p>Cross-entropy loss</p></li><li><p>AdamW</p></li><li><p>Learning rate scheduler with warmup and cosine</p></li><li><p>Gradient clipping</p></li></ul><p>Then, I was able to train the model on M1 MacBook Pro (<code>lr</code> is the learning rate and <code>loss</code> is the training loss) with <a href="https://huggingface.co/datasets/roneneldan/TinyStories">TinyStory</a> training data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qNy3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qNy3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 424w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 848w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 1272w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qNy3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png" width="1456" height="452" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:452,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95649,&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://magazine.opsbr.com/i/163836928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.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_!qNy3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 424w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 848w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.png 1272w, https://substackcdn.com/image/fetch/$s_!qNy3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e77933a-e12d-4398-a6b6-6740068efe5e_2038x632.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 is a few token generations at the several steps during training (<em>&#8220;Once upon a time,&#8220;</em> is the prompt):</p><p><code>Time: 2025-05-17 22:45:33.400874 Step: 1, Loss: 9.251720428466797</code></p><p><code>Once upon a time, drives aisle shop heelsluffy fact brave poking suffer achieved Rich Ally Trust jugom guide greetedip suggest terrified wishesches N doctorunnies Gus magnets tipped animalsould darling green Joey dishwasherork later roadiens guyslex stays driveway ruffaredarrasschenulptureasis sadlyael&#8230;</code></p><p>Step 1 is completely at random. </p><p></p><p><code>Time: 2025-05-17 22:52:08.402544 Step: 500, Loss: 2.468946933746338</code></p><p><code>Once upon a time, there was a big tree. The tree was very happy. The tree was very good at the tree.</code></p><p><code>One day, a little bird came to the tree. The bird wanted to find the bird, so it looked very pretty. The bird saw&#8230;</code></p><p>At step 500, it looks like English but the meaning is useless.</p><p></p><p><code>Time: 2025-05-17 22:58:22.731600 Step: 1000, Loss: 2.165599822998047</code></p><p><code>Once upon a time, there was a little boy named Tim. Tim had a toy box. He liked to play with it every day. One day, Tim found a small toy under his bed. It was a small, green toy. Tim was very happy.</code></p><p><code>Tim&#8230;</code></p><p>At step 1000, it&#8217;s good already. Nice progress.</p><p></p><p><code>Time: 2025-05-17 23:10:47.535277 Step: 2000, Loss: 1.9070618152618408</code></p><p><code>Once upon a time, there was a little girl named Lily. She had a pretty doll named Rose. Lily loved to play with Rose. They would run and jump all day long. Lily was very happy.</code></p><p><code>One day, Lily wanted to show Lily her doll to her&#8230;</code></p><p>At step 2000, the first paragraph looks perfect. The second paragraph looks a bit confusing.</p><p></p><p><code>Time: 2025-05-17 23:47:30.009432 Step: 5000, Loss: 1.763701319694519</code></p><p><code>Once upon a time, there was a little boy named Tim. Tim had a big dream. In his dream, he was a big, round ball. He loved to play with his ball every day.</code></p><p><code>One day, Tim's friend, Sue, came over to play&#8230;</code></p><p>Finally, it reaches 1.7 training loss at step 5000. It looks almost similar level to step 2000, though.</p><div><hr></div><p>The learning curve wasn&#8217;t good initially so that I needed to investigate multiple aspects. This is the very first learning curve and the inferences, lol:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a3MQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a3MQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 424w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 848w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 1272w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a3MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png" width="292" height="181.70178926441352" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:626,&quot;width&quot;:1006,&quot;resizeWidth&quot;:292,&quot;bytes&quot;:62703,&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://magazine.opsbr.com/i/163836928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.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_!a3MQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 424w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 848w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 1272w, https://substackcdn.com/image/fetch/$s_!a3MQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa808647-aad1-4b8a-8159-3d474630ea88_1006x626.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5trk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5trk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 424w, https://substackcdn.com/image/fetch/$s_!5trk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 848w, https://substackcdn.com/image/fetch/$s_!5trk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 1272w, https://substackcdn.com/image/fetch/$s_!5trk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5trk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png" width="292" height="165.8543956043956" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:827,&quot;width&quot;:1456,&quot;resizeWidth&quot;:292,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image" title="Image" srcset="https://substackcdn.com/image/fetch/$s_!5trk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 424w, https://substackcdn.com/image/fetch/$s_!5trk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 848w, https://substackcdn.com/image/fetch/$s_!5trk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 1272w, https://substackcdn.com/image/fetch/$s_!5trk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7c7eb1e-3e9c-4661-8e6c-109ca7815cc7_2438x1384.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>After stabilizing this crazy curve, I still struggled with higher loss. It ends up to my bugs e.g. clipping gradient before backward pass, and forgetting to truncate and normalize the initial parameters of attention matrixes:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tp6B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tp6B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 424w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 848w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 1272w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tp6B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png" width="292" height="182.57314629258516" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:998,&quot;resizeWidth&quot;:292,&quot;bytes&quot;:119002,&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://magazine.opsbr.com/i/163836928?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.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_!Tp6B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 424w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 848w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 1272w, https://substackcdn.com/image/fetch/$s_!Tp6B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F802ec89d-3b96-4d78-b4d3-7738b0d510c2_998x624.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>These very hands-on experience gives me deep understanding of how Transformer works and how to train it e.g. I really understand how the computational stability is important through the bugs above&#8230;</p><div><hr></div><p>Because I built and trained Transformer once, I start to understand how each component works. Since Transformer is the dominant architecture today, I can somehow understand the novel proposals that was impossible for me one month ago.</p><p>I&#8217;ll keep learning CS336 and I&#8217;m especially interested in Alignment sections upcoming because now my next mysterious point is post training alignments.</p><p>Remember, I didn&#8217;t know Transformer at all one month ago. So, you could build your own model in a month even if you don&#8217;t know Transformer today! Feel free to ask me if you have trouble to run CS336 assignment 1.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Ep 7: Cell-based Architecture 101 - When?]]></title><description><![CDATA[Learn several use cases of Cell-based Architecture]]></description><link>https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Thu, 15 Feb 2024 07:00:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Iwj0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101">In the last post</a>, I described the concept of Cell-based Architecture. It consists of three components: Cell itself, Routing layer and Cell migration. Now, you&#8217;ve already understood the problems that Cell-based Architecture solves and the basic idea about it, but it still sounds like a toy world example. Therefore, I&#8217;d like to introduce several use cases where Cell-based Architecture is useful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Iwj0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Iwj0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Iwj0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:427544,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&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_!Iwj0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Iwj0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Beautiful architectures in Vancouver, Photo by <a href="https://unsplash.com/@kobetang?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Kobe Tang</a> on <a href="https://unsplash.com/photos/a-view-of-a-city-with-tall-buildings-and-a-body-of-water-5ChxQal-iGM?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure></div><p>The series consists of 5 short posts:</p><ol><li><p><a href="https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101">Introduction</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101">Why is Cell-based Architecture needed?</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101">What is Cell-based Architecture?</a></p></li><li><p><strong>When to use Cell-based Architecture? (this post)</strong></p></li><li><p>How to implement Cell-based Architecture?</p></li></ol><div><hr></div><h1>Use cases</h1><h2>B2B SaaS a.k.a. Cloud services</h2><p>Recent days, B2B SaaS becomes a popular business model as it&#8217;s profitable and scalable, like AWS. B2B SaaS is typically provided with some form of multi-tenant applications so that the service provider can utilize the shared resources to gain more customers than the system allows if everyone runs 100% workloads at the same time i.e. overcommit.</p><h3>User-based cell partitioning</h3><p>In such multi-tenant architecture, your business would be capped somewhere if you only run one application. For example, if your application has some limitations (e.g. hard limit of a cloud service) and can host up to 1K users, your business can&#8217;t scale more than 1K users.</p><p>Instead, with Cell-based Architecture, you can horizontally scale your business by simply adding more cells e.g. 1K*N users if there are N cells. Because B2B SaaS customers typically don&#8217;t require any interactions between customers, they&#8217;re easily isolated to cells. Here is the examples of user-based cell partitioning:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QtL6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QtL6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 424w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 848w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 1272w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QtL6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png" width="762" height="861" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:861,&quot;width&quot;:762,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48552,&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_!QtL6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 424w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 848w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 1272w, https://substackcdn.com/image/fetch/$s_!QtL6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73a3bd6-5daf-47ee-ae49-465343f01620_762x861.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The top diagram is a single application so that it can&#8217;t scale more than capacity of users. / The bottom diagram is Cell-based Architecture. It can horizontally scalable by adding more cells.</figcaption></figure></div><p>In addition, if you want to handle single-tenant use case, it&#8217;s pretty easily done with user-based cell partitioning because single-tenant cells are just a special variant of multi-tenant cells that have only one customer. Everything else can be identical.</p><h3>Resource-based cell partitioning</h3><p>Also, Resource-based cell partitioning is common since B2B SaaS providers typically charge per resources e.g. DynamoDB tables or S3 objects. This allows one customer to own more tables than one cell can serve. Let&#8217;s see the example below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RULS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RULS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 424w, https://substackcdn.com/image/fetch/$s_!RULS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 848w, https://substackcdn.com/image/fetch/$s_!RULS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 1272w, https://substackcdn.com/image/fetch/$s_!RULS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RULS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png" width="717" height="511" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3077883-acff-41fb-8b84-a37441bcf00c_717x511.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:511,&quot;width&quot;:717,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79026,&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_!RULS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 424w, https://substackcdn.com/image/fetch/$s_!RULS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 848w, https://substackcdn.com/image/fetch/$s_!RULS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 1272w, https://substackcdn.com/image/fetch/$s_!RULS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3077883-acff-41fb-8b84-a37441bcf00c_717x511.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Resource-based cell partitioning. Each user uses multiple cells where their resources are stored.</figcaption></figure></div><h2>E-Commerce</h2><p>The next one is a B2C example - EC site. Except product reviews, cross-user interactions are not needed in most of the cases, like B2B SaaS. So, it&#8217;s easy to partition by user i.e. one cell host whole user experiences. But, how to handle inventory? We can&#8217;t store silo of inventory to each cell because one SKU might be ordered by two users against different cells&#8217; inventory i.e. Split brain problem.</p><p>Then, microservice comes in. Cell doesn&#8217;t have to be end-to-end full stack. For example, Frontend microservice is split by user while Inventory service is split by resource e.g. SKU. Then, Frontend service cells talk with Inventory service through its Routing layer when accessing SKU.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vmnB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vmnB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 424w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 848w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vmnB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png" width="741" height="1022" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1022,&quot;width&quot;:741,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65316,&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_!vmnB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 424w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 848w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!vmnB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec5e94b-ed15-43e9-8979-ac4d9722fb58_741x1022.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Frontend service is partitioned by users while Backend service is partitioned by resources. Because each service has different scaling dimensions.</figcaption></figure></div><h2>Physical silo</h2><p>The last example is a little bit unique. Sometime your business is tightly coupled with physical locations. For example, you want to run microservices to manage operations in warehouses you physically own. Or, your service provides regional or AZ isolated features. In these cases, cells partitioned by physical locations makes more sense and whole microservices are partitioned by the same cell boundaries and only communicate within the same cell. Therefore, Routing layer isn&#8217;t needed in front of Microservice 2 in the example below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yYin!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yYin!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 424w, https://substackcdn.com/image/fetch/$s_!yYin!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 848w, https://substackcdn.com/image/fetch/$s_!yYin!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 1272w, https://substackcdn.com/image/fetch/$s_!yYin!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yYin!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png" width="717" height="871" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b359da6c-bacb-4e4d-8615-801852a37736_717x871.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:871,&quot;width&quot;:717,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:52584,&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_!yYin!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 424w, https://substackcdn.com/image/fetch/$s_!yYin!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 848w, https://substackcdn.com/image/fetch/$s_!yYin!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 1272w, https://substackcdn.com/image/fetch/$s_!yYin!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb359da6c-bacb-4e4d-8615-801852a37736_717x871.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This system is physically isolated and the whole system can work independently per warehouse.</figcaption></figure></div><h1>Summary</h1><p>In this post, I showed several use cases where Cell-based Architecture is used. B2B SaaS is suitable because users/resources are typically independent. EC site can be partitioned by users on frontend but backend data e.g. inventory would be served by different microservice with different cell dimension. Lastly, cells can be tied with physical locations to isolate whole system stack per location.</p><h1>What&#8217;s next?</h1><p>So far, we&#8217;ve learned several Cell-based Architecture patterns at very high level design. In the last post of this series, I&#8217;d like to show more detailed examples so that you can see some actual working code to wrap up this 101 series.</p><p><em>Thank you for reading. If you&#8217;re interested in this series, please hit the &#8220;Like&#8220; button and share this to any social media. I would be motivated more! Also, subscribe this magazine to receive the upcoming posts for this series!</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p> </p>]]></content:encoded></item><item><title><![CDATA[Ep 6: Cell-based Architecture 101 - What?]]></title><description><![CDATA[Learn three components of Cell-based Architecture and how they solve the problems.]]></description><link>https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Mon, 05 Feb 2024 17:30:15 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hlL_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101">In the last episode</a>, I showed several cases where the simple cloud usage doesn&#8217;t enough to provide neither scalability nor availability. The key reasons are:</p><ol><li><p>Scale is not manageable</p></li><li><p>Logical SPOF</p></li></ol><p>Because you need to scale the only one stack of system to fit your business demand, you can&#8217;t control the size of users, resources, etc., that leads unknown scalability bottlenecks.</p><p>Also, no matter how each cloud service is designed as highly available as possible, a single resource can be a logical SPOF anytime and could down the entire system easily.</p><p>In this post, I&#8217;m going to introduce the key concepts of Cell-based Architecture and why they can address these issues.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hlL_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hlL_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hlL_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:427544,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&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_!hlL_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hlL_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Beautiful architectures in Vancouver, Photo by <a href="https://unsplash.com/@kobetang?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Kobe Tang</a> on <a href="https://unsplash.com/photos/a-view-of-a-city-with-tall-buildings-and-a-body-of-water-5ChxQal-iGM?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure></div><p>The series consists of 5 short posts:</p><ol><li><p><a href="https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101">Introduction</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101">Why is Cell-based Architecture needed?</a></p></li><li><p><strong>What is Cell-based Architecture? (this post)</strong></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101">When to use Cell-based Architecture?</a></p></li><li><p>How to implement Cell-based Architecture?</p></li></ol><div><hr></div><h1>Cell</h1><p>As I mentioned above, one of the key issues of the single stack system is unmanageable scale. If you can control the maximum size of the system e.g. the maximum number of users or resources, it&#8217;s much easier to manage the scalability of the system. For example, during a load testing, you don&#8217;t have to worry about too large scalability way above the maximum size and it should be a good coverage if you could address all the known scalability issues found by the load testing.</p><p><strong>This limited-scale single application stack is called &#8220;Cell&#8220;.</strong> It&#8217;s manageable in terms of scale per cell. If you want to host more users/resources than the maximum size of one cell, you simply need to add more cells. For example, UserID 1-100 are hosted in Cell-0 and UserID 101-200 are hosted in Cell-1, and so forth. See the example below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y7IK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y7IK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 424w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 848w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 1272w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y7IK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png" width="803" height="921" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:921,&quot;width&quot;:803,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57310,&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_!y7IK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 424w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 848w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.png 1272w, https://substackcdn.com/image/fetch/$s_!y7IK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F657a0547-e4fb-4ba8-8965-f06dca184304_803x921.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 you can see above, you manage two completely isolated systems, each has identical full stack architecture<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> but stores completely different data set.</p><p>How about availability? Now, every layer is no more logical SPOF. If you have a super problematic user i.e. Black swan/Poison pill and your database is brown away, only one of cell is affected. That means the blast radius is 50% of the total users. In other words, <strong>if you have N cells, the blast radius is 1/N</strong>. This is also helpful when deploying a bad commit. With cells, you can deploy cell by cell and monitor after each deployment and block promotions when it&#8217;s bad. So, if there is a pretty bad deployment, the first deployed cell is the only victim i.e. 50% blast radius, again.</p><p>The other notes for cells are below. Some will be covered by the remaining series:</p><ul><li><p>Running the same code</p><ul><li><p>A cell isn&#8217;t a tailer-made solution per customer</p></li></ul></li><li><p>Silo as much as possible</p><ul><li><p>From top to bottom; ALB to RDS, even AWS account should be isolated per cell<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p></li><li><p>Typically, no direct communication between cells are allowed</p></li></ul></li><li><p>Partitioning dimension differs case by case</p><ul><li><p>Partition by user</p><ul><li><p>Good when the number of resources per user is manageable</p></li></ul></li><li><p>Partition by resource</p><ul><li><p>Good when the number of resources per user is unmanageable</p></li></ul></li></ul></li><li><p>Heterogeneous size is acceptable</p><ul><li><p>One cell could host only 1 user while others host 100s per cell because of single-tenant request or isolating noisy neighbors</p></li></ul></li></ul><h3>Summary of Cell</h3><p>Cell is a very simple but powerful concept. By just splitting your users or resources, you can solve both scalability and availability problems we talked so far. It&#8217;s so simple that any type of systems can be implemented as a cell. If you have a running application, that would be called as Cell-0 today and you can prepare Cell-1 tomorrow.</p><h1>Cross-cell Data plane a.k.a. Routing layer</h1><p>Although the concept of cell is simple, the reality isn&#8217;t. As you might notice, I haven&#8217;t talked about how to &#8220;route&#8220; each user to the appropriate cell. This is the uniqueness of Cell-based Architecture.</p><p>You probably want to keep your system look non-cellular from the users&#8217; perspective because it&#8217;s internal details. Another reason for that is you might migrate several users to the other cell, then they need to change their endpoint to the new cell unless some cross-cell layer exists. In the example below, &#8220;Routing layer&#8220; is the component to dispatch users to the appropriate cells. I would call it Cross-cell Data plane but &#8220;Routing layer&#8220; is more famous name:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o-8c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o-8c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 424w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 848w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 1272w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o-8c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png" width="760" height="670" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:670,&quot;width&quot;:760,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36066,&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_!o-8c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 424w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 848w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.png 1272w, https://substackcdn.com/image/fetch/$s_!o-8c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc44181ff-f7ec-4eb9-9375-5630ba963779_760x670.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>In this diagram, Routing layer looks like an inline proxy that receives all the requests and dispatch them based on their UserID. That&#8217;s one solution but sometime it can be an aside component such as CNAME e.g. user1.example.com =&gt; cell-0.example.com. With this solution, Routing layer isn&#8217;t a proxy but somehow control the routing rules. I&#8217;ll talk about more patterns in the last article of this series.</p><p><strong>The most critical rule of Routing layer is keeping it as thin as possible.</strong> Because it&#8217;s impossible to split into cells, it can easily hit some scalability bottlenecks. Unlike the application itself, the purpose of Routing layer is just routing, so the implementation can be much simpler i.e. more scalable than each cell. It&#8217;s also a logical SPOF, so highly available design is important and deployments should be done carefully.</p><h1>Cross-cell Control plane a.k.a. Cell migration</h1><p>The last component of Cell-based Architecture is Cross-cell Control plane. The key difference from Cross-cell Data plane is that this component moves data across cells. So, this is also called &#8220;Cell migration&#8220;. In the example below, UserID 100 is migrated from Cell-0 to Cell-1. During the process, Cell migration touches not only both cells but also Routing layer to appropriately re-route the requests:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QqtQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QqtQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 424w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 848w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 1272w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QqtQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png" width="760" height="882" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:882,&quot;width&quot;:760,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:53312,&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_!QqtQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 424w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 848w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.png 1272w, https://substackcdn.com/image/fetch/$s_!QqtQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5658881c-c8b4-4535-bd10-48702d8f1d2e_760x882.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>Cell migration is typically a workflow that carefully designed to keep data consistency during migration i.e. treating &#8220;Split brain&#8220; problem. As you notice, it&#8217;s not a simple problem in distributed system, so <strong>Cell migration is the most advanced component of Cell-based Architecture</strong> and it&#8217;s not easy to implement correctly. Thus, it&#8217;s not a bad idea to start Cell migration with maintenance window e.g. while blocking all access by UserID 100, you copy all the data of UserID 100 to the new cell, then update Routing layer.</p><p>Why do you need to move data across cells? There are two reasons:</p><ol><li><p>Cell balancing</p></li><li><p>Noisy neighbor isolation</p></li></ol><p>Cell balancing is needed when some cells become too large or small. Although cell should be designed and operated under the manageable size, sometime you need to adjust such thresholds due to a new discovery. Or, you might just want to merge/split cells for better management, especially you adopt Cell-based Architecture after several years of operations.</p><p>Noisy neighbor is a user/resource that brings too high load to the cell e.g. DDoS attackers, celebrities, etc. Once you identify them, it is a good strategy to isolate them from the others for both parties. For example, DDoS attackers can be migrated to a special cell for only such users so that any normal users won&#8217;t be affected.</p><p>Anyway, the capability of Cell migration is a huge benefit and makes cell operations easier and safer. However, because of the complexity, it is recommended to implement Cell migration from day one.</p><h1>Summary</h1><p>In this post, I described three components of Cell-based Architecture: 1. Cell - A limited-scale and isolated full stack application, 2. Routing layer - A cross-cell data plane to route traffic to the appropriate cells, 3. Cell migration - A cross-cell control plane to move data across cells. By using Cells, you can handle scalability and availability problems we talked before pretty simply. However, Cells rises the other problems, such as separate endpoints, cell rebalancing. Both cross-cell components fill such gaps.</p><h1>What&#8217;s next</h1><p>You&#8217;ve learned the core concept of Cell-based Architecture here. The next topic is when it&#8217;s needed. The two problems - scalability and availability - are ubiquitous but I&#8217;m going to apply them for several use cases so that you can understand why they are the issues and Cell-based Architecture is needed there.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;4e41c343-3a5a-4c40-ac49-622a254650b0&quot;,&quot;caption&quot;:&quot;In the last post, I described the concept of Cell-based Architecture. It consists of three components: Cell itself, Routing layer and Cell migration. Now, you&#8217;ve already understood the problems that Cell-based Architecture solves and the basic idea about it, but it still sounds like a toy world example. Therefore, I&#8217;d like to introduce several use cases&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Ep 7: Cell-based Architecture 101 - When?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:128671635,&quot;name&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;bio&quot;:&quot;Operations Bar Raiser.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24586191-86c0-465e-b548-b5374a2f3d0a_1037x1101.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-02-15T07:00:32.770Z&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%2Ffea8f3ab-071c-46ea-b543-ab8675443c29_2400x1350.jpeg&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:141264029,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;OpsBR Magazine&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%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p><em>Thank you for reading. If you&#8217;re interested in this series, please hit the &#8220;Like&#8220; button and share this to any social media. I would be motivated more! Also, subscribe this magazine to receive the upcoming posts for this series! </em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>This is capable thanks to cloud and Infrastructure as Code.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Some quotas are per AWS account e.g. EC2 instances, Lambda concurrency. So, if you run multi cells in a single AWS account, your entire system could be capped by such quotas.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Ep 5: Cell-based Architecture 101 - Why?]]></title><description><![CDATA[Learn why Cell-based Architecture is needed even though cloud is designed for scalability and availability.]]></description><link>https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Wed, 31 Jan 2024 17:30:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IDMx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101">In the previous post</a>, I&#8217;ve introduced two key problems that Cell-based Architecture solves:</p><ol><li><p><strong>Scalability</strong></p></li><li><p><strong>Availability</strong></p></li></ol><p>However, these are very common problems in any cloud system and there are tons of solutions/design addressing them already. Why do we need to solve them again?</p><p>In this second episode of &#8220;Cell-based Architecture 101&#8220;, I&#8217;d like to talk about the limitations of the existing solutions/design in cloud so that you would be able to understand why this new architecture is needed.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IDMx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IDMx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IDMx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:656554,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&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_!IDMx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IDMx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Beautiful architectures in Vancouver, Photo by <a href="https://unsplash.com/@kobetang?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Kobe Tang</a> on <a href="https://unsplash.com/photos/a-view-of-a-city-with-tall-buildings-and-a-body-of-water-5ChxQal-iGM?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure></div><p>The series consists of 5 short posts:</p><ol><li><p><a href="https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101">Introduction</a></p></li><li><p><strong>Why is Cell-based Architecture needed? (this post)</strong></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101">What is Cell-based Architecture?</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101">When to use Cell-based Architecture?</a></p></li><li><p>How to implement Cell-based Architecture?</p></li></ol><div><hr></div><h1>&#8220;Highly scalable and available&#8221; in cloud</h1><p>Assuming you&#8217;ve already built or designed some application in cloud. You know one of the core values of cloud is the massive scalability because the cloud services are running on the hyperscale infrastructure. For example, an Amazon S3&#8217;s bucket can contain billions of objects or more. So, when you design an application using S3 bucket, you don&#8217;t have to worry about the maximum number of objects allowed in a bucket.</p><p>Another big benefit of cloud is the capability of highly available system design. Because of elasticity and physical distribution, you can build your system using multiple instances/availability-zones/regions to make it more available. For example, Amazon RDS offers multi-AZ failover so that a DB instance isn&#8217;t Single-Point-Of-Failure a.k.a. SPOF anymore. Like <a href="https://netflixtechblog.com/active-active-for-multi-regional-resiliency-c47719f6685b">Netfilx</a>, you can shift traffic across regions to avoid even single region failures.</p><p>Therefore, with such traits of cloud, your application is typically highly scalable and available out of the box. Let me introduce a very simple example here; A request/response system, ALB for load balancing, EC2 for application servers with Auto Scaling Group to scale in/out and RDS for database:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H-hJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H-hJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 424w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 848w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 1272w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H-hJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png" width="601" height="561" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:561,&quot;width&quot;:601,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30173,&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_!H-hJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 424w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 848w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 1272w, https://substackcdn.com/image/fetch/$s_!H-hJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc0d7b9-726c-4fe5-b490-a9388fc8009a_601x561.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Using AWS as an example because it&#8217;s the most popular platform, but most of the cloud providers should have the similar services.</figcaption></figure></div><p>In this system, ALB, EC2 and RDS are deployed in multi-AZ. Therefore, it&#8217;s single-AZ failure tolerant. Also, ALB, EC2 and RDS can scale elastically so that it can support from 1 req/s to millions. No need to worry about scalability nor availability.</p><p>&#8230;Well, is this true? As you expect, it&#8217;s not 100% true. Let&#8217;s find some limitations in the next section. </p><h1>Scalability of cloud</h1><p>In the previous example, you&#8217;ve probably noticed that it has an obvious scalability bottleneck. RDS needs a single writer instance and it must have scalability limit because it&#8217;s a single machine so that CPU, memory, network or any other resource has its physical limitation<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. That&#8217;s a super easy bottleneck, but is this the only one?</p><p>ALB is more scalable than RDS but it has <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html">some default quotas</a>. Although most of them are adjustable, there is no guarantee that your limit increase requests are approved by AWS. Some might have actual hard limits internally so that you couldn&#8217;t exceed that hard limit. For example, the default quota for the number of certificates per ALB is 25. So, if this application provides a custom domain feature, one ALB can host up to just 25 custom domains until the limit increase request is approved<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. The same logic can be applied to EC2 quota for the number of instances i.e. EC2 layer might not be scalable until limit increases even though you use Auto Scaling Group properly.</p><p>Lastly, even if your system doesn&#8217;t hit any service quotas and RDS writer can handle the volume of the requests, EC2 instance itself could hit some limit. For example, if you want to cache some metadata in-memory of your application running on EC2 instance, you need to be careful about the size of the metadata. Let&#8217;s say the metadata glows proportionally with the number of users and need to be cached in-memory on every instance to achieve the performance target. As you get more users, the metadata size increases and eventually could exhaust the physical memory space. The only solution here is scaling up all the instances but it&#8217;s not infinitely scalable as you already know.</p><p>In summary, the example system could have three types of scalability bottlenecks:</p><ul><li><p>Single writer DB instance</p></li><li><p>Service quotas</p></li><li><p>Physical limit on every application server</p></li></ul><p>You would argue that your system&#8217;s workload doesn&#8217;t require such high scalability and these are not critical. Yes, that&#8217;s true. However, once you want to accelerate the growth of  your business, you could be easily blocked by these bottlenecks and take way longer time to re-architect everything to workaround them. Even worse, you might hit unknown limits whenever you scale more and they always annoy you.</p><h1>Availability of cloud</h1><p>How about availability? The example system uses multi-AZ architecture well, so single-AZ failure doesn&#8217;t mean 100% outage. It doesn&#8217;t look having any SPOF: ALB is distributed service and failures are handled by AWS under SLA, EC2 is a fleet of instances and instance failures are handled by Auto Scaling Group, RDS has auto failover.</p><p>Let me provide one extreme case. What would happen if you accidentally scaled Auto Scaling Group to zero instances? This could be done by just a single API call or console operation. Once it happened, this system would have no application server i.e. 100% outage. The similar event could happen on any cloud resources e.g. deleting RDS, updating Security group wrongly, etc.</p><p>The next case is already explained in the section of Scalability of cloud. Once RDS writer instance reaches the performance limit, it affects all the requests. If one EC2 instance exhausts all memory by the large metadata, the same issue happens on all EC2 instances. Any scalability related outage could be a full system outage.</p><p>The last case is more realistic and you&#8217;ve probably experienced already. That is one single bad deployment causing 100% outage. For example, if you automate DB schema migration in your deployment workflow but unfortunately you&#8217;ve deployed ALTER TABLE on a huge table requiring an exclusive lock. Until it finishes, all the DB queries using the table don&#8217;t work and it would mean 100% outage. Another example is a <a href="https://en.wikipedia.org/wiki/Black_swan_theory">Black swan</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>; let&#8217;s say you deploy any new code to one instance first to make sure it&#8217;s safe to deploy. Unfortunately, a new code contains a bug that issues a super heavy and long running SELECT query only if it is used by just one customer who has some special condition. Once that customer hits the single instance, your DB becomes overwhelmed even though you deployed only one instance.</p><p>In summary, the example system could have 100% outage by three cases:</p><ul><li><p>Accidental modifications of cloud resources</p></li><li><p>Scalability bottleneck</p></li><li><p>Bad deployment</p></li></ul><p>You might think some of RDS related issues can be solved by using Serverless DB like DynamoDB, but the answer is no. Once you hit WCU/RCU limits, all the workloads are affected. Wrong UpdateTable or modifying IAM policies can be 100% outage. Although DynamoDB is highly distributed, scalable and available service, a single DynamoDB table is logically SPOF.</p><h1>What&#8217;s next?</h1><p>In this post, I&#8217;ve described several cases that the typical &#8220;highly scalable and available cloud system&#8220; could be easily broken. These are actually very limited examples and there are millions of cases including unknown cases.</p><p>This is the nature of cloud. You can&#8217;t avoid <a href="https://cacm.acm.org/magazines/2020/2/242334-everything-fails-all-the-time/fulltext">&#8220;Everything fails all the time&#8220;</a>. But, you do want to build scalable and available system in cloud. Cell-based Architecture is the state-of-the-art solution here. Now, you&#8217;re interested in Cell-based Architecture, aren&#8217;t you?</p><p>In the next post, I&#8217;m going to explain the basic concept of Cell-based Architecture and how it solves these scalability and availability issues.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2bb08c84-27a2-4c09-8766-80cf57e7d325&quot;,&quot;caption&quot;:&quot;In the last episode, I showed several cases where the simple cloud usage doesn&#8217;t enough to provide neither scalability nor availability. The key reasons are: Scale is not manageable Logical SPOF Because you need to scale the only one stack of system to fit your business demand, you can&#8217;t control the size of users, resources, etc., that leads unknown scalab&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Ep 6: Cell-based Architecture 101 - What?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:128671635,&quot;name&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;bio&quot;:&quot;Operations Bar Raiser.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24586191-86c0-465e-b548-b5374a2f3d0a_1037x1101.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-02-05T17:30:15.294Z&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%2Fc2ae1997-3af2-4f1b-8a13-d7717bbbd256_2400x1350.jpeg&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:141254757,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;OpsBR Magazine&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%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p><em>Thank you for reading. If you&#8217;re interested in this series, please hit the &#8220;Like&#8220; button and share this to any social media. I would be motivated more! Also, subscribe this magazine to receive the upcoming posts for this series!</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><a href="https://aws.amazon.com/blogs/aws/join-the-preview-amazon-aurora-limitless-database/">Amazon Aurora Limitless Database</a> is an interesting approach to make RDB scale out. <a href="https://planetscale.com/">PlanetScale</a> is yet another solution and <a href="https://vitess.io/">Vitess </a>is an OSS project to achieve the same goal.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Although I don&#8217;t think they would like to support millions of certificates on a single ALB, I&#8217;m not sure whether they have a hard limit for this quota. If you&#8217;re keen on such higher quota, I would recommend you to talk with AWS Support or AWS Solutions Architect. </p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>In Amazon/AWS, people typically call it &#8220;Poison pill&#8220; but it doesn&#8217;t look popular outside Amazon/AWS.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Ep 4: Cell-based Architecture 101 - Introduction]]></title><description><![CDATA[Let's learn Cell-based Architecture i.e. State-of-the-art in developing cloud applications in minutes.]]></description><link>https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Tue, 16 Jan 2024 18:00:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CBC1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It's been a while when I published the last episode since I had been off for this magazine. Now, I'd like to reboot this magazine by shifting the topic to system design. <strong>&#8220;Cell-based Architecture&#8220;</strong> is one of the state-of-the-art in developing cloud applications but it&#8217;s still not popular except among big tech companies like Amazon yet. I learned the importance and reality of Cell-based Architecture when I was working for Amazon S3 and Amazon EKS, then I&#8217;ve just realized that people don&#8217;t know about Cell-based Architecture yet. Therefore, in this series of 5 posts, I&#8217;d like to explain Cell-based Architecture for everyone briefly to attract you to explore more about it and try it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CBC1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CBC1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CBC1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:656554,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&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_!CBC1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CBC1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ae2b0c4-f85d-4c7d-b385-994ec3f1866b_2400x1350.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Beautiful architectures in Vancouver, Photo by <a href="https://unsplash.com/@kobetang?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Kobe Tang</a> on <a href="https://unsplash.com/photos/a-view-of-a-city-with-tall-buildings-and-a-body-of-water-5ChxQal-iGM?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></figcaption></figure></div><p>This series focuses on inspiring majority of the readers and making them interested in Cell-based Architecture. I won&#8217;t dive deep into details of Cell-based Architecture because it ends up to depending on each system and I don&#8217;t have enough time to provide bunch of use cases and examples of Cell-based Architecture. Instead, I&#8217;d like to stimulate your architect mindset by providing the essence of Cell-based Architecture so that you couldn&#8217;t stop considering about that when you design a software system next time :)</p><h1>Outlines</h1><p>The series consists of 5 short posts:</p><ol><li><p><strong>Introduction (this post)</strong></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101">Why is Cell-based Architecture needed?</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-6-cell-based-architecture-101">What is Cell-based Architecture?</a></p></li><li><p><a href="https://magazine.opsbr.com/p/ep-7-cell-based-architecture-101">When to use Cell-based Architecture?</a></p></li><li><p>How to implement Cell-based Architecture?</p></li></ol><p><strong>The order matters</strong>: First, I&#8217;d like to explain the problems that Cell-based Architecture solves because some of people give up to understand it while reading like &#8220;What is cell?&#8220; or similar. Without understanding about the reasons why Cell-based Architecture was born, it just looks like a toy world example and boring. After explaining about &#8220;Why&#8220;, I&#8217;ll introduce Cell-based Architecture&#8217;s core concepts. Then, I&#8217;ll show several use cases of Cell-based Architecture with rationales, and finally I&#8217;ll explain a few concrete examples of Cell-based Architecture implementations.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><h1>Why Cell-based Architecture? - Introduction</h1><p>Although I&#8217;ll describe this more in the next post, I&#8217;d like to briefly introduce the most important topic in this series: &#8220;Why Cell-based Architecture?&#8220;</p><p>In summary, Cell-based Architecture solves two core problems:</p><ol><li><p><strong>Scalability</strong></p></li><li><p><strong>Availability</strong></p></li></ol><p>Well, probably you&#8217;re already familiar with them if you&#8217;ve built any application in cloud, and notice that these look the key features that cloud providers offer already e.g. Amazon DynamoDB provides infinite scalability and higher availability SLA out of the box. <strong>Why do we need to solve them again, then?</strong></p><p>I&#8217;ll leave this question open here and let you think about it until the next post comes. Let&#8217;s think about why you can&#8217;t naively rely on them.</p><h1>What&#8217;s next?</h1><p>In the next post, I&#8217;d like to answer the question above and describe about what is the fundamental problems in cloud development today:</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;f6fee311-fa00-4597-919d-3f1bfa946807&quot;,&quot;caption&quot;:&quot;In the previous post, I&#8217;ve introduced two key problems that Cell-based Architecture solves: Scalability Availability However, these are very common problems in any cloud system and there are tons of solutions/design addressing them already. Why do we need to solve them again?&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Ep 5: Cell-based Architecture 101 - Why?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:128671635,&quot;name&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;bio&quot;:&quot;Operations Bar Raiser.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24586191-86c0-465e-b548-b5374a2f3d0a_1037x1101.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-01-31T17:30:27.090Z&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%2F0237681d-3775-440d-ae90-fb38458c2ad9_2400x1350.jpeg&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://magazine.opsbr.com/p/ep-5-cell-based-architecture-101&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:141228674,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;OpsBR Magazine&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%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p><em>Thank you for reading. If you&#8217;re interested in this series, please hit the &#8220;Like&#8220; button and share this to any social media. I would be motivated more! Also, subscribe this magazine to receive the upcoming posts for this series!</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/p/ep-4-cell-based-architecture-101?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h1>References</h1><ul><li><p><a href="https://docs.aws.amazon.com/wellarchitected/latest/reducing-scope-of-impact-with-cell-based-architecture/reducing-scope-of-impact-with-cell-based-architecture.html?did=wp_card&amp;trk=wp_card">&#8220;Reducing the Scope of Impact with Cell-Based Architecture&#8220;</a> by AWS Well-Architected</p><ul><li><p>In this series, I&#8217;d like to basically squeeze this document and make it easier to get started. But, if you don&#8217;t mind to read this excellent document, I highly recommend to do so because it captures more details than my posts. Probably a good way to follow up my casual posts.</p></li></ul></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Disclaimer: I&#8217;ll try my best but this is a casual content and most of the information are based on my own experience, thus I might miss something important or be wrong. If you really want me to write more detailed research-type document or book, please let me know!</p></div></div>]]></content:encoded></item><item><title><![CDATA[Ep 3: Continuous Delivery - Make any commit deployable within one hour]]></title><description><![CDATA[We recently read &#8220;Modern Software Engineering&#8220; by David Farley and the most important key takeaway we got was this:]]></description><link>https://magazine.opsbr.com/p/ep-3-continuous-delivery-make-any</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-3-continuous-delivery-make-any</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Fri, 24 Feb 2023 20:00:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4mo_!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We recently read &#8220;Modern Software Engineering&#8220; by David Farley and the most important key takeaway we got was this:</p><blockquote><p><em>&#8230; As a target, I generally recommend aiming to have something that you could deploy into production in less than one hour from the commit of any change.</em></p></blockquote><p>By just applying this simple principal, your development process is encouraged to optimize for various aspects and gain lots of benefits, especially better quality of software release. Let&#8217;s quickly look around the benefits first. We&#8217;ll talk about how to guide in the following newsletter.</p><h2>Measurements of the performance of software development</h2><p>According to &#8220;Modern Software Engineering&#8220;, and we totally agree with it, there are two key measurements of the performance of software development and each is associated with two key indicators:</p><ol><li><p>Stability</p><ol><li><p>Change Failure Rate</p></li><li><p>Recovery Failure Time</p></li></ol></li><li><p>Throughput</p><ol><li><p>Lead Time</p></li><li><p>Frequency</p></li></ol></li></ol><p>These are amazingly simple but tangible enough to visualize such a vague measurement i.e. the performance of software development. If your development process marks high scores on just these two key measurements, your performance is high.</p><p>For example, the better stability you have, the better quality of software you deploy, meaning less negative values provided by deployments. Then, you don&#8217;t have to be scared about deployments too much and you can focus on more creative tasks.</p><p>Also, better throughput means adding more positive values provided by deployments. You release more features with faster pipeline, therefore your customers can receive more values than lower throughput processes.</p><p>However, both are interconnected, not orthogonal nor trade-off. The better stability you have, the more confident you feel to deploy faster and more frequently. Better throughput allows you to deploy improvements of stability faster e.g. quick rollback.</p><h2>One-hour deployable affects every measurements</h2><p>Obviously, the &#8220;Lead Time&#8220; indicator is directly connected to the &#8220;One-hour deployable&#8220; principal. And as we mentioned above, it affects more than &#8220;Lead Time&#8220;. To make one-hour deployable happen, you also need better monitoring system after deployments to keep better stability and give more confidence to high frequent deployments because the monitoring system can quickly detect any failure related to the new code and trigger rollback automatically, for example.</p><h2>Summary</h2><p>The performance of software development can be measured by two simple measurements: Stability and Throughput. Both are correlated each other and high performance teams have high score on both measurements. &#8220;One-hour deployable&#8220; principal is stupidly simple but affects both measurements positively in various ways.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading OpsBR Magazine! Subscribe for free to receive new posts and support my work!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Ep2: Continuous Delivery - Feature flags, another way to make code changes deployable]]></title><description><![CDATA[In the previous episode, we described what deployable means in terms of Continuous Delivery: However, there is another way to make code changes deployable. Let&#8217;s talk about an elegant technique called Feature flags.]]></description><link>https://magazine.opsbr.com/p/ep2-continuous-delivery-feature-flags</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep2-continuous-delivery-feature-flags</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Fri, 17 Feb 2023 20:01:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4mo_!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the previous episode, we described what deployable means in terms of Continuous Delivery:</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:101842510,&quot;url&quot;:&quot;https://opsbr.substack.com/p/ep-1-continuous-delivery-what-does&quot;,&quot;publication_id&quot;:1402474,&quot;publication_name&quot;:&quot;OpsBR Magazine&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%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;title&quot;:&quot;Ep 1: Continuous Delivery - What does deployable mean?&quot;,&quot;truncated_body_text&quot;:&quot;Welcome to OpsBR Magazine! We&#8217;ll publish short newsletters regularly to talk about various topics around operations on software systems and organizations. This is the first newsletter and we&#8217;d like to talk about the first topic about Continuous Delivery.&quot;,&quot;date&quot;:&quot;2023-02-10T10:25:46.534Z&quot;,&quot;like_count&quot;:2,&quot;comment_count&quot;:0,&quot;bylines&quot;:[{&quot;id&quot;:128671635,&quot;name&quot;:&quot;Ryosuke Iwanaga&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24586191-86c0-465e-b548-b5374a2f3d0a_1037x1101.png&quot;,&quot;bio&quot;:&quot;Operations Bar Raiser.&quot;,&quot;profile_set_up_at&quot;:&quot;2023-02-09T10:15:24.420Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1364582,&quot;user_id&quot;:128671635,&quot;publication_id&quot;:1402474,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:1402474,&quot;name&quot;:&quot;OpsBR Magazine&quot;,&quot;subdomain&quot;:&quot;opsbr&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;A newsletter about \&quot;Operational Excellence\&quot; of software systems from OpsBR.&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png&quot;,&quot;author_id&quot;:128671635,&quot;theme_var_background_pop&quot;:&quot;#9A6600&quot;,&quot;created_at&quot;:&quot;2023-02-09T10:15:34.108Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:&quot;OpsBR Software Technology Inc.&quot;,&quot;copyright&quot;:&quot;OpsBR Software Technology Inc.&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;}}],&quot;twitter_screen_name&quot;:&quot;opsbr_inc&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null,&quot;inviteAccepted&quot;:true}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:false,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://opsbr.substack.com/p/ep-1-continuous-delivery-what-does?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!4mo_!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png"><span class="embedded-post-publication-name">OpsBR Magazine</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Ep 1: Continuous Delivery - What does deployable mean?</div></div><div class="embedded-post-body">Welcome to OpsBR Magazine! We&#8217;ll publish short newsletters regularly to talk about various topics around operations on software systems and organizations. This is the first newsletter and we&#8217;d like to talk about the first topic about Continuous Delivery&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 2 likes &#183; Ryosuke Iwanaga</div></a></div><p>However, there is another way to make code changes deployable. Let&#8217;s talk about an elegant technique called <strong>Feature flags.</strong></p><h2>Deploy a new code without activation</h2><p>People typically think that code deployment equals to rolling out a new feature or changing the behavior. But, deployment and enablement don&#8217;t have to happen at once. You can deploy the new code without activation by using <strong>Feature flags</strong> like below:</p><pre><code>function main() {
  const featureFlags = fetchFeatureFlags();
  ...
  if (featureFlags.enableCoolFeature) {
    executeCoolFeature(); // The new code
  }
  ...
}</code></pre><p><strong>Feature flag</strong> is a small configuration available at runtime of your application. It&#8217;s typically injected dynamically like the code above so that you can modify the value of feature flag <strong>without code deployment</strong>. Since the default value of such boolean flag is normally <code>false</code>, this code is <strong>deployable</strong> by nature (!) because the new code won&#8217;t be executed until you change the value of the feature flag. </p><h2>Feature flags isolate deployment and release</h2><p>Feature flag brings lots of benefits in terms of operations. Since you can control when you activate the new feature without deployment, your deployment itself is regression resilient. Any deployment won&#8217;t introduce new behavior so that it&#8217;s ideally identical to the code before the deployment.</p><p>This makes <em>Continuous Deployment a.k.a. (another) CD</em> easier and rollback is rarely needed. With a large code base application, this means that your code is most likely able to be deployed to production along with other teams&#8217; changes without any issue. Without feature flags, your change could be rolled back by a bug introduced by the other team&#8217; change or vice versa.</p><p>Feature flags allow both teams to release their own new features independently. If either team notice some issues with their own new feature, they can easily rollback their own feature exclusively. This isolation is huge win especially for large organizations.</p><p>You can even release the new features gradually. For example, you can enable the feature for 1% of the users first and monitor their behavior to verify whether it&#8217;s working correctly. Once confirmed, you can dial up the percentage every day up to 100%, for example.  </p><h2>However, feature flags are not silver bullets</h2><p>Although feature flags look perfect for CD, you can&#8217;t deploy every single change under feature flags. For example, updating dependency libraries is not easy to hide behind feature flags.</p><p>The other downside of feature flags is that the number of combinations of multiple feature flags can be exploded. Theoretically, every single combination could behave differently at runtime but it&#8217;s much harder to validate all the combinations. Therefore, you might see a weird behavior uncovered by tests because of a rare combination of existing feature flags.</p><p>So, you need to carefully select which features should be under feature flags and monitor the usage of feature flags regularly. If a feature flag has been enabled for all users for a long time, it&#8217;s safe to delete the feature flag as well as the unused old code.</p><p>Lastly, even the new feature is under a feature flag, you must run the same validations steps to ensure you don&#8217;t have known regressions like integration tests. The application behavior could change by just loading a new library without calling it e.g. it might load a too large object into memory without any function calls.</p><h2>Summary</h2><p>Feature flags are powerful tool to make a new code deployable instantaneously. You can deploy the new code without changing the current behavior at all, then enable it by turning the feature flag on later. This can isolate multiple teams&#8217; feature releases each other so that unnecessary rollbacks rarely happen. However, it&#8217;s not silver bullet and you need to carefully use it, monitor its usage and keep running the validations steps like integration tests. </p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading OpsBR Magazine! Subscribe for free to receive new posts and support our work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Ep 1: Continuous Delivery - What does deployable mean?]]></title><description><![CDATA[Welcome to OpsBR Magazine!]]></description><link>https://magazine.opsbr.com/p/ep-1-continuous-delivery-what-does</link><guid isPermaLink="false">https://magazine.opsbr.com/p/ep-1-continuous-delivery-what-does</guid><dc:creator><![CDATA[Ryosuke Iwanaga]]></dc:creator><pubDate>Fri, 10 Feb 2023 10:25:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4mo_!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab2b615-ba04-44f2-bef9-6bbc788230de_1200x1200.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome to OpsBR Magazine! We&#8217;ll publish short newsletters regularly to talk about various topics around operations on software systems and organizations.</p><p>This is the first newsletter and we&#8217;d like to talk about the first topic about Continuous Delivery.</p><h2>Continuous Delivery is the center of operations</h2><p><em>Continuous Delivery a.k.a. CD</em> is the concept and practice to make a new code change <strong>deployable </strong>to production continuously. With CD process i.e. CD pipeline, you are confident to deploy the new changes to production because it is ensured by CD.</p><p>The more confident of deployments you are, the better your operations become because the likelihood of failure caused by the deployment should be lower ideally. Without CD pipeline, you don&#8217;t know what would happen after deployment.</p><h2>What does deployable mean?</h2><p>But, what does <strong>deployable </strong>mean? If the new code is built into a new Docker image automatically, is it deployable? No. The artifacts must be verified deeply to make it deployable.</p><p>Actually, preparing such deployment artifacts is one of <em>Continuous Integration a.k.a. CI</em> process. It is usually triggered by code merge and builds the artifacts as well as runs unit tests to ensure the new code works as expected.</p><p>However, that doesn&#8217;t automatically mean it&#8217;s deployable to production. Unit test can only verify the code without integrations. It is useful to test business logic implementations but typically omits interactions with unmanaged dependencies e.g. other microservices.</p><p>Before production deployments, such integrations must be also verified to capture any failures caused by these interactions. Therefore, CD pipeline would have automatic deployment process to pre-production environments like staging and run integrations tests there, for example. Once all the integration tests pass, you have better confidence of the new artifacts when deploying to production. This means the new code is deployable.</p><h2>Summary</h2><p>Continuous Delivery a.k.a. CD is the center of operations because it ensures the new code is deployable to production automatically. Continuous Integration a.k.a. CI isn&#8217;t sufficient to make the new code deployable because it usually run only unit tests. To make it deployable, CD pipeline would run integrations tests by using the new artifacts built by CI process.</p><p>We&#8217;ll keep talking about Continuous Delivery in the following newsletters. Subscribe this newsletter from the button below:</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://magazine.opsbr.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://magazine.opsbr.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>