#Reliability

Reliability engineering ensures systems meet their availability and correctness commitments. These articles cover fallback contracts, error budgets for LLM-backed services, chaos testing for multi-agent systems, and the patterns that turn aspirational SLOs into measurable operational guarantees.

69 posts tagged with reliability. ← Blog home

#A/B Testing (3)#A2A (14)#ADK (8)#AG-UI (6)#AI (9)#AI Adoption (9)#AI Agents (355)#AI Architecture (22)#AI Cost (10)#AI Cost Optimization (8)#AI Engineering (316)#AI Evaluation (9)#AI Financial Engineering (14)#AI Gateway (8)#AI Governance (43)#AI Red Teaming (9)#AI Research (17)#AI Safety (12)#AI Security (35)#AI Strategy (8)#AI in Production (12)#AML (3)#API Design (18)#API Security (9)#APIs (69)#AWS (17)#Accountability (8)#Accounting (9)#Agent Memory (8)#Agent Skills (11)#Agentic AI (25)#Agentic Commerce (12)#Agentic Engineering (12)#Agentic RAG (8)#Agents (4)#Amazon Bedrock (8)#Analytics (3)#Architecture (45)#Attention (3)#Audit (4)#Authentication (11)#Authorization (3)#Automation (13)#Azure (11)#Azure AI Foundry (9)#Backend Engineering (331)#Benchmarks (3)#Best Practices (5)#BigQuery (6)#Billing (8)#Build Systems (4)#Business Finance (8)#Business Strategy (55)#C (8)#CI/CD (23)#Caching (11)#Capital Markets (14)#Card Payments (12)#Cards (13)#Career (30)#Causal Inference (8)#Cellular Automata (8)#Change Management (3)#Checkpointing (4)#Claude Code (8)#Cloud (5)#Cloud Architecture (3)#Cloud Native (10)#Code Review (9)#Coding Agents (20)#Collaboration (6)#Communication (9)#Complexity (8)#Compliance (54)#Computer Networking (9)#Computer Science (40)#Computer Vision (15)#Computer-Use Agents (8)#Concurrency (44)#Consulting (26)#Containers (11)#Context Engineering (19)#Conversational AI (8)#Cost Optimisation (5)#Cost Optimization (3)#Credit (16)#Credit Risk (16)#CrewAI (8)#Crypto (12)#Cryptocurrency (12)#Cryptography (9)#Custody (9)#DSPy (8)#Data (14)#Data Engineering (25)#Data Governance (3)#Data Science (8)#Data Structures (10)#Databases (48)#Deep Learning (20)#Deployment (5)#Design (3)#Design Patterns (10)#DevOps (24)#DevSecOps (22)#Developer Experience (7)#Developer Productivity (15)#Developer Tools (5)#Differential Privacy (3)#Diffusion Models (10)#Discovery (5)#Distributed Systems (104)#Documentation (3)#Edge AI (8)#Embeddings (21)#Emotional Intelligence (8)#Energy (8)#Engineering (14)#Engineering Culture (3)#Engineering Judgment (7)#Engineering Practices (21)#Enterprise AI (8)#Error Handling (4)#Evaluation (79)#Event-Driven (9)#Event-Driven Architecture (8)#Explainability (3)#Explainable AI (8)#FREE-AI (8)#FX (5)#Feature Engineering (3)#Feature Flags (3)#Feedback (4)#FinOps (23)#FinTech (6)#Financial AI (14)#Financial Engineering (8)#Financial Systems (133)#Fine-Tuning (12)#Fintech (134)#Flutter (8)#Forecasting (10)#Foreign Exchange (5)#Forward Deployed Engineer (43)#Forward Deployed Engineering (8)#Fraud (10)#Fraud Detection (8)#Function Tools (5)#Functional Programming (3)#Fundamentals (23)#Fundraising (8)#GCP (5)#GPU (8)#GUI Automation (8)#Gemma (4)#Generative AI (13)#Generics (3)#Git (8)#Go (241)#Go-to-Market (31)#Google ADK (36)#Governance (61)#Granite (6)#Graph Neural Networks (8)#GraphQL (3)#Growth (3)#Guardrails (35)#HIPAA (3)#HTTP (3)#Harness Engineering (8)#Hiring (9)#Hugging Face (8)#Human-in-the-Loop (10)#IBM watsonx (8)#Idempotency (3)#Identity (11)#Image Generation (10)#Inference (8)#Information Retrieval (8)#Integration (3)#Integrations (8)#Intellectual Property (8)#Interfaces (3)#Interpretability (8)#JavaScript (8)#KYC (11)#KYC and AML (12)#Kafka (11)#Knowledge Graphs (11)#Kubernetes (18)#LLM (5)#LLM Inference (8)#LLM Infrastructure (8)#LLM-as-Judge (3)#LLMOps (9)#LLMs (197)#LangChain (8)#LangGraph (11)#Leadership (33)#Ledger (12)#Legal (8)#Lending (14)#Linux (9)#LlamaIndex (8)#Load Balancing (3)#MCP (25)#MLOps (39)#Machine Learning (119)#Marketing (16)#Markets (4)#Mathematical Finance (8)#Memory (17)#Memory Management (5)#Metrics (7)#Microservices (3)#Microsoft Agent Framework (150)#Middleware (6)#Migration (9)#Migrations (8)#Mixture of Experts (5)#Model Risk (3)#Monetization (9)#Monitoring (5)#Monorepo (3)#Multi-Agent (10)#Multi-Agent AI (14)#Multi-Agent Systems (76)#Multimodal (3)#Multimodal AI (11)#NIM (5)#NVIDIA (8)#Networking (3)#OAuth (3)#OWASP (7)#Observability (52)#On-Device AI (8)#Ontology (8)#Open Source (7)#OpenAPI (3)#OpenTelemetry (5)#Operating Systems (9)#Operations (14)#Opinion (6)#Orchestration (10)#Organizational Design (8)#Patterns (3)#Payment Rails (16)#Payments (55)#People (8)#Performance (63)#Personalization (9)#Platform Engineering (17)#Policy as Code (3)#PreSales (8)#Pricing (4)#Privacy (14)#Privacy Engineering (3)#Process (4)#Product (30)#Product Management (9)#Production (22)#Programming (10)#Programming Languages (48)#Prompt Engineering (86)#Prompt Injection (16)#Proof of Concept (3)#Protocol Buffers (3)#Protocols (9)#Providers (4)#Pydantic AI (8)#Python (142)#Quality (3)#Quantitative Finance (22)#RAG (72)#RBI (3)#REST (5)#Rails (16)#Real-Time (8)#Reasoning Models (8)#Recommender Systems (8)#Reconciliation (5)#RegTech (8)#Regulation (10)#Reinforcement Learning (9)#Reliability (69)#Resilience (4)#Responsible AI (5)#Retrieval (3)#Risk (22)#Risk Management (11)#Rust (32)#SLSA (3)#SRE (23)#SaaS (9)#Sales (9)#Sales Engineering (8)#Scalability (6)#Search (10)#Security (103)#Security Engineering (8)#Self-Evolving Agents (24)#Semantic Web (8)#Sessions (3)#Settlement (9)#Soft Skills (8)#Software (3)#Software Architecture (36)#Software Delivery (9)#Software Engineering (152)#Spanner (4)#Specification Engineering (3)#Speech (8)#Startups (30)#Statistics (8)#Strands (8)#Strategy (6)#Stream Processing (9)#Streaming (39)#Structured Output (4)#Supply Chain Security (10)#Sustainability (9)#System Design (32)#Systems Programming (56)#Technical Sales (6)#Testing (79)#Threat Modeling (3)#Time Series (9)#Tool Use (23)#Tooling (11)#Tools (4)#Trading (8)#Transformers (3)#Treasury (6)#Trust (4)#Type System (3)#Type Systems (12)#TypeScript (8)#Validation (3)#Valuation (3)#Vector Databases (23)#Vector Search (12)#Venture Capital (8)#Version Control (9)#Versioning (7)#Voice AI (9)#Web Development (6)#Webhooks (9)#Workflow (4)#Workflows (14)#eBPF (8)#gRPC (13)#smolagents (8)
Pratik Dhanave · ·6 min read

Agentic Software Engineering in Go: Production Operations & Metrics

Observability, continuous improvement, and scaling beyond the individual

The observability stack for an agentic factory: metrics pipeline, log correlation, tracing, and dashboards — then the continuous improvement loop, A/B testing of factory configurations, and improvement categories. Production operations turn the factory from an experiment into infrastructure.

Pratik Dhanave · ·4 min read

Migrations as a Capability — Linters, Harnesses, and the Fleet View

One team running one careful migration is craft; an organization running hundreds a month across a fleet of databases is either a capability or a casino. The closing move of this series is the same one the enterprise-AI series made about adoption: stop treating each migration as a bespoke heroic project, and build the machinery that makes the safe way the easy way — linters that catch the outage before review, harnesses that embody posts 2–5 so nobody re-implements them, and automation that watches the fleet so humans watch the exceptions.

Scale migration safety by productizing it: linters that mechanize the failure taxonomy (teaching errors, signed escapes, incident-grown rules), harnesses packaging backfill/verification/cutover declaratively, and a control plane with ladder-climbing automation keeping humans on the novel. Closes the series.

Pratik Dhanave · ·4 min read

Flakiness — The Operational Disease That Kills Test Signal

A flaky test — same code, different verdicts — is worse than no test: it costs full price, delivers noise, and teaches the team that red means retry. Post 1 did the arithmetic (ten thousand 99.9%-reliable tests ≈ permanent red); this post is the operating system for the disease: detect flakes statistically, quarantine them mechanically, fix them by root-cause class, and prevent the re-infection that follows any one-time cleanup.

Flakiness managed as an operational disease: detected statistically into per-test flake scores, quarantined mechanically (out of the gate, loudly, with fix-or-delete SLAs), fixed by taxonomy — synchronization over sleeps, hermetic isolation, fakes at boundaries — with lint rules and burn-in preventing re-infection.

Pratik Dhanave · ·4 min read

Building the Provider Platform — Fan-Out, Endpoint Health, and the Art of Delivering to Strangers

The moment your product offers webhooks, you've signed up to run a delivery platform: fan-out to thousands of endpoints you don't control, operated by teams of wildly varying competence, every one of them capable of being slow, down, or misconfigured — without letting any of them degrade the others or your own system. This post is the provider's view: the architecture, the per-endpoint health machinery, and the policy decisions that separate a webhook feature from a webhook platform.

The provider side: outbox-captured events, per-endpoint filtered fan-out, signed deliveries through contained workers — and per-endpoint isolation so one slow stranger costs only themselves. Endpoint health run actuarially, suspension that warns early and retains for redelivery, and the trust-earning platform short-list.

Pratik Dhanave · ·4 min read

Cross-Store Migrations — Changing Databases Entirely

Same-store migrations reshape a schema; cross-store migrations change the ground itself — relational to document, single-node to distributed, self-hosted to managed, one vendor to another. Every pattern from this series still applies, but the safety nets of a single database — transactions spanning old and new, one replication stream, one consistency model — are gone, and their replacements have to be built. The backbone of those replacements is change data capture: stop writing to two places, start following one.

CDC replaces dual-writes: tail the source log, snapshot-then-stream to convergence while writes never stop. The transform is the risk concentrate; verification compares intended equivalence; cutover gates on lag with a rehearsed seconds-long pause; rollback is a pre-built reverse pipeline. The killer is stalling, not breaking.

Pratik Dhanave · ·4 min read

Cutover and Rollback — Crossing Carefully, and Keeping the Bridge

Everything before this moment was preparation with an exit. Cutover is the moment traffic actually moves — reads, then writes, then trust — and its engineering question is blunt: how do you cross so that the first sign of trouble costs a flag-flip instead of an incident? The answer is incremental exposure, pre-staged rollback, and a disciplined patience about demolishing the bridge you just crossed.

Reads cut first (flags, percentage ramps through real peaks, cohort-sticky, canaried by the live mismatch rate); writes carry the asymmetry — reverse dual-writes keep rollback a flag-flip. Rollback is built and tested, the window declared — then the bridge is demolished on schedule, neither kept forever nor dropped early.

Pratik Dhanave · ·4 min read

The Durable Intake Architecture — Queues Behind Endpoints, DLQs, and Poison Events

The naive webhook handler does everything inline: receive, verify, run business logic, call three services, return 200. It works in the demo and fails in every interesting way in production — timeouts under load, lost events on deploy, one bad payload blocking the stream. The production architecture is almost boringly uniform across serious teams: a thin endpoint that durably enqueues and immediately acks, workers that process from the queue, and explicit machinery for the events that refuse to process. This post builds that architecture piece by piece.

The production receiver: a thin verifying endpoint that durably enqueues and acks in milliseconds, workers processing idempotently partitioned by resource, bounded retries for transients, and a monitored, diagnosable, replayable DLQ so one poison payload never dams the stream. The dashboard falls out of the design.

Pratik Dhanave · ·4 min read

Dual-Writes and Shadow Reads — Proving Two Copies Agree

Every serious migration passes through a phase where the same truth lives in two places — old column and new, old table and new, old store and new — and the entire migration's integrity rests on those copies agreeing. Hope is not a strategy and spot-checking is barely one; the disciplines that actually prove agreement are dual-writes done with eyes open, shadow reads that compare on every request, and diff sweeps that check everything else. This is the migration's measurement layer — post 1's third vow made operational.

The measurement layer: dual-writes with the race named (source of truth declared, outbox/CDC when stakes outgrow tolerate-and-repair), shadow reads comparing on live traffic with noise filtering, diff sweeps for the cold data — all feeding idempotent repair and producing the agreement rate that gates cutover.

Pratik Dhanave · ·4 min read

Backfills at Scale — Rewriting a Billion Rows Under Live Traffic

The expand phase created an empty column; something has to fill it for a billion existing rows while production traffic continues oblivious. Backfills are the manual labor of migrations — conceptually trivial, operationally where migrations actually spend their calendar time and take their production risks. The craft is entirely in the adverbs: incrementally, throttled, resumably, idempotently.

Backfills are made safe by four adverbs: incrementally (keyset-walked, time-sized, per-batch-committed), throttled (a control loop yielding to replication lag, content to take days), resumably (transactional checkpoints), idempotently (absolute writes, safe re-runs). The transform is reviewed code with a verify-only mode.

Pratik Dhanave · ·4 min read

Expand/Contract — The Only Schema Change Pattern You Need

Every zero-downtime schema change — rename a column, change a type, split a table, add a constraint — is the same move performed carefully: add the new shape alongside the old, migrate readers and writers in compatible steps, then remove the old shape long after anything needs it. Expand/contract (also traveling as "parallel change") is less a technique than the grammar all the techniques are written in. Learn it once and every migration becomes a sentence in it.

Expand/contract is the grammar of zero-downtime schema change: add alongside, migrate in compatible single-step deploys (write-both, read-new, write-new-only), contract late and deliberately. Plus the per-engine fine print: concurrent index builds, declare-then-validate constraints, and lock timeouts as the universal seatbelt.

Pratik Dhanave · ·4 min read

Delivery Semantics — At-Least-Once, Retries, and the Exactly-Once Myth

Every delivery guarantee is a bet about failure, and webhook systems inherit the oldest result in distributed messaging: between two parties over an unreliable channel, you can deliver at-most-once or at-least-once, but exactly-once delivery is not on the menu — only exactly-once effect, manufactured by the receiver. This post builds that result from first principles and derives the retry machinery both sides need: schedules, backoff, jitter, and the acknowledgment discipline that makes them work.

A webhook POST is the two-generals problem in miniature: the ack can always be lost, so the choices are at-most-once (silent loss) or at-least-once (loud duplicates) — and providers rightly choose loud. The retry machinery that makes it livable: exponential backoff, jitter, bounded published horizons, per-endpoint isolation.

Pratik Dhanave · ·4 min read

Why Migrations Break Things — The Downtime Taxonomy

"Run the migration at 2 a.m." was a plan when users slept somewhere. For a system that's always on, every schema change, backfill, and datastore move must happen underneath live traffic — and the ways that goes wrong are surprisingly few and surprisingly repeatable: locks that queue the world, long transactions that starve it, mismatched assumptions between old code and new schema. This series is the discipline of changing data out from under a running system; this post is the map of how it breaks.

Migration incidents come in five repeatable shapes: lock queueing, resource starvation, long-transaction side effects, code-schema mismatch across rolling deploys, and silent semantic drift. Against them, three vows: no data-proportional locks, reversibility until a deliberate late point of no return, and proof over belief. Opens the series.

Pratik Dhanave · ·8 min read

Productionizing Financial AI — From Prototype to Trusted System

A financial AI prototype that works in a demo is a long way from a system an institution trusts with capital. Productionizing financial AI means meeting the reliability, latency, security, and operational bars of a regulated financial environment — where a silent failure loses money, an outage stops trading, and a breach is catastrophic. This post is about the engineering that turns a promising model into a system people actually rely on.

A prototype that works in a demo is far from a system an institution trusts with capital. Productionizing financial AI means meeting the reliability, latency, security, and operational bars of a regulated environment where silent failures lose money. The posture: trust is the actual product. (Educational, not financial advice.)

Pratik Dhanave · ·6 min read

Observability and Tracing — Seeing Inside an LLM System

When an LLM application gives a bad answer, "the model messed up" is almost never a useful diagnosis. Was it the retrieval that pulled the wrong document? The prompt template? A tool that returned garbage? The model's generation itself? Without observability built for LLM systems, you can't tell — and you're left re-running prompts hoping to reproduce a non-deterministic failure. This post is about instrumenting an LLM app so that when something goes wrong, you can actually see why.

'The model messed up' is never a useful diagnosis. Why ordinary monitoring isn't enough, tracing as the spine (spans capturing the rendered prompt, retrieved context, tool calls, raw output, tokens/cost), and turning aggregated traces into metrics, quality trends, and drift detection.

Pratik Dhanave · ·5 min read

eBPF for Observability

Observability is where eBPF first went mainstream, and for good reason: it lets you see almost anything the kernel sees — syscalls, function calls, network events, disk I/O — with very low overhead and, crucially, without changing the code you're observing. That combination broke a long-standing trade-off in tracing and profiling, and it's why modern observability tools are increasingly built on eBPF.

Observability is where eBPF first went mainstream: it lets you see almost anything the kernel sees — syscalls, function calls, network events, disk I/O — with very low overhead and, crucially, without changing the code you're observing. That combination broke a long-standing trade-off in tracing and profiling, and it's why modern observability tools are increasingly built on eBPF.

Pratik Dhanave · ·5 min read

Observability and Governance

You can't manage what you can't see, and AI systems are unusually hard to see into — non-deterministic outputs, per-token costs, quality that's a matter of degree. Because every model call flows through the gateway, it's the one place you can observe all of it: what was called, what it cost, how long it took, and whether it was allowed. This post is about turning the gateway into your AI system's source of truth and its governance point.

You can't manage what you can't see, and AI systems are unusually hard to see into — non-deterministic outputs, per-token costs, quality that's a matter of degree. Because every model call flows through the gateway, it's the one place you can observe all of it and govern it: what was called, what it cost, how long it took, whether it was allowed. Turning the gateway into your AI system's source of truth.

Pratik Dhanave · ·6 min read

Reliability: Fallback, Retries, and Circuit Breakers

Model providers go down, rate-limit you, and time out — regularly. If your application calls one provider directly, its reliability is capped at that provider's. An AI gateway breaks that ceiling: because it can route across providers, a failure on one becomes a transparent retry on another. This post covers the reliability patterns that turn provider outages into non-events.

Model providers go down, rate-limit you, and time out — regularly. If your application calls one provider directly, its reliability is capped at that provider's. An AI gateway breaks that ceiling: because it can route across providers, a failure on one becomes a transparent retry on another. Retries, fallback, and circuit breakers — with an interactive request-flow sequence diagram.

Pratik Dhanave · ·5 min read

What eBPF Is, and Why It Matters

eBPF lets you run your own sandboxed programs inside the Linux kernel, safely, without changing kernel source or loading a risky module — and that quietly unlocks a new generation of observability, networking, and security tools. It's one of the most consequential systems technologies of the last decade, and it's worth understanding from first principles. This series builds eBPF up from the problem it solves.

eBPF lets you run your own sandboxed programs inside the Linux kernel, safely, without changing kernel source or loading a risky module — quietly unlocking a new generation of observability, networking, and security tools. It's one of the most consequential systems technologies of the last decade. This series builds eBPF up from the problem it solves.

Pratik Dhanave · ·7 min read

Reliability Challenges — Why Computer-Use Agents Are Hard to Trust

Computer-use agents are impressive in demos and frustrating in production, and the gap is reliability. Driving a human interface — imprecise perception, imprecise actions, brittle UIs, long multi-step tasks — accumulates errors in ways that make these agents genuinely hard to trust for important work. This post is an honest look at the reliability challenges, why they're inherent, and how to work within them.

Impressive in demos, frustrating in production — the gap is reliability. Error accumulation over long tasks (0.95^20 ≈ 36%), brittleness to UI change, imprecise perception/action, and weak visual verification make these agents structurally hard to trust, and how to work within the limits (short tasks, checkpoints, human-in-the-loop).

Pratik Dhanave · ·6 min read

Grounding in the UI — Knowing Exactly Where to Click

A computer-use agent can perceive the screen and decide "click Submit," but it still has to answer a deceptively hard question: where exactly is Submit, and how do I act on precisely that spot? This UI grounding problem — connecting a decision to a precise screen location and element — is where many computer-use agents stumble, because a click a few pixels off hits the wrong thing. This post is about how agents locate and target UI elements reliably.

Deciding 'click Submit' is easy; knowing exactly where Submit is and clicking precisely there is the grounding problem — where a click a few pixels off hits the wrong thing. Coordinate vs element-based vs set-of-marks grounding, why precise localization is hard for vision, and why mis-clicks are a top failure mode.

Pratik Dhanave · ·6 min read

Observability, SRE, and Reliability on the Platform

A platform that ships fast but falls over isn't a good platform. Reliability is a first-class platform capability — and the smartest move platform engineering makes is to build observability and SRE practices into the platform, so every service gets monitoring, SLOs, and reliability by default instead of each team reinventing them. Reliability becomes a paved road too.

A platform that ships fast but falls over isn't a good platform. Reliability is a first-class platform capability — the smartest move is to build observability and SRE practices into the platform, so every service gets monitoring, SLOs, and reliability by default.

Pratik Dhanave · ·6 min read

Observability and Production

A model-driven agent decides its own path, which means you cannot know what it did without watching — so observability isn't a nice-to-have in Strands, it's a requirement. Built on OpenTelemetry and shaped by AWS's own production use, Strands treats seeing inside the agent as first-class, because a loop you can't see is a loop you can't trust.

A model-driven agent decides its own path, so you cannot know what it did without watching — observability isn't a nice-to-have in Strands, it's a requirement. Built on OpenTelemetry and shaped by AWS's own production use.

Pratik Dhanave · ·6 min read

LangChain in Production

The gap between a LangChain demo and a LangChain production system is the same gap as any LLM application — observability, evaluation, cost, and reliability — and LangChain's answer is LangSmith plus the discipline the rest of your engineering already has. This closing post covers operating LangChain applications and the honest verdict on when to use the framework.

The gap between a LangChain demo and a production system is the same as any LLM application — observability, evaluation, cost, and reliability — and LangChain's answer is LangSmith plus the discipline your engineering already has.

Pratik Dhanave · ·7 min read

Measurement and Unit Economics

Every lever in this playbook shares one precondition: you have to measure. The vendor percentages are directional signposts, not promises — the only number that governs your bill is the one from your own workload. Measurement, and the right unit of measurement, is what turns a list of tactics into an actual reduction.

Every lever shares one precondition: you have to measure. The vendor percentages are directional signposts, not promises — the only number that governs your bill is the one from your own workload, measured as cost per unit of value.

Pratik Dhanave · ·7 min read

Networking in Practice for Backend Engineers

All the theory pays off in a handful of habits that separate resilient backend code from code that falls over the first time the network misbehaves — which it will. Set timeouts on everything, reuse connections, retry idempotently, and know how to read the layers when something breaks. This closing post turns the stack into a working checklist.

All the theory pays off in a handful of habits that separate resilient backend code from code that falls over the first time the network misbehaves — which it will. Set timeouts on everything, reuse connections, retry idempotently, and debug by layer.

Pratik Dhanave · ·6 min read

Observability in Practice

Knowing the pillars is not the same as having an observable system. In practice, observability is built incrementally, costs real money you have to manage, and only pays off if the whole team treats telemetry as part of building software — not something added after the outage. This closing post turns the concepts into a way of working.

Knowing the pillars is not the same as having an observable system. In practice, observability is built incrementally, costs real money you must manage, and only pays off if the whole team treats telemetry as part of building software — not something added after the outage.

Pratik Dhanave · ·6 min read

Failure and Resilience

In a distributed system, failure is not an exception to handle — it's the steady state. Nodes are always crashing, recovering, slowing down, and being partitioned somewhere in your cluster. Resilience is not preventing failure; it's designing so that the failures happening right now don't become the outage your users see.

In a distributed system, failure is not an exception to handle — it's the steady state. Resilience is designing so the failures happening right now don't become the outage your users see: detection, safe retries, isolation, and graceful degradation.

Pratik Dhanave · ·4 min read

LlamaIndex in Production

A four-line RAG demo and a production RAG system share almost no operational concerns. Getting to production means treating ingestion as a pipeline, retrieval quality as something you measure, and the whole system as something you observe — the work that starts after the demo impresses everyone.

A four-line RAG demo and a production RAG system share almost no operational concerns. Getting to production means treating ingestion as a pipeline, retrieval quality as something you measure, and the whole system as something you observe.

Pratik Dhanave · ·5 min read

Kafka in Production

Kafka's defaults will run; whether they'll survive a broker failure, a traffic spike, or a year of growth depends on a handful of decisions — replication, durability, partitioning, and what you monitor — that are far cheaper to make now than to retrofit later.

Kafka's defaults will run; whether they survive a broker failure, a spike, or a year of growth depends on a handful of decisions — replication, durability, partitioning, and what you monitor.

Pratik Dhanave · ·6 min read

Alerting

An alert that fires when nothing is actually wrong trains people to ignore alerts — and an ignored alert is worse than no alert, because it creates false confidence while the real incident scrolls past unnoticed. Good alerting is ruthlessly selective: page a human only for things that are both urgent and real, alert on what users feel, and treat every noisy alert as a bug to fix.

An alert that fires when nothing is wrong trains people to ignore alerts — and an ignored alert is worse than none. Good alerting is ruthlessly selective: page a human only for things both urgent and real, alert on what users feel, and treat every noisy alert as a bug.

Pratik Dhanave · ·6 min read

SLIs, SLOs, and Error Budgets

"Is the system reliable?" is a useless question until you define reliability as a number. SLOs turn reliability from a vague aspiration into a measurable target, and the error budget — the small amount of unreliability you're allowed — turns it into a tool that settles the eternal fight between shipping features and keeping things stable. This is where telemetry becomes a way to run engineering, not just watch it.

'Is the system reliable?' is useless until you define reliability as a number. SLOs turn reliability into a measurable target, and the error budget — the unreliability you're allowed — settles the eternal fight between shipping features and keeping things stable.

Pratik Dhanave · ·5 min read

Cost Observability and AI FinOps

You cannot manage what you cannot see, and the difference between a team that controls its AI spend and one that is surprised by it is almost always whether they measure cost per feature, per user, and per call.

You cannot manage what you cannot see. The difference between a team that controls its AI spend and one surprised by it is whether they measure cost per feature, per user, and per call.

Pratik Dhanave · ·5 min read

OpenTelemetry

Before OpenTelemetry, instrumenting a system meant picking a vendor and wiring their proprietary agent into all your code — and switching vendors meant re-instrumenting everything. OpenTelemetry ended that: one open, vendor-neutral standard for producing metrics, logs, and traces, so you instrument once and send the data anywhere. It's become the default way to make systems observable.

Before OpenTelemetry, instrumenting meant picking a vendor and wiring their agent into all your code — switching vendors meant re-instrumenting everything. OpenTelemetry ended that: one open, vendor-neutral standard, so you instrument once and send the data anywhere.

Pratik Dhanave · ·5 min read

Observability, Reliability, and Incident Response

You cannot operate what you cannot see, and AI systems fail in ways ordinary monitoring misses — quality silently degrades, cost silently climbs, and inputs silently drift — so observability has to watch the things that don't throw exceptions.

AI fails in ways ordinary monitoring misses — quality degrades, cost climbs, inputs drift, all silently. Phase 8: observability that watches the signals that don't throw exceptions, plus runbooks and a kill-switch.

Pratik Dhanave · ·7 min read

Traces

When a request touches ten services and comes back slow, metrics tell you it's slow and logs tell you what each service did — but neither shows you the one thing you need: where, along that journey, the time actually went. Distributed tracing is the pillar built for exactly this, following a single request across every service it touches and showing you the whole path at once.

When a request touches ten services and comes back slow, metrics say it's slow and logs say what each service did — but neither shows where the time went. Distributed tracing follows a single request across every service and shows the whole path at once.

Pratik Dhanave · ·6 min read

Logs

Logs are the oldest and most detailed telemetry — the granular record of what actually happened. But the log line you write for a human to read with grep is nearly useless at scale; the one you write as structured data for a machine to query is the one that saves you at 3 a.m. The shift from text logs to structured logs is the single biggest upgrade most teams can make.

Logs are the most detailed telemetry — the record of what actually happened. But the log line you write for a human to grep is nearly useless at scale; the one you write as structured data for a machine to query is the one that saves you at 3 a.m.

Pratik Dhanave · ·6 min read

Metrics

Metrics are the cheapest, most efficient telemetry you have — a handful of numbers that summarize millions of events and tell you, at a glance, whether your system is healthy. Their power is aggregation; their trap is cardinality; and knowing which numbers to watch (and how to read percentiles) is the difference between a dashboard that warns you and one that lies to you.

Metrics are the cheapest, most efficient telemetry — a handful of numbers summarizing millions of events. Their power is aggregation; their trap is cardinality; and knowing which numbers to watch (and how to read percentiles) is the difference between a dashboard that warns you and one that lies.

Pratik Dhanave · ·6 min read

What Observability Is

Monitoring tells you whether the things you thought to check are okay. Observability lets you ask questions you never anticipated about a system you can't see inside. In a world of distributed services where failures are novel and emergent, that difference — between watching known dashboards and investigating unknown problems — is the difference between guessing and knowing.

Monitoring tells you whether the things you thought to check are okay. Observability lets you ask questions you never anticipated about a system you can't see inside — the difference between watching known dashboards and investigating unknown problems.

Pratik Dhanave · ·17 min read

Reliability and Resilience

How to design a system that keeps serving when its parts fail — the vocabulary of availability, the patterns that contain failure, and the Go primitives that make retries, limits, and fallbacks safe rather than dangerous.

Designing systems that survive failure: the nines and SLI/SLO/error budgets, eliminating single points of failure, timeouts and retries with backoff+jitter made safe by idempotency, circuit breakers, rate limiting and load shedding, and graceful degradation.

Pratik Dhanave · ·16 min read

Errors and Idempotency: The Two Things That Make an API Safe to Build On

Why a consistent, machine-readable error model (RFC 9457 problem+json) and idempotency keys are the difference between an API clients can trust and one that quietly double-charges them.

The two things that make an API safe to build on: a consistent machine-readable error model (RFC 9457 problem+json, stable error codes, no leaked internals) and idempotency (the Idempotency-Key pattern so retries don't double-charge).

Pratik Dhanave · ·5 min read

Deadlines, Metadata, and Interceptors

A production RPC is more than a request and a response. Every call should carry a deadline so it can't hang forever, metadata for cross-cutting concerns like auth and tracing, and it should pass through interceptors that apply logging, authentication, and metrics uniformly. These three mechanisms are how a gRPC system becomes observable, secure, and resilient — and they're the pieces beginners most often skip.

A production RPC is more than a request and response. Every call should carry a deadline so it can't hang forever, metadata for cross-cutting concerns like auth and tracing, and pass through interceptors that apply logging, authentication, and metrics uniformly. These three mechanisms make a gRPC system observable, secure, and resilient.

Pratik Dhanave · ·8 min read

Human-in-the-Loop & Workflow Observability in Microsoft Agent Framework (Python)

How to pause a workflow for a human decision, package a whole workflow as an agent, and see exactly what a run did — through OpenTelemetry spans and a rendered graph — in Microsoft Agent Framework.

How to pause a workflow for a human decision, package a whole workflow as an agent, and see exactly what a run did — through OpenTelemetry spans and a rendered graph — in Microsoft Agent Framework.

Pratik Dhanave · ·14 min read

Tail Latency and SLOs

The capstone of this series: why payments live or die on p99 and p999, how the Go runtime shows up in the tail, and the levers — deadlines, hedging, load-shedding — that keep an SLO honest.

The capstone: why the tail is the common case once you fan out (1 − 0.99^100 ≈ 63%), where Go's runtime shows up at p99 — with the measured exhibits from the whole series — and the defenses: deadline budgets with reserves, hedging only with idempotency, load-shedding, and honest histograms.

Pratik Dhanave · ·8 min read

Reliable Delivery: The Outbox, CDC, and Reconciliation

Two systems will drift. The transactional outbox stops you losing events; reconciliation is how you find the truth when they disagree anyway.

You can't atomically update your database and publish a message. The transactional outbox (or CDC) stops you losing events; reconciliation is how you find and classify the breaks when two systems drift anyway.

Pratik Dhanave · ·8 min read

Consuming APIs and Handling Webhooks

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and every inbound webhook as hostile.

Talking to a payment rail is the least reliable part of your system. Treat every outbound call as fallible and reconcile on ambiguity; treat every inbound webhook as hostile — verify, dedupe, ack fast, and go read the truth.

Pratik Dhanave · ·7 min read

Idempotency and Full Resumability

The network will time out mid-transfer. The only safe assumption is that every request runs zero, one, or many times — so make "many" behave like "one."

The network times out ambiguously, so every request runs zero, one, or many times. Idempotency keys make many behave like one; full resumability lets a crashed money flow resume from its last committed step.

Pratik Dhanave · ·8 min read

Executing Money Flows: Invariants, Reservations, and Overdrafts

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, and decide up front what an overdraft even means.

A transfer is a state machine with money on the line. Model the states explicitly, reserve funds before you commit, enforce invariants at every transition, and decide up front what an overdraft even means.

Pratik Dhanave · ·7 min read

EXHAUSTED Is Not Failure: Bounding Agent Runs

An agent that burns its turn budget without finishing is neither a success nor an error. Give it a distinct outcome and a typed event stream.

The scariest agent failure is the runaway loop that never finishes. Cap every run at max_turns and make EXHAUSTED a first-class outcome, neither a failure nor a silent success, with a typed event stream you can route on.

Pratik Dhanave · ·7 min read

The Cheapest Reliable Executor Wins

Deterministic rules get first refusal at zero model cost. Only the unknown cases escalate to graduated AI agents. A human approves anything that mutates.

Deterministic rules get first refusal at zero cost and still fire when the model is down; only the novel long tail escalates to graduated agents; a human approves anything that mutates. Build a ladder, not a model call.

Pratik Dhanave · ·4 min read

Observability, Safety, and Providers — Microsoft Agent Framework in Go

Wrap every run in an OpenTelemetry span, gate risky tool actions behind a permission handler, and swap model providers behind one agent.Agent.

Wrap every Microsoft Agent Framework run in an OpenTelemetry span, gate risky tool actions behind a permission handler, and swap Anthropic, OpenAI, Gemini, Copilot, and Azure behind one agent.

Pratik Dhanave · ·7 min read

Three-Way Reconciliation That Closes the Long Tail

Building a matching engine across the internal ledger, the processor report, and the bank statement — with tolerances, break classification, aging, and auto-resolution rules for the items nobody wants to touch.

Teaches how to build a three-way reconciliation engine (internal ledger vs processor vs bank statement): matching keys and tolerances, break classification, aging, and auto-resolution rules for the long tail.

Pratik Dhanave · ·8 min read

Moving Money Across Services Without a Distributed Transaction

How to coordinate a multi-step payment as an orchestrated saga: compensating actions for partial failures, idempotent steps, and a guarantee that money is never left stranded.

Teaches how to coordinate a multi-step payment across services without distributed transactions: orchestrated saga steps, compensating actions for partial failures, and guaranteeing money is never stranded.

Pratik Dhanave · ·4 min read

Observability, Safety, and Providers — Microsoft Agent Framework in Python

Turn agent runs into OpenTelemetry spans, block prompt injection with information-flow control, and swap model providers behind one Agent API.

Turn Microsoft Agent Framework agent runs into OpenTelemetry spans, block prompt injection with information-flow control, and swap model providers behind one Agent API.

Pratik Dhanave · ·6 min read

Building a Dunning and Retry Engine for Failed Payments

How decline-code classification, backoff scheduling, retry budgets, and network-token refresh recover subscription revenue without hammering the rails.

Teaches how to build a smart retry/dunning system: decline-code classification (hard vs soft), backoff and retry-window scheduling, retry-budget limits, and network-token refresh to recover subscription revenue.

Pratik Dhanave · ·7 min read

Building Marketplace Split Payments and Connected Payouts

Architecting platform balances, commission splits, delayed payouts, and negative-balance recovery without ever losing a cent.

Teaches how to architect marketplace money movement: platform vs connected-account balances, fee/commission splits, delayed payouts, negative-balance handling, and merchant-of-record vs facilitator models.

Pratik Dhanave · ·7 min read

Engineering Escrow: Conditional Hold and Release with Double-Entry Safety

How to build escrow and conditional hold/release — segregated ledger accounts, release conditions and approvals, partial releases, and expiry auto-refund that never strand money.

Teaches how to build escrow and conditional hold/release: segregated escrow ledger accounts, release conditions/approvals, partial releases, and expiry auto-refund with double-entry safety.

Pratik Dhanave · ·9 min read

Caching Pitfalls and Practice

Caching giveth performance and taketh away your sanity. The same technique that makes systems fast introduces a whole category of subtle, intermittent, hard-to-debug problems — stale data that appears randomly, a cache that collapses under load at the worst moment, bugs that only happen when the cache is cold or full. This closing post catalogs the pitfalls that bite real systems, and distills the practical wisdom of the series: cache deliberately, expect the failure modes, and remember that the two genuinely hard things are still hard.

Caching giveth performance and taketh away your sanity. The same technique that makes systems fast introduces subtle, intermittent, hard-to-debug problems — stale data appearing randomly, a cache collapsing under load, bugs that only happen when the cache is cold. This catalogs the pitfalls and the practical wisdom.

Pratik Dhanave · ·8 min read

Grid Reliability and Assets

Balancing supply and demand keeps the grid running moment to moment — but the grid also runs on millions of physical assets (transformers, lines, substations) that age, wear, and occasionally fail, sometimes catastrophically. Keeping the grid reliable over time means anticipating and preventing those failures, not just reacting to them. This is a data problem — reams of sensor readings hinting at trouble before it happens — and it's where AI helps the grid stay reliable: predicting failures, spotting anomalies, and monitoring the vast physical system.

Balancing keeps the grid running moment to moment — but the grid also runs on millions of physical assets that age, wear, and occasionally fail catastrophically. Keeping the grid reliable means anticipating failures, not just reacting. That's a data problem, and it's where AI helps: predicting failures, spotting anomalies, and monitoring the vast physical system.

All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse the blog or explore related topics using the tag cloud above.