<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yagyesh Tripathi on Medium]]></title>
        <description><![CDATA[Stories by Yagyesh Tripathi on Medium]]></description>
        <link>https://medium.com/@ytripathi.10.98?source=rss-9ecd9d0f2c6c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*q_vrxBOVVGeMZRycBYIQrA.jpeg</url>
            <title>Stories by Yagyesh Tripathi on Medium</title>
            <link>https://medium.com/@ytripathi.10.98?source=rss-9ecd9d0f2c6c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:55:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ytripathi.10.98/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Stripe and Amazon Taught Me About Idempotency]]></title>
            <link>https://medium.com/@ytripathi.10.98/what-stripe-and-amazon-taught-me-about-idempotency-79eb35749e79?source=rss-9ecd9d0f2c6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/79eb35749e79</guid>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[idempotency]]></category>
            <category><![CDATA[stripe]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Yagyesh Tripathi]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 01:15:24 GMT</pubDate>
            <atom:updated>2026-10-20T01:17:02.634Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQAwz9LT02WDfD_GKgRDNw.png" /></figure><p><em>Retries are the first thing we reach for in a distributed system and the fastest way to charge a customer twice. A few evenings of reading rewired how I think about doing them safely.</em></p><h3>How I Fell Into This</h3><p>Retries are the duct tape of distributed systems. A call fails, you try again and most of the time the second attempt sails through because most failures are transient a blip in the network, a load balancer hiccup, a node that was busy for a moment. Retrying is often the single highest-leverage thing a client can do for its own reliability.</p><p>But there’s a quiet catch that took me a while to fully respect: <strong>a retry is only safe if trying again does no additional harm.</strong> The moment a call has a <em>side effect, </em>charges a card, ships an order, decrements inventory a retry stops being free insurance and becomes a way to do the thing twice. And in a distributed system you frequently <em>cannot tell</em> whether the first attempt actually worked. The response never came back. So you’re stuck choosing between two bad options: retry and risk a double side effect, or don’t retry and risk losing the operation entirely.</p><p>The way out of that dilemma has a name <strong>idempotency</strong> and I went reading to understand it properly. The three pieces that shaped this were the AWS Builders’ Library’s <em>Making retries safe with idempotent APIs</em>, Stripe’s <em>Designing robust and predictable APIs with idempotency</em> and the AWS Well-Architected pillar’s <em>REL04: make mutating operations idempotent</em>. What follows is my synthesis of those, plus what I’ve seen in practice.</p><p>One honest note up front: the three sources come at this from slightly different altitudes. Stripe frames it largely around HTTP client-server APIs the AWS pieces think in terms of service-to-service calls and workflows. The core idea is identical and I’ll flag where the framing shifts.</p><h3>Why Retries Are Both the Cure and the Disease</h3><p>Start with the simplest possible picture one client calling one server and count the places it can break:</p><pre>Client ───(1)──▶ Server ───(2)──▶ [does the work] ───(3)──▶ Client<br>        request              side effect happens              response</pre><pre>  (1) connection fails      → request never arrives   → nothing happened<br>  (2) fails mid-work        → maybe half-done?         → unknown<br>  (3) breaks before reply   → work DONE, reply lost    → client thinks it failed</pre><p>Failure (1) is harmless to retry nothing happened. Failure (3) is the dangerous one: <strong>the work completed, but the client never heard back.</strong> From the client’s side, (1) and (3) look <em>identical</em> both are “I got no response.” So a client that blindly retries will, in case (3), ask the server to do the whole thing a second time.</p><p>Sometimes you get lucky and the failure comes with an error code that tells you what happened. Often you don’t. That uncertainty <em>“I don’t know if it worked”</em> is the real enemy. Idempotency is how you make it safe to act under that uncertainty.</p><h3>What “Idempotent” Actually Means</h3><p>An <strong>idempotent</strong> operation is one where making the same call twice has the <strong>same effect as making it once</strong> no additional side effects. Call it once, call it a hundred times: one charge, one order, one row.</p><p>There’s a clean way to frame <em>why</em> this is hard. In a distributed system, <strong>at-most-once</strong> (send a single request, never retry) and <strong>at-least-once</strong> (keep retrying until you get confirmation) are both straightforward to build. The genuinely difficult guarantee is <strong>exactly-once</strong> many identical requests, one effect and idempotency is precisely how you get exactly-once behavior on top of cheap at-least-once retries.</p><p>HTTP already bakes this in for some verbs. By its semantics, <strong>PUT and </strong><strong>DELETE are idempotent</strong> - setting a resource to a value, or deleting it, lands in the same final state no matter how many times you repeat it. GET is idempotent too (it&#39;s just a read).</p><p>The trouble is the operations that <em>aren’t</em> naturally idempotent and they’re often the most important ones. <strong>A “charge this card” API is the canonical example.</strong> Call it twice and you’ve charged the customer twice. There’s no HTTP verb that saves you here you have to build the idempotency yourself.</p><blockquote><em>The goal, stated plainly: </em><strong><em>the server may be called many times, but the side effect happens exactly once.</em></strong></blockquote><h3>The Naive Fix — and Why It Isn’t Enough</h3><p>The first instinct is to detect duplicates by looking at the request itself hash the request parameters, remember the hash and if you see the same hash again, treat it as a repeat.</p><p>It’s a tempting shortcut and it’s fast to check. But it quietly encodes a wrong assumption: <strong>that identical-looking requests must be duplicates.</strong> They aren’t always. Two genuinely separate “transfer $20 to Yagyesh” requests, a minute apart, are <em>supposed</em> to happen twice. A content hash can’t tell an intentional repeat from an accidental one so it will happily swallow a legitimate second operation.</p><p>The fix is to stop inferring intent and start letting the client <em>declare</em> it.</p><h3>The Idempotency Key</h3><p>The robust answer is a <strong>client-generated, unique request identifier </strong>an <strong>idempotency key</strong> (or idempotency token). Before making the request, the client mints a unique ID for <em>this specific operation</em> and sends it along with the payload. The server correlates that key with its own state:</p><pre>Client                              Server<br>    │  generate key = &quot;abc-123&quot;         │<br>    ├── POST /charge  (key: abc-123) ──▶│<br>    │                                   ├─ seen &quot;abc-123&quot; before?<br>    │                                   │     NO  → do the work,<br>    │                                   │           store (key → result),<br>    │                                   │           return result<br>    │                                   │     YES → skip the work,<br>    │                                   │           return the STORED result<br>    │◀────────────── response ──────────┤</pre><p>Now the two “transfer $20” requests carry <em>different</em> keys, so they both run while a retry of the <em>same</em> operation reuses the <em>same</em> key, so the server recognizes it and doesn’t do the work twice. Intent is explicit, not guessed.</p><h3>The Atomicity Trap</h3><p>Here’s the quiet part that separates a correct implementation from a subtly-broken one: <strong>storing the idempotency key and recording that the work completed must happen together, atomically.</strong></p><p>If you do the work, then crash <em>before</em> saving the key, a retry will re-run the whole thing that means you’ve charged twice. If you save the key first and crash before doing the work, a retry sees the key, assumes it’s done and returns success for something that never happened which is a <em>lost</em> operation.</p><p>So the “did the work” state and the “saw this key” record have to commit as <strong>one ACID transaction</strong> which is either both or neither. This is why idempotency implementations gravitate toward a transactional store (a relational DB or DynamoDB with a conditional write) for the key-and-status record, you need the guarantee that the side effect and its book keeping are inseparable.</p><h3>When the Network Dies Mid-Response</h3><p>Now the case that actually motivates all of this. A client sends a request with key abc-123. The server does the work perfectly and then the network drops the response on the floor. The client, still showing “pending” does the sensible thing and retries with the same key abc-123.</p><p>A naive server sees the key already exists and returns an error like <strong>RAE - Resource Already Exists.</strong></p><p>And technically that’s… correct? But think about it from the caller’s seat. They asked to do a thing and they got back an <em>error</em>. They can’t easily tell “this failed” from “this already succeeded, you’re fine.” That ambiguity can push them down a totally different code path surfacing a scary error to a user, or worse, trying to “fix” a state that was never broken.</p><p>The better behavior is <strong>semantic equivalence,</strong> for the same idempotency key within a short window, the server returns a response that is <em>semantically the same</em> as the original and ideally the original success response itself. The retry should feel to the client exactly like the first call would have if the network hadn’t hiccuped.</p><blockquote><em>A retry of a succeeded operation should return </em><strong><em>the original success</em></strong><em>, not a new error. Consistency is kinder than technical correctness.</em></blockquote><h3>Late Arrivals and the Principle of Least Astonishment</h3><p>There’s a subtler edge: the <em>late</em> retry. A client retries but the request is delayed and in the meantime the world moves on. Lets take an example where a client retries a RunInstances call while, in the interim <em>another</em> actor terminates the very instance the original request created. The delayed retry finally lands. What should the server return?</p><p>AWS’s has an amazing way to answer this which is to <strong>honor the original idempotent contract anyway</strong> which is to return a response semantically equivalent to the first one (now reflecting the terminated state) rather than something jarring. This is the <strong>principle of least astonishment</strong>: give the caller the least surprising, most consistent experience, even when the underlying state has shifted underneath them.</p><p>The flip side is retention. You can’t remember every idempotency token <em>forever</em> indefinite retention costs storage and, worse, risks some future request colliding with a long-dead token. So retention is deliberately bounded. <strong>How long you keep tokens is a real design decision</strong>, usually enforced with a TTL.</p><h3>Same Key, Different Intent</h3><p>What happens if a request arrives with an idempotency key you’ve <em>seen before</em> but the parameters are <strong>different</strong> this time? Same key, different payload.</p><p>The safest assumption is that the caller intended something different (or made a mistake). So rather than silently returning the old result, or blindly doing the new thing, the service returns a <strong>validation error flagging the parameter mismatch.</strong> To do that, it has to store the <em>original request’s parameters</em> alongside the token, so it can compare on the retry. A little extra book keeping turns a potential silent-wrong-result into a loud, honest error.</p><h3>Planning for Failure</h3><p>Stripe’s write-up frames the same ideas around HTTP APIs and it’s worth borrowing their three-part discipline for how a well-behaved client and server split the work:</p><ul><li><strong>Handle errors consistently : </strong>retries should be triggered by the <em>client</em>, deliberately, not scattered implicitly through every layer.</li><li><strong>Handle failures safely</strong> : use idempotency keys so those retries can’t double-apply.</li><li><strong>Handle failures responsibly</strong> : space the retries out with <strong>exponential backoff and jitter</strong>, so a struggling server doesn’t get a synchronized stampede.</li></ul><p>That last one is the bridge back to plain retry hygiene idempotency makes a retry <em>safe to repeat</em> backoff-with-jitter makes the <em>timing</em> of those repeats survivable for the server. You want both.</p><h3>The Well-Architected Checklist: Anti-Patterns and Steps</h3><p>The AWS has given a checklist for anti-patterns and I liked how objective they are and I am quoting those here for everyone’s info</p><p><strong>Anti-patterns to avoid:</strong></p><ul><li><strong>Using a timestamp as the idempotency key.</strong> Timestamps aren’t unique and aren’t stable across retries two attempts of the same operation will carry different times and be treated as different requests.</li><li><strong>Storing the entire request payload for idempotency.</strong> That’s the content-hash trap again, heavy and it conflates “looks the same” with “is the same operation.”</li><li><strong>Generating keys inconsistently across services.</strong> If each hop invents its own scheme, nobody downstream can reliably recognize a duplicate.</li></ul><p><strong>Implementation steps:</strong></p><ol><li><strong>Identify the idempotent steps, </strong>the mutating ones. Read-only steps don’t need this don’t over-engineer them.</li><li><strong>Require a unique token from the sender.</strong> The client generates and provides the key on every request a UUID, <em>never</em> a timestamp (timestamps collide and drift with clock skew).</li><li><strong>Maintain per-operation state.</strong> Track each operation’s status so you can distinguish new from repeat.</li><li><strong>Store that state atomically and consistently.</strong> DynamoDB (with conditional writes) is a common fit for the key-and-status record and set a <strong>TTL</strong> so old tokens expire on their own instead of the store growing forever. (ElastiCache, RDS and S3 all work too pick for your volume and latency needs.)</li><li><strong>Propagate the same token downstream.</strong> The key you received should travel to the services <em>you</em> call and every downstream service should maintain its own idempotency (response stored against the key) so the whole chain is safe to retry, not just the front door.</li><li><strong>Document which operations are idempotent</strong> and how clients should interact with them. Idempotency only helps if callers know it exists and how to use it.</li></ol><p>That fifth step is the one I’d underline: <strong>idempotency is a property of the whole call chain, not just your edge.</strong> A retry that’s safe at the front door but re-applies three hops deep hasn’t actually solved anything.</p><p>And it isn’t only about request/response APIs. <strong>Event-driven systems make idempotency mandatory</strong>, because message queues like Amazon SQS, Kinesis and Kafka typically guarantee <em>at-least-once</em> delivery i.e. the same message can legitimately arrive more than once. The pattern is identical the publisher stamps each message with an idempotency token and every consumer tracks the tokens it has already processed and simply ignores duplicates. If your architecture is queue-driven, idempotent consumers aren’t a nice-to-have, they’re the price of admission.</p><h3>The Lessons I’m Taking With Me</h3><p>The first is that <strong>retries and idempotency are a package deal.</strong> Adding retries without idempotency to any mutating operation isn’t resilience it’s a duplicate-side-effect generator waiting for a bad network day. If you’re going to retry, make the target safe to retry first.</p><p>The second is that <strong>the client should declare identity, not the server infer it.</strong> A client-generated idempotency key beats any server-side hashing heuristic, because only the client knows whether this is a fresh operation or a repeat of a previous one.</p><p>The third is that <strong>the key and the result must be stored atomically.</strong> The whole guarantee collapses if you can crash between doing the work and remembering that you did it. One transaction, both or neither.</p><p>The fourth is that <strong>consistency beats correctness when a caller is confused.</strong> Returning the original success on a retried, already-completed request is kinder and safer than returning a technically-true “already exists” error that sends the caller down a strange path.</p><p>And the fifth is that <strong>idempotency has to run the length of the chain.</strong> Generate the token once, propagate it everywhere and make every mutating hop honor it. Safety at the edge alone is an illusion.</p><h3>Closing Thought</h3><p>Idempotency isn’t a glamorous feature. Nobody demos it. But it’s the quiet property that lets every <em>other</em> resilience technique retries, backoff, failover, at-least-once deliveryactually be safe to use. Without it, “just retry” is a loaded gun pointed at your customers’ credit cards.</p><p>The mental shift I’m keeping is this, in a distributed system you will <em>never</em> be certain a call succeeded. You can’t engineer away the uncertainty the network will always find a way to drop a response. What you <em>can</em> do is make it so that acting under uncertainty costs you nothing. Build the operation so that trying again is always safe and the 3 AM question — <em>“did that actually go through?”</em>stops being scary. You just try again.</p><p><em>Sources I drew on directly: the AWS Builders’ Library’s </em><a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/"><em>Making retries safe with idempotent APIs</em></a><em> (Malcolm Featonby) Stripe’s </em><a href="https://stripe.com/blog/idempotency"><em>Designing robust and predictable APIs with idempotency</em></a><em> (Brandur Leach) and the AWS Well-Architected Framework’s </em><a href="https://docs.aws.amazon.com/wellarchitected/2025-02-25/framework/rel_prevent_interaction_failure_idempotent.html"><em>REL04-BP04 — Make mutating operations idempotent</em></a><em>. If you’ve built idempotency into a real system especially the atomicity, key-expiry and duplicate-message edge cases I’d genuinely love to hear how you handled them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79eb35749e79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Service That Doesn’t Wake You Up at 3AM]]></title>
            <link>https://medium.com/@ytripathi.10.98/how-to-build-a-service-that-doesnt-wake-you-up-at-3am-eab16abece8b?source=rss-9ecd9d0f2c6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/eab16abece8b</guid>
            <category><![CDATA[on-call]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[backend-engineering]]></category>
            <category><![CDATA[robust-services]]></category>
            <dc:creator><![CDATA[Yagyesh Tripathi]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 23:51:06 GMT</pubDate>
            <atom:updated>2026-09-07T15:04:26.806Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYTS_IOjQmd-pmkW2rMNyg.png" /></figure><p><em>A few evenings of reading engineering blogs quietly rewired how I think about services under load. Here’s what stuck.</em></p><h4>How I Fell Into This</h4><p>Every engineer who has carried a pager knows the specific texture of a 3 AM incident — the buzz that isn’t a text, the dashboard that’s gone entirely red, the slow realization that somewhere out there users are hitting errors and you’re the person who has to make it stop.</p><p>What sent me reading wasn’t one particular night. It was a nagging pattern I kept noticing: the outages that hurt most weren’t the ones where something obviously broke. They were the ones where demand quietly outran what the system was prepared to handle and none of our instincts — add more retries, add more capacity, add more logging — actually made things better. Some of them made things <em>worse</em>.</p><p>So I went through a handful of pieces that teams operating at serious scale have written about surviving load. The one I’d point anyone to first is the AWS Builder writing on <a href="https://builder.aws.com/content/3Ev17ZWA9QX88MmoaULAKevIR8H/resilience-lessons-from-the-lunch-rush">surviving a launch rush</a>. Alongside it I leaned on the Google SRE workbook’s <a href="https://sre.google/workbook/error-budget-policy/">error budget policy</a> and Uber Engineering’s writing on <a href="https://www.uber.com/us/en/blog/from-static-rate-limiting-to-intelligent-load-management/">intelligent load management</a>.</p><p>A quick, honest caveat before we go further: everything below is my synthesis of <em>public</em> engineering writing plus my own experience.</p><p>The question that kept circling was almost embarrassingly simple: <em>if well-run teams still build elaborate machinery just to say “no” gracefully, how painful must overload be when you haven’t?</em> Sitting with that question is what made everything click.</p><h3>Start With a Restaurant</h3><p>The easiest way to reason about a system under load is to stop thinking about servers and think about a restaurant on its busiest night. I’m borrowing this framing directly from the <a href="https://builder.aws.com/content/3Ev17ZWA9QX88MmoaULAKevIR8H/resilience-lessons-from-the-lunch-rush">launch-rush</a> writing and it earns its keep.</p><p>The rush arrives. Demand blows past the number of tables you can turn. A queue forms on the sidewalk.</p><pre>demand  &gt;  capacity<br>           │<br>           ▼<br>   ┌───────────────┐<br>   │  RESTAURANT   │  ← tables full<br>   └───────────────┘<br>           ▲<br>   😐😐😐😐😐😐😐  ← queue on the sidewalk</pre><p>That queue isn’t automatically a disaster — it’s a <em>signal</em>. What decides whether tonight becomes a legend or a catastrophe is whether the restaurant has strategies ready: turn tables faster, open another section, or at least walk the line and honestly say “it’s a 90-minute wait” so people can choose for themselves.</p><p>And here’s the part we forget as service owners: the customer’s own behavior shapes the outcome for everyone. Someone who sees the line and quietly goes next door just did the whole system a favor. A <strong>well-behaved customer </strong>doesn’t plant themselves in the doorway demanding a table <em>now</em> — they back off. Hold onto that person; they come back later wearing a service’s uniform.</p><p>A restaurant has one obvious constraint: seats. A distributed system rarely has just one. It might be CPU, memory, connection pools, database concurrency, downstream quotas, network bandwidth — or several of these at once. And unlike restaurant seats, these limits can be reached at different times and fail in very different ways.</p><p>So the restaurant is a great intuition pump, but a terrible blueprint.</p><p><strong>The first job is always to figure out where your system’s real constraint actually lives.</strong></p><h3>Why “Just Add Capacity” Quietly Breaks Down</h3><p>Here’s the thing that reframed the whole problem for me: genuine, unavoidable overload is <em>rare</em>. Systems that are planned well and keep the right buffers mostly don’t hit the physical wall. Most incidents aren’t “the universe said no” — they’re “a surge we could have anticipated met a system with no operational strategy for it.”</p><p>That’s a hopeful realization, because it means resilience isn’t mostly about heroic capacity. It’s about having the strategies in place before the rush arrives. Everything that follows is one of those strategies — and notice how few of them are “buy bigger machines.”</p><h3>Know Which Floor You’re On: Control Plane vs. Data Plane</h3><p>Before you can protect a system, you have to understand its anatomy and the single most useful split is control plane vs data plane.</p><p><em>The data plane is the hot path — the requests users make thousands of times a second.</em></p><p><em>The control plane is the machinery that configures, scales and manages the data plane.</em></p><p>Why does this matter for resilience? Because it tells you where to spend your protection budget. The data plane has to keep serving even when the control plane is having a terrible day and the two have genuinely different scaling and availability needs. The classic, avoidable outage is letting a control-plane hiccup reach out and knock over the data plane. Once you can see the two floors clearly, you know what to protect first: keep the hot path serving even when the back office is on fire.</p><h3>Load Shedding: Saying “No” So You Can Keep Saying “Yes”</h3><p>Load shedding is deliberately rejecting some work so the rest succeeds. It feels wrong the first time — you’re <em>intentionally</em> failing requests — but it’s the entire difference between graceful degradation and total collapse.</p><p>The clearest example is the cold-cache death spiral. Watch what happens to the traffic split:</p><pre>NORMAL                         CACHE GOES COLD<br>  ┌──────────┐                   ┌──────────┐<br>  │  80%     │──▶ cache ✅        │   0%     │──▶ cache<br>  │  20%     │──▶  DB   🙂        │  100%    │──▶  DB   🔥<br>  └──────────┘                   └──────────┘<br>   DB is comfortable              DB was never sized for this​</pre><p>On a normal day ~80% of requests are served from cache and only ~20% fall through to the database, which barely notices. Then the cache empties — a deploy, a flush, doesn’t matter which — and in an instant the ratio flips: 0% hitting the cache, 100% slamming a database that was never sized for it. It buckles. And because the DB is down, nothing can repopulate the cache, so every new request keeps going straight to the drowning database. A perfect, self-sustaining spiral. That’s the page.</p><p>Load shedding breaks the spiral. When you detect the database saturating, you shed just enough traffic to keep it <em>alive</em> — alive long enough for the cache to warm back up and the ratio to heal itself.</p><blockquote><em>A partial outage you control beats a total outage you don’t. Saying “no” to some requests is how you keep saying “yes” to most of them.</em></blockquote><h3>Be the Client Who Walks Next Door</h3><p>Remember the restaurant customer who saw the line and left? Here’s where they come back.</p><p>Every service is somebody’s client. When <em>your</em> service calls <em>another</em> service, <em>you</em> are the customer at the door — and how you behave decides whether the place stays open, which matters enormously when it’s a place you depend on.</p><p>Two things separate a well-behaved client from a menace.</p><ul><li><strong>Circuit breakers:</strong> When a dependency is clearly struggling, <em>stop hammering it.</em> A circuit breaker trips after repeated failures and fails fast for a while, giving the downstream room to recover instead of drowning it in retries. It’s the client version of noticing the line and walking away.</li><li><strong>Educated retries:</strong> Not all retries are equal — and naive retries are one of the most effective ways I know to turn a small blip into a full outage. That deserves its own section, because it’s the mistake I’ve seen bite the most people — and not just juniors. I’ve watched genuinely senior engineers get this one wrong, reaching for an aggressive retry loop that quietly converts a two-second hiccup into a full-blown outage.</li></ul><h3>Timeouts, Retries and the Counterintuitive Magic of Jitter</h3><p>When one service calls another, failures happen for many reasons: the server, the network, load balancers or simply a bad input request. So the <em>first</em> discipline is error classification — a good, high-quality error tells you whether a retry could even help. Retrying a malformed input forever is pointless; retrying a transient network blink is reasonable. Read the error before you throw another request at it. Even a coarse split into <em>Retryable</em> and <em>Non-Retryable</em> exception types is a great place to start — it costs almost nothing to add and immediately stops you from hammering a dependency with requests that were never going to succeed.</p><p>From there, a few principles consistently pay off:</p><ul><li>If you host the service, put timeouts on your own side, per client. Don’t wait forever for a slow caller or a slow dependency — a hung request is squatting on resources other requests desperately need.</li><li>Retries are inherently selfish. Every client retrying “just to be safe” is individually rational and collectively catastrophic. During an incident, retries are frequently what <em>cause</em> the pile-up.</li><li>Use exponential backoff. After each failure, wait longer before trying again, giving a struggling dependency progressively more room.</li><li>Add jitter. This is the counterintuitive one. If every client backs off by the exact same interval, they all retry <em>at the same instant</em> — you’ve just rebuilt the stampede on a timer.</li></ul><p>Jitter smears the retries across time so they arrive a few at a time. It looks like you’re adding chaos on purpose. You are — and there’s solid math and real production data behind it, showing it genuinely works.</p><blockquote><em>Backoff decides </em>how long<em> you wait. Jitter makes sure you don’t all wait the </em>same<em> long.</em></blockquote><h3>Why SRE Matters: The Error Budget</h3><p>Everything above is engineering. This next idea is what keeps the engineering <em>honest</em> — and it’s a big part of why serious organizations invest in a dedicated Site Reliability Engineering (SRE) function at all: you want people whose explicit job is to defend reliability when the pressure to ship would otherwise always win. Google more or less invented the discipline and wrote the book on it and they’re <em>so</em> good at this precisely because they turned reliability from an opinion into a measured, budgeted, enforceable thing. The sharpest tool to come out of that thinking is the error budget policy.</p><p>The math is almost insultingly simple:</p><pre>Error budget = 1 − SLO​</pre><p>A service with a 99.9% SLO gets a 0.1% error budget — that’s your allowance to fail, which means if the service takes a million requests in X weeks, a 99.9% target means a budget of 1,000 errors to spend over that window. The goal stops being the impossible “never break” and becomes the manageable “break no more than <em>this much</em>,” which is something you can actually steer by.</p><p><em>(Quick acronym aside, because these get muddled:</em></p><ul><li><em>an SLA is the promise made to customers, often with penalties;</em></li><li><em>an SLO is the stricter internal target the team engineers toward;</em></li><li><em>an SLI is the number actually measured.</em></li></ul><p><em>Error budgets are built on the SLO — deliberately — so a team reacts well before it would ever breach a customer-facing SLA.)</em></p><p>The mindset shift at the heart of the practice is this: an error budget policy is not a punishment for missing your SLO. Halting feature work is genuinely undesirable — nobody enjoys it. But the policy gives the team <em>permission</em> to stop and pour energy into reliability <em>when the data says reliability now matters more than the next feature.</em> It replaces an unwinnable argument with a number.</p><p>And there’s a reason the freeze targets <em>releases</em> specifically: changes are the single biggest source of instability — the SRE findings at Google pegs them at roughly 70% of outages. Feature development and stability work compete for the same hands and the error budget is the control that decides, with data, which one wins this week.</p><p>A representative SLO-miss policy looks like:</p><ul><li>Meeting your SLO? Releases proceed as normal.</li><li>Blown the error budget over the last X weeks? Halt all new releases except P0 bug fixes and security fixes and enter a reliability phase.</li></ul><p>One important subtlety: missing your SLO doesn’t automatically freeze feature work — it depends on what caused the miss. If a bug or a bad process in your own service burned the budget, you stop and fix reliability. But if something you didn’t control drained it — a company-wide network outage, a dependency owned by another team, or out-of-scope load tests — you can keep shipping. The cause drives the response, not the miss itself.</p><p>And during a genuine reliability phase, the work is concrete rather than vague hand-wringing:</p><ul><li>Fix the code and process bugs that burned the budget.</li><li>Check whether miscategorized errors are eating the budget unfairly — sometimes you’re “failing” because of a bad metric, not a bad service.</li><li>If the pain comes from a downstream dependency, open a ticket to <em>them</em> and ask for SRE planning. The budget conversation follows the dependency chain.</li></ul><p>There’s usually an outage policy riding along too: if a single incident burns more than ~20% of the error budget inside an X-week window, a postmortem (RCA) becomes mandatory — and it must carry at least one P0 action item to fix the root cause. None of it is “if we get around to it.”</p><p>The magic isn’t the specific numbers, which you should tune. It’s that reliability becomes data-driven instead of vibes-driven. No more tug-of-war between “ship the feature” and “fix reliability.” The budget decides.</p><h3>Intelligent Load Management: What Uber’s Writing Taught Me</h3><p>The most technical piece I read was Uber Engineering’s writing on <a href="https://www.uber.com/us/en/blog/from-static-rate-limiting-to-intelligent-load-management/">intelligent load management</a>. It’s written specifically for their in-house databases — but I found it to be remarkably general, full of beautiful lessons that carry straight over to almost any service you own. Don’t let the database framing put you off.</p><p>Why static quotas quietly break down. The intuitive approach is a quota system: give each request a cost in bytes and start returning 429 (Too Many Requests) once a caller crosses its threshold. Reasonable on a whiteboard. In production it fails in two ways:</p><ul><li>It requires storing per-caller state, which is painful for stateless services and becomes a single point of failure — you’ve added a protection mechanism that can take you down on its own.</li><li>It treats operations as equal when they emphatically aren’t. A targeted query and a monstrous full scan might cost the same “quota,” but the scan is orders of magnitude more compute-hungry. So the meter measures the wrong thing and enforcement becomes unreliable exactly when you need it most.</li></ul><blockquote><em>Lesson: overload management should live close to the real storage system — where the true cost of a piece of work is visible, not guessed at from a stateless edge.</em></blockquote><p>Finding the right overload signal. This is the heart of it: <em>what signal actually tells you you’re overloaded?</em> It depends entirely on your service and choosing it well is one of the most important decisions you’ll make. Raw QPS is too coarse — it sheds too early or too late because it ignores how heavy each request is. Uber’s answer, straight from Little’s Law, is:</p><pre>Concurrency = Throughput × Latency​</pre><p>…which means concurrency — the number of operations in flight — is the right signal. Not raw request count, not CPU alone. Concurrency rises both when more work arrives <em>and</em> when work slows down, so in a stateful system it maps almost directly to real resource pressure.</p><p>But — one signal is never quite enough. Concurrency misses the <em>skewed</em> failures: a low-QPS caller sending enormous write payloads or traffic all hammering one hot partition key while other shards sit idle. Uber’s fix was a set of small, node-local regulators — write-bytes, hot-partition-key, memory, goroutine count — that sit quietly and almost never fire, but catch the specific ways a system can drown <em>without</em> concurrency looking bad. The lesson generalizes: pick a primary signal, then add cheap guards for the failure modes it can’t see.</p><p>From there the queuing toolkit gets clever and each idea is worth talking about:</p><ul><li><strong>CoDel</strong> (Controlled Delay). Instead of watching queue depth (how many are waiting), watch the longest time a request has been stuck in the queue — genuinely smart work, borrowed from how networks fight buffer bloat. This favors responsiveness over volume — a deep queue draining fast is fine; a shallow queue where requests are wedged for seconds is a fire. Delay is the honest signal; depth is a liar.</li><li><strong>Separate queues per operation</strong>. Uber ran distinct queues for reads, writes and slow/background work (scans, deletes, replication). It’s written for database operations, but it maps cleanly onto any service <em>once you understand how your own APIs behave and what they cost in compute</em> — don’t make a light point-lookup wait behind a giant scan; isolate them so a flood of slow work can’t starve the fast work.</li><li><strong>Adaptive discipline</strong> — not always FIFO. This one looks completely absurd and unfair at first glance — but it makes total sense once you sit with it. Normally first-in-first-out is fair. But when queueDelay &gt; CoDelThreshold — when you’re genuinely underwater — switch to LIFO, Healthy: FIFO → serve oldest first (fair) Overload: LIFO → serve newest first (the oldest have likely already timed out client-side, so newest still has a shot)</li></ul><p>It sounds unfair, but under real overload the oldest requests have probably already timed out on the caller’s side anyway. Serving the <em>newest</em> ones means at least <em>those</em> still succeed, instead of everyone failing together.</p><p>Fairness is a separate problem from overload. There are two distinct failures here and you need a mechanism for each. <em>System-wide</em> overload calls for shedding by priority. But a <em>single noisy tenant</em> hogging shared resources — without tripping any global alarm — calls for per-tenant concurrency limits that work independently of overall load.</p><p>One more refinement is worth considering and it’s simple in principle: plain CoDel treats every request as equal, so under load it will drop a critical, user-facing request just as readily as a background aggregation job. The fix is to add priority as a parameter. Tag each request with how important it is and when you’re forced to shed, drop the least important traffic first — so your most important clients keep getting served even while the system is turning work away.</p><h3>The Lessons I’m Taking With Me</h3><ul><li>The first is that prioritization is everything. When you can’t serve everyone, serving the <em>right</em> requests is the whole difference between graceful degradation and a smoking crater. <em>A system with no notion of priority has already decided to fail indiscriminately</em>.</li><li>The second is to fail fast — don’t queue requests up. A clean rejection the caller can react to is far kinder than a request that hangs, hoards resources and times out anyway. Queuing feels polite; under load it’s how you convert one slow dependency into a system-wide stall.</li><li>The third is that control belongs close to the source of truth. Overload management sitting next to the real storage and compute — where the true cost of work is visible — beats a stateless edge that has to guess every time.</li><li>And the fourth, the one I keep circling back to, is that good visibility is what makes all of it possible. You can’t shed load, trip a breaker, or spend an error budget wisely if you can’t <em>see</em> what’s being shed, why and at what cost. (I went deeper on operational visibility in my <a href="https://medium.com/@ytripathi.10.98/what-netflix-and-uber-taught-me-about-observability-in-asynchronous-systems-a10f5fb7d076/">last article</a>)</li></ul><h3>Closing Thought</h3><p>None of these techniques are exotic. Load shedding, backoff with jitter, error budgets, delay-based queuing — these are decades-old ideas and every source I have read is really just a careful application of them to one team’s reality.</p><p>What decides your night isn’t cleverness. It’s whether you put them in place <em>before</em> the rush, while you’re calm and awake and thinking clearly. The strategies you skip today are precisely the ones you’ll be reinventing, half-asleep, at 3:07 AM — under the worst possible conditions to be designing anything.</p><p>Build them while you’re awake. Then sleep through the rush.</p><p><em>Sources I drew on directly: the AWS Builder writing on surviving a launch rush; the </em><a href="https://sre.google/workbook/error-budget-policy/"><em>Google SRE workbook’s error budget policy</em></a><em>; and Uber Engineering’s </em><a href="https://www.uber.com/in/en/blog/from-static-rate-limiting-to-intelligent-load-management/"><em>How Uber Conquered Database Overload: The Journey from Static Rate-Limiting to Intelligent Load Management</em></a><em>. If you want to go deeper: the Google SRE Book chapter on </em><a href="https://sre.google/sre-book/handling-overload/"><em>Handling Overload</em></a><em> and the original </em><a href="https://queue.acm.org/detail.cfm?id=2209336"><em>Controlling Queue Delay (CoDel)</em></a><em> paper that Uber’s queuing work is built on.</em></p><p><em>If you operate services under real launch pressure and have war stories — especially about the load shedding you wish you’d added on day one — I’d genuinely love to hear them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eab16abece8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Netflix and Uber Taught Me About Observability in Asynchronous Systems]]></title>
            <link>https://medium.com/@ytripathi.10.98/what-netflix-and-uber-taught-me-about-observability-in-asynchronous-systems-a10f5fb7d076?source=rss-9ecd9d0f2c6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10f5fb7d076</guid>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[faang]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Yagyesh Tripathi]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 22:11:29 GMT</pubDate>
            <atom:updated>2026-06-19T22:28:15.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2PE7dRtjf1jtLgGj0Ge7g.png" /></figure><p><em>A few weeks of reading engineering blogs quietly rewired how I think about debugging distributed systems. Here’s what stuck.</em></p><h3>How I Fell Into This</h3><p>It started, like most of my rabbit holes do, with an incident I couldn’t explain.</p><p>A workflow in one of our services had “succeeded,” according to every dashboard we owned. CPU was flat. Memory was fine. Error rates were boringly green. And yet a downstream team was paging us because the thing the workflow was <em>supposed</em> to produce had never shown up. Somewhere between the service that kicked it off, the Kafka topic in the middle, and the consumer three hops away, the work had simply… evaporated. No alarm fired, because no single component had failed. The <em>workflow</em> had failed, and none of our tooling had an opinion about workflows.</p><p>That nagging feeling — <em>we have so much telemetry and still can’t answer a basic question</em> — sent me reading. I spent the next few weeks going through engineering blogs from teams that operate asynchronous systems at a scale most of us will never touch. The one I’d point anyone to first is Netflix’s <a href="https://netflixtechblog.com/achieving-observability-in-async-workflows-cd89b923c784">Achieving Observability in Async Workflows</a>. On the Uber side I leaned on their <a href="https://www.infoq.com/presentations/stream-pipeline-observability/">Stream Pipeline Observability talk</a>, the <a href="https://www.uber.com/in/en/blog/datacentral-ubers-observability-and-chargeback-platform/">Datacentral writeup</a>, and <a href="https://www.uber.com/us/en/blog/from-monitoring-to-observability-cloud-native/">From Monitoring to Observability in Cloud Native Systems</a>.</p><p>A quick, honest caveat before we go further: everything below is my synthesis of <em>public</em> engineering writing plus my own experience. Netflix and Uber run internal platforms — names like Cosmos and Nirvana come up in their media-workflow context, and Datacentral on Uber’s side — but the deep internals of those systems aren’t fully public. So when I describe how something works inside one of these companies, read it as <em>“this is the pattern the public material strongly implies,”</em> not as gospel from their source code. I’ll flag the especially inferred bits as we go.</p><p>The question that kept circling in my head was almost embarrassingly simple: <em>if Netflix felt the need to build an entire observability platform for async workflows, how painful must this problem have been before that platform existed?</em> Sitting with that question is what made everything click.</p><h3>Why Traditional Monitoring Quietly Breaks Down</h3><p>Here’s the request we all cut our teeth on:</p><pre>Client ──▶ Service ──▶ Database</pre><p>Debugging this is almost muscle memory. One request comes in, one response goes out, the whole thing lives and dies in a few hundred milliseconds. When it breaks, you grep logs by request ID, open the trace, find the slow span or the stack trace, and you’re done. The request is a tidy little unit with a beginning, a middle, and an end, and all of our tools — logs, metrics, traces — are built around that tidiness.</p><p>Traditional monitoring is fundamentally about <em>resources and rates</em>. Is CPU high? Is memory climbing? Is the error rate creeping up? Is p99 latency elevated? These are excellent questions, and I don’t want to undersell them — they catch a huge class of problems. But notice what they have in common: they’re all questions about a <em>component</em> over a <em>short, well-defined window of time</em>. They assume the thing you care about is alive right now, holding a thread, occupying a socket, showing up in this minute’s metrics scrape.</p><p>Asynchronous systems violate every one of those assumptions, and they do it quietly. Nothing throws an exception that says “your mental model is now wrong.” The dashboards stay green. The breakage is in the gap <em>between</em> the components, and the gap is exactly where nobody is looking.</p><h3>The Hidden Complexity of Async Workflows</h3><p>Let me redraw that tidy request the way real event-driven work actually flows:</p><pre>Service A<br>   │  emits event<br>   ▼<br> Kafka  ──────────────┐<br>   │                  │  (consumer lag, rebalances,<br>   ▼                  │   retries, partition skew)<br>Service B             │<br>   │                  ▼<br> Flink  ───────▶ Dead-letter / reprocessing<br>   │<br>   ▼<br>Storage (object store / table format)<br>   │  triggers<br>   ▼<br>Another Event<br>   │<br>   ▼<br>Service C</pre><p>Every single arrow in that picture is a place where the work <em>stops being a request</em>. It becomes a message parked in a partition. A row in a state store. A file in object storage waiting on a trigger. The thread that produced it returned to its pool ages ago. There’s no call stack to unwind, no open connection, no one process that owns the work from end to end.</p><p>Now layer on the things that make this genuinely hard in production. The workflow might take minutes or hours, so by the time it fails, the logs from its early stages may have already rotated out of your hot storage. Different stages are owned by <em>different teams</em>, each with their own logging conventions, their own dashboards, their own definition of “healthy.” State is smeared across half a dozen systems, and no one of them has the full picture. And because the stages are decoupled by design — that’s the whole point of using a queue — a failure can surface far away in space and time from its actual cause.</p><p>So the questions you find yourself asking during an incident change shape entirely. It’s no longer “which span was slow.” It’s:</p><p><em>Where is my workflow right now? Which stage is the bottleneck — and is that processing time or queue time? Did an event get silently dropped, or is it still buffered upstream somewhere? Why is this particular workflow taking four hours when the median is twelve minutes? And who actually owns the stage that’s stuck?</em></p><p>None of those are answerable by staring at a CPU graph. They’re not even answerable by a single trace, because the “trace” spans systems and hours. The unit of work we care about — the workflow — has no first-class representation anywhere in our stack. That’s the core of the problem, and naming it that precisely is half the battle.</p><h3>Why Logs, Metrics, and Traces Aren’t Enough on Their Own</h3><p>It’s tempting to respond with “well, just log more.” I’ve watched teams try it, including mine. You end up with terabytes of log lines and <em>less</em> clarity, not more, because the volume drowns the signal and you still have no way to stitch a workflow’s lifetime together across services.</p><p>The three classic pillars each have a specific blind spot in the async world. Logs are rich but local — a single service’s logs tell you what <em>that service</em> saw, not what happened before it or after it. Metrics are cheap and aggregate beautifully, which is exactly why they’re useless for “this one workflow is stuck” — aggregation deliberately throws away the per-workflow identity you now need. Traces are the closest fit, but classic tracing was designed for synchronous request chains that complete in milliseconds; it strains badly when a “trace” has to survive a Kafka hop, a multi-hour dwell in a queue, and a handoff between teams.</p><p>The deeper realization, the one that took me embarrassingly long to articulate, is that <strong>none of the three pillars knows what a workflow is.</strong> They observe services. We need to observe <em>work</em>. And no amount of collecting more of the same service-level telemetry adds up to a workflow-level view. You have to build that view deliberately, as its own concept. Which is precisely what Netflix and Uber concluded, from two different directions.</p><h3>Correlation IDs: The Load-Bearing Wall</h3><p>If there’s one practical, do-it-on-Monday lesson from all this reading, it’s about correlation — and it’s the thing I now wish I’d taken seriously years earlier.</p><p>Netflix’s async-observability writing draws a distinction I’d been sloppy about my whole career: a <strong>request ID is not a trace ID.</strong> A request ID identifies one short-lived call. A trace ID identifies an entire long-running workflow, across every hop and every hour it takes to complete. In a synchronous world the two are nearly interchangeable, so we conflate them. In an async world conflating them is fatal, because the request that started the workflow is long dead while the workflow grinds on.</p><p>The trace ID is what lets you reconstruct the journey:</p><pre>trace_id = &quot;wf-abc-123&quot;<br>              │<br>   ┌──────────┼───────────────────────────┐<br>   ▼          ▼                            ▼<br>Service A   Kafka header              Service B<br>log{wf:abc} {wf:abc, attempt:1}      log{wf:abc}<br>   │                                       │<br>   ▼                                       ▼<br>metric{wf:abc, stage:ingest}        stored object<br>                                    metadata{wf:abc}</pre><p>What makes this work in practice is discipline, not technology. Generate the ID once, at the true entry point of the workflow, and never per-service. Propagate it through <em>transport metadata</em> — Kafka record headers, message attributes, HTTP headers — rather than burying it in the business payload, because the moment it’s in the payload, every consumer has to understand your schema just to extract it. And then stamp it on <em>everything</em>: every log line, every metric dimension, every span, every artifact you write to storage.</p><p>Concretely, on the producer side that looks like keeping correlation out of the payload entirely:</p><pre>ProducerRecord&lt;String, byte[]&gt; record =<br>    new ProducerRecord&lt;&gt;(topic, partitionKey, payload);</pre><pre>// Correlation rides in headers, decoupled from the business schema.<br>record.headers()<br>      .add(&quot;trace-id&quot;,   traceId.getBytes(UTF_8))<br>      .add(&quot;attempt&quot;,    Integer.toString(attempt).getBytes(UTF_8))<br>      .add(&quot;emitted-at&quot;, Instant.now().toString().getBytes(UTF_8))<br>      .add(&quot;producer&quot;,   SERVICE_NAME.getBytes(UTF_8));</pre><pre>producer.send(record);</pre><p>And the consumer’s <em>first</em> job, before any business logic, is to rehydrate that context so everything it emits is automatically correlated:</p><pre>String traceId = header(record, &quot;trace-id&quot;);<br>try (var ctx = ObservabilityContext.bind(traceId)) {<br>    process(record);   // every log + metric inside is now tagged<br>}</pre><p>Get this wrong and you’ve built the worst of all worlds: enormous volumes of telemetry and no thread to pull that connects any of it. Observability without correlation isn’t observability. It’s just an expensive archive.</p><h3>Netflix’s Philosophy: The Workflow Is a First-Class Citizen</h3><p>The single most important reframing I took from Netflix’s writing is deceptively plain: <strong>stop treating the workflow as an emergent side effect of a bunch of services, and start treating it as a thing you observe directly.</strong></p><p>Netflix runs enormous media-processing pipelines — ingesting a title can fan out into transcoding, packaging, quality analysis, and dozens of dependent jobs. From the public async-observability material, and inferring from how they describe their media-workflow tooling (this is where the Cosmos and Nirvana names show up, and I’ll be upfront that the internals here are inferred from blogs, not documented APIs), the recurring shape is consistent:</p><pre>Services<br>   │  emit trace + workflow events<br>   ▼<br> Kafka            ← durable, decoupled ingestion<br>   │<br>   ▼<br> Flink            ← aggregate, enrich, correlate by trace_id<br>   │<br>   ▼<br>Elasticsearch     ← fast search over recent workflow state<br>   │<br>   ▼<br> Iceberg          ← long-term, columnar history for analytics</pre><p>Two details from that pipeline are worth dwelling on because they’re easy to skim past. First, the idea of <strong>hydration (or “enrichment”) jobs</strong> — the stream-processing layer doesn’t just pass events through; it stitches disjoint events into coherent workflow timelines and enriches them with context, so that a query for “workflow wf-abc-123” returns a readable narrative rather than a pile of fragments. Second, the deliberate split between a search store and an analytics store: Elasticsearch answers “what’s happening with <em>this</em> workflow right now,” while a table format like Iceberg answers “how have <em>all</em> workflows of this type behaved over the last quarter.”</p><p>That second capability is where the business value lives, and it’s a part I’d completely underestimated. Once workflows are queryable historical objects, you can do <em>differential analysis</em>: compare two media pipelines and see which stage diverges. You can find systemic bottlenecks across thousands of executions. You can do capacity planning grounded in real workflow behavior, and you can prioritize engineering investment toward the stages that actually hurt. Observability stops being a panic button and becomes an instrument for <em>understanding the system over time</em>.</p><h3>Uber’s Philosophy: Observability as a Data-Platform Problem</h3><p>Uber arrives at a strikingly similar place from the opposite direction. Where Netflix’s framing is media-workflow-centric, Uber’s is data-platform-centric — but the underlying ache is identical.</p><p>Their ecosystem is a sprawl: compute engines like Spark, Hive, and Flink; orchestration through Airflow and Cadence; storage across HDFS, Elasticsearch, and cloud providers. Now run <em>thousands</em> of data jobs a day across that matrix. A single failed pipeline might involve an Airflow DAG, several Spark stages, a Hive table, and an HDFS path — each with its own UI, its own logs, its own vocabulary for failure. Debugging by hand means hopping across systems and reconstructing a timeline in your head, which doesn’t scale and quietly burns out your most experienced engineers as human glue between tools.</p><p>Uber’s <a href="https://www.uber.com/us/en/blog/from-monitoring-to-observability-cloud-native/">From Monitoring to Observability</a> post frames the shift explicitly: monitoring tells you <em>that</em> something is wrong against predefined thresholds; observability is about being able to ask <em>arbitrary, after-the-fact questions</em> about why. And crucially, their writing splits the audience. Engineers need debugging, root-cause analysis, and cost attribution. Leadership needs capacity planning, cost optimization, and business insight. The same telemetry substrate has to serve both, which immediately tells you this can’t just be a logging tool — it has to be a product with real users and real queries.</p><h3>Datacentral, and Observability as a Product</h3><p>Datacentral is the piece that genuinely shifted my thinking, because it refuses to stop at “here are your logs, good luck.”</p><p>From Uber’s description, the platform does the things you’d expect — time-series metrics, historical comparisons, trend analysis, observability over both individual jobs and whole workflows. But the part that stuck with me is the ambition to <em>do the engineer’s reasoning for them</em>: surface probable root causes instead of raw symptoms, explain failures in human terms, detect wasteful workloads (the job that’s been over-provisioned and quietly burning money for six months), flag recurring failure patterns across runs, and recommend concrete remediation.</p><p>That’s a philosophical leap worth saying out loud:</p><blockquote><em>Traditional monitoring answers </em>“is something wrong?”<em> A mature workflow-observability platform tries to answer </em>“what’s wrong, why, and what should I do about it?”</blockquote><p>It reframes observability from a <strong>detection</strong> tool into a <strong>diagnosis-and-resolution product</strong>. And once you accept that, a lot of design decisions that looked like over-engineering suddenly look inevitable. A product needs structured, queryable data — not a swamp of unstructured log lines. It needs history, which means real storage and lifecycle management. It needs to serve interactive queries, which means indexing. You don’t get any of that by bolting another logging library onto your services. You get it by treating observability as its own system with its own backlog.</p><h3>The Pattern That Shows Up Everywhere — and Why</h3><p>Here’s the thing that made me sit back. Netflix and Uber operate in completely different domains, at different scales, with different vocabularies — and yet the architecture they converge on is nearly the same:</p><pre>Sources emit telemetry / metadata<br>   (services, Spark, Hive, Presto, Flink, …)<br>                   │<br>                   ▼<br>                 Kafka          ← durable, decoupled ingestion buffer<br>                   │<br>                   ▼<br>        Stream processing (Flink)   ← aggregate · enrich · correlate<br>                   │<br>                   ▼<br>        Storage &amp; indexing       ← search store (Elasticsearch)<br>                   │                 + analytics store (Iceberg / tables)<br>                   │                 + metadata store (MySQL / internal)<br>                   ▼<br>     Search · analytics · visualization · alerting<br>                   ▲<br>                   │<br>        engineers, leadership, automated RCA</pre><p>It’s worth asking <em>why these specific components keep reappearing</em>, because it’s not coincidence — it’s the shape of the problem forcing the shape of the solution.</p><p><strong>Kafka shows up because telemetry is bursty and producers must not be coupled to consumers.</strong> When an incident hits, telemetry volume spikes exactly when your backend is most stressed. A durable log in the middle absorbs the burst, lets you replay events if a downstream stage was buggy, and means a slow indexer can never back-pressure your production services into falling over. The decoupling is the point.</p><p><strong>Flink (and stream processing generally) shows up because raw events aren’t useful — correlated, enriched events are.</strong> Stitching thousands of disjoint events into per-workflow timelines, joining a “stage started” with its much-later “stage finished,” computing rolling aggregates — that’s stateful stream processing, and it has to happen <em>in flight</em> because doing it at query time over raw data would be hopelessly slow.</p><p><strong>Elasticsearch shows up because humans debug by searching.</strong> During an incident you want to type a trace ID, or a tenant, or an error signature, and get answers in milliseconds. That’s a search problem, and it wants an inverted index.</p><p><strong>Iceberg (or a similar table format over object storage) shows up because history is huge and you query it analytically.</strong> You can’t keep months of high-cardinality workflow data in a hot search cluster — it’s too expensive. A columnar table format on cheap object storage lets you run the “how has this pipeline behaved over the quarter” queries affordably. Different question, different access pattern, different store.</p><p><strong>And a metadata store (MySQL or internal systems) shows up because some of this is relational, authoritative truth</strong> — workflow definitions, ownership, lineage — that you want transactional and consistent, not eventually-consistent in a search index.</p><p>In other words, each component earns its place by matching a distinct access pattern: buffer, transform, search, analyze, and authoritative lookup. Once you see telemetry as data moving through those stages, the architecture stops looking like a stack of trendy tools and starts looking like the only reasonable answer.</p><h3>High-Cardinality Telemetry and the Cost Tradeoff</h3><p>This is where I have to be honest about the tension, because it’s the part most articles gloss over.</p><p>Classic metrics systems are built for <em>low</em> cardinality — a handful of dimensions like host, region, status code. Workflow observability needs the opposite: trace_id, tenant, pipeline_stage, media_type, job_id, owner. Those are high-cardinality dimensions, and they&#39;re high-cardinality <em>on purpose</em>, because they&#39;re exactly the dimensions you slice by when investigating. An aggregate error rate of 0.3% tells you nothing about the one tenant whose every workflow is failing; a high-cardinality store lets you find that tenant in seconds.</p><p>But high cardinality is genuinely expensive. Shove unbounded trace_id cardinality into a Prometheus-style metrics system and you&#39;ll melt it — that&#39;s not a knock on Prometheus, it&#39;s a category error. This is precisely <em>why</em> the architecture routes high-cardinality data into systems designed to absorb it: wide structured events in a search index, columnar data in a table format, with sampling, rollups, and tiered retention to keep the bill sane. The skill isn&#39;t &quot;collect everything.&quot; It&#39;s matching each signal to a store that can afford its cardinality, and being deliberate about what you keep hot, what you keep cold, and what you sample away.</p><p>There’s no free lunch here. More cardinality means more cost and more operational weight. The teams that do this well treat retention and sampling as first-class design decisions, not afterthoughts — and that, too, is a sign that observability has become a real engineering discipline rather than a checkbox.</p><h3>A Maturity Model I Started Carrying Around</h3><p>After all this reading, I found myself sketching a rough ladder to place teams (including my own) on. It’s not rigorous, but it’s been a useful mirror.</p><pre>Level 0  Reactive logging<br>         grep across machines during an incident; no correlation.<br>Level 1  Metrics + dashboards<br>         RED/USE, alerts on thresholds. Great for &quot;is it healthy?&quot;<br>         blind to &quot;where is my workflow?&quot;</pre><pre>Level 2  Distributed tracing<br>         request chains stitched together; works for synchronous paths,<br>         strains across queues and long-running async work.</pre><pre>Level 3  Workflow observability<br>         the workflow is a first-class, queryable entity; trace IDs<br>         survive every hop; you can reconstruct a multi-hour execution.</pre><pre>Level 4  Observability as a product<br>         root-cause surfacing, cost attribution, recurring-failure<br>         detection, remediation hints, leadership-grade analytics.</pre><p>Most teams I’ve worked on live comfortably at Level 1 and <em>think</em> they’re higher because the dashboards are pretty. Netflix and Uber, from their public writing, are clearly operating at Levels 3 and 4 — and the jump from 2 to 3 isn’t a tooling upgrade, it’s a <em>conceptual</em> one. It’s the moment you decide the workflow deserves to exist as an object in your system. Everything else follows from that decision.</p><h3>The Lessons I’m Taking With Me</h3><p>A few things genuinely changed how I’ll build and debug systems going forward.</p><p>The first is that <strong>the unit of observability has to match the unit of work.</strong> If your work is asynchronous and workflow-shaped, observing individual services will always leave a gap, and that gap is where your hardest incidents will hide. You have to construct the workflow view deliberately.</p><p>The second is that <strong>correlation is not optional and not retrofittable cheaply.</strong> A trace ID generated at the entry point and propagated through transport metadata is the cheapest, highest-leverage thing you can do early. Adding it after the fact, once a system is live and sprawling, is miserable. I’ve now seen both sides of this and I will fight for it on day one.</p><p>The third is that <strong>observability becomes a data engineering problem at scale</strong>, and pretending otherwise is how you end up with a log swamp. The Kafka → stream processing → indexed/columnar storage pipeline isn’t Netflix and Uber being fancy; it’s what the access patterns demand once volume and cardinality grow. If you’re serious about workflow observability, you’re signing up to build (or buy) a real data pipeline, with all the retention, cost, and lifecycle thinking that implies.</p><p>And the fourth, the one I keep coming back to, is that <strong>the best observability platforms answer questions in the language of the business, not just the infrastructure.</strong> “Which owner is responsible for the stage that’s stuck, and what’s the customer impact?” is a more valuable question than “is CPU high?” — and a platform that can answer the former has crossed from monitoring into something genuinely more powerful.</p><h3>Closing Thought</h3><p>The biggest mental shift from these few weeks is that Netflix’s and Uber’s platforms aren’t logging tools that happened to get big. They’re observability <em>products</em>, built deliberately for asynchronous workflows and data pipelines — tracking <em>workflow execution state and lineage</em> rather than just collecting infrastructure metrics.</p><p>Traditional monitoring asks whether the machines are healthy. Workflow observability asks where the work is, which stage is slow, why it failed, what it costs, and who owns it. Both matter. But as our systems keep drifting toward event-driven, asynchronous, multi-team designs, I’m increasingly convinced the second category is going to feel just as fundamental as the first — and the teams that internalize it early are going to spend a lot less time staring at green dashboards wondering where their workflow went.</p><p>Understanding your infrastructure tells you whether the boxes are okay. Understanding the <em>flow of work through</em> that infrastructure is what actually lets you help the people depending on it. That, more than any single tool, is the shift worth making.</p><p><em>Sources I’m confident I read and drew on directly: Netflix’s </em><a href="https://netflixtechblog.com/achieving-observability-in-async-workflows-cd89b923c784"><em>Achieving Observability in Async Workflows</em></a><em>, Uber’s </em><a href="https://www.infoq.com/presentations/stream-pipeline-observability/"><em>Stream Pipeline Observability</em></a><em>, </em><a href="https://www.uber.com/in/en/blog/datacentral-ubers-observability-and-chargeback-platform/"><em>Datacentral</em></a><em>, and </em><a href="https://www.uber.com/us/en/blog/from-monitoring-to-observability-cloud-native/"><em>From Monitoring to Observability in Cloud Native Systems</em></a><em>. I also encountered references to Netflix’s Cosmos and Nirvana and to media-workflow observability posts; I’ve kept claims about those deliberately light and inferred-from-public-material, since their internals aren’t fully documented publicly. If you go deeper, verify those media-workflow posts against what you actually read — some Netflix titles are similar and have evolved over time.</em></p><p><em>If you operate async systems and have war stories — especially about the correlation IDs you wish you’d added on day one — I’d genuinely love to hear them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10f5fb7d076" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>