<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Resilience on Aayush Bajaj's Augmenting Infrastructure</title><link>https://abaj.ai/tags/resilience/</link><description>Recent content in Resilience on Aayush Bajaj's Augmenting Infrastructure</description><generator>Hugo</generator><language>en</language><copyright>© 2026 Aayush Bajaj</copyright><lastBuildDate>Fri, 10 Jul 2026 08:20:16 +1000</lastBuildDate><atom:link href="https://abaj.ai/tags/resilience/index.xml" rel="self" type="application/rss+xml"/><item><title>Microservices</title><link>https://abaj.ai/wiki/se/architecture-design/microservices/</link><pubDate>Thu, 09 Jul 2026 21:02:56 +1000</pubDate><guid>https://abaj.ai/wiki/se/architecture-design/microservices/</guid><description>&lt;p>a microservice architecture decomposes one application into many independently deployable services, each owning its own data, talking over a network. the honest framing: you are trading a &lt;em>code&lt;/em> organisation problem for a &lt;em>distributed systems&lt;/em> problem.&lt;span class="margin-note" data-note="fowler&amp;#39;s original essay remains the best single description: martinfowler.com/articles/microservices.html">
 &lt;span class="margin-note-indicator">𐃏&lt;/span>
&lt;/span>

that trade is sometimes worth it. it is not worth it nearly as often as conference talks suggest.&lt;/p>
&lt;h2 id="the-trade-not-the-hype">the trade, not the hype&lt;a href="#the-trade-not-the-hype" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;h3 id="what-you-actually-buy">what you actually buy&lt;a href="#what-you-actually-buy" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>independent deployment&lt;/strong>: team a ships without waiting for team b&amp;rsquo;s release train. this is the real prize — everything else is secondary.&lt;/li>
&lt;li>&lt;strong>independent scaling&lt;/strong>: scale the search service to 40 replicas while billing idles on 2.&lt;/li>
&lt;li>&lt;strong>fault isolation&lt;/strong>: a memory leak in recommendations does not take down checkout — &lt;em>if&lt;/em> you also build the resilience machinery below. isolation is earned, not free.&lt;/li>
&lt;li>&lt;strong>technology heterogeneity&lt;/strong>: the ml service can be python while the ledger is jvm. (also a curse: n stacks to patch.)&lt;/li>
&lt;li>&lt;strong>organisational scaling&lt;/strong>: conway&amp;rsquo;s law working for you — service boundaries that mirror team boundaries let teams own code end to end.&lt;/li>
&lt;/ul>
&lt;h3 id="what-you-actually-pay">what you actually pay&lt;a href="#what-you-actually-pay" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>every in-process function call that crosses a new service boundary becomes a network call: it can now fail independently, time out, arrive twice, or arrive late.&lt;/li>
&lt;li>transactions that were a single &lt;code>BEGIN...COMMIT&lt;/code> become sagas (below) — you give up atomicity across boundaries and must design compensation by hand.&lt;/li>
&lt;li>refactoring across service boundaries is an order of magnitude harder than moving code between modules — the boundary is now an api contract with independent release cadences (Fowler, Martin, 2018).&lt;/li>
&lt;li>operational surface explodes: per-service ci, dashboards, alerts, on-call, versioned contracts, backwards-compatible migrations.&lt;/li>
&lt;/ul>
&lt;h3 id="when-a-modular-monolith-wins">when a modular monolith wins&lt;a href="#when-a-modular-monolith-wins" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h3>
&lt;ul>
&lt;li>a &lt;strong>modular monolith&lt;/strong> — one deployable, strictly enforced internal module boundaries, one database with schema-per-module discipline — captures most of the design benefit at a fraction of the operational cost.&lt;/li>
&lt;li>you get cheap refactoring while the domain boundaries are still wrong (they always start wrong), real stack traces, local transactions, and one thing to deploy.&lt;/li>
&lt;li>the sane migration path is monolith-first: find the boundaries by living with them in-process, then extract the one or two services that genuinely need independent deployment or scaling — the &lt;em>strangler fig&lt;/em> approach of routing traffic incrementally to extracted pieces.&lt;span class="margin-note" data-note="martinfowler.com/bliki/MonolithFirst.html and /bliki/StranglerFigApplication.html">
 &lt;span class="margin-note-indicator">𐃏&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>rule of thumb: if one team can hold the whole system in its head and deploys are not blocked on other teams, microservices solve a problem you do not have.&lt;/li>
&lt;/ul>
&lt;figure class="tikz-figure lateximage">
 &lt;script type="text/tikz"
 >
 
\usepackage{xcolor}
\usetikzlibrary{positioning,calc,arrows.meta,fit}
\begin{document}
\begin{tikzpicture}[font=\small, >={Stealth[length=4pt]},
 mod/.style={draw, rounded corners=1pt, fill=blue!12, minimum width=1.9cm, minimum height=0.7cm},
 svc/.style={draw, rounded corners=1pt, fill=green!15, minimum width=1.9cm, minimum height=0.7cm},
 db/.style={draw, fill=orange!20, minimum width=1.1cm, minimum height=0.55cm, rounded corners=3pt}]
% ---- monolith ----
\node[mod] (m1) at (0,0) {orders};
\node[mod, below=0.25 of m1] (m2) {payments};
\node[mod, below=0.25 of m2] (m3) {inventory};
\node[draw, thick, fit=(m1)(m3), inner sep=8pt, label=above:{\bfseries monolith}] (mono) {};
\node[db, below=0.55 of mono] (mdb) {one db};
\draw[->] (mono) -- (mdb);
% ---- microservices ----
\node[svc] (s1) at (6.4,0) {orders};
\node[svc, right=0.5 of s1] (s2) {payments};
\node[svc, right=0.5 of s2] (s3) {inventory};
\node[db, below=0.55 of s1] (d1) {db};
\node[db, below=0.55 of s2] (d2) {db};
\node[db, below=0.55 of s3] (d3) {db};
\draw[->] (s1) -- (d1); \draw[->] (s2) -- (d2); \draw[->] (s3) -- (d3);
\node[draw, fill=gray!15, rounded corners=1pt, minimum width=6.2cm, minimum height=0.55cm, above=0.8 of s2] (gw) {api gateway};
\draw[->] (gw.south -| s1) -- (s1);
\draw[->] (gw) -- (s2);
\draw[->] (gw.south -| s3) -- (s3);
\draw[&lt;->, dashed, red!70!black] (s1) -- node[above, font=\scriptsize] {network} (s2);
\draw[&lt;->, dashed, red!70!black] (s2) -- node[above, font=\scriptsize] {network} (s3);
\node[font=\bfseries] at (8.3,1.9) {microservices};
\end{tikzpicture}
\end{document}

 &lt;/script>
 &lt;figcaption>the same domain twice: one deployable with internal modules and one database, versus independently deployable services each owning its own store, fronted by a gateway.&lt;/figcaption>
&lt;/figure>

&lt;h2 id="decomposing-a-system">decomposing a system&lt;a href="#decomposing-a-system" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h2>
&lt;h3 id="bounded-contexts--ddd-lite">bounded contexts (ddd-lite)&lt;a href="#bounded-contexts--ddd-lite" class="post-heading__anchor" aria-hidden="true">#&lt;/a>
&lt;/h3>
&lt;p>the useful sliver of domain-driven design:&lt;/p></description></item></channel></rss>