Anirudh Sharma
Anirudh Sharma

Building systems, breaking illusions, and sharing learnings.

Inference Engineering: Part 2/8: One Long Prompt Delays Everyone Else's Tokens

Inference Engineering: Part 2/8: One Long Prompt Delays Everyone Else's Tokens

Why can one request with a long input disrupt users whose answers are already streaming?

Oct 12, 2026

Inference Engineering: Part 1/8: One Request, Many Turns on the GPU

Inference Engineering: Part 1/8: One Request, Many Turns on the GPU

An LLM answer needs repeated computation and growing memory. Follow what happens when many users need both at once.

Oct 5, 2026

Systems That Self-Heal: Designing For Automatic Recovery

Systems That Self-Heal: Designing For Automatic Recovery

Instead of firefighting, build systems that recover without waiting for you.

Sep 28, 2026

5 Engineering Lessons From 52 Weeks of Writing

5 Engineering Lessons From 52 Weeks of Writing

A one-year special edition on distributed systems, databases, and production AI.

Sep 21, 2026

Load Balancing Beyond Round-Robin

Load Balancing Beyond Round-Robin

A decision framework for algorithms, health checks, affinity, and global routing

Sep 14, 2026

Why Faster Services Can Make the System Slower

Why Faster Services Can Make the System Slower

The price of anarchy measures the cost of teams improving local service metrics against the same shared system.

Sep 7, 2026

Prompt Engineering Patterns for Production

Prompt Engineering Patterns for Production

Six prompt patterns with evidence behind them, the mechanisms that make them work, and the checks that keep them working as models change.

Aug 31, 2026

Auction Theory In System Design: How AWS Spot Pricing Works

Auction Theory In System Design: How AWS Spot Pricing Works

The story of the 8 years when AWS let engineers bid against each other for servers, why it stopped, and what it teaches about buying compute cheaply today

Aug 24, 2026

Distributed Tracing: Following Requests Across Many Services

Distributed Tracing: Following Requests Across Many Services

A request fans out across 50 services and comes back slow. Every dashboard is green. Tracing is how we find out where the time actually went.

Aug 17, 2026

When to Fine-Tune vs Prompt vs RAG: A Decision Framework

When to Fine-Tune vs Prompt vs RAG: A Decision Framework

Three tools, one decision. Here's how to choose, and why it's usually not the one you think.

Aug 10, 2026

Message Queues: Delivery Guarantees Demystified

Message Queues: Delivery Guarantees Demystified

At-least-once, at-most-once, exactly-once. What do these actually mean, and which one do you really have?

Aug 3, 2026

The Probability Distribution Cheat Sheet Every Engineer Needs

The Probability Distribution Cheat Sheet Every Engineer Needs

Seven distributions that show up everywhere in systems and ML, and how to know which one you are looking at.

Jul 27, 2026

Guardrails and Safety Layers for LLM Applications

Guardrails and Safety Layers for LLM Applications

Your LLM will try to do things it shouldn't. Here's how to stop it.

Jul 20, 2026

Sharding Strategies: Splitting Data Across Machines

Sharding Strategies: Splitting Data Across Machines

One database isn't enough. Here's how to split your data without the pain.

Jul 13, 2026

LLM Token Economics Is Textbook Monopoly Behaviour

LLM Token Economics Is Textbook Monopoly Behaviour

Apply consumer theory to understand why LLM pricing works the way it does

Jul 6, 2026

The Saga Pattern: Distributed Transactions Without 2PC

The Saga Pattern: Distributed Transactions Without 2PC

Why two-phase commit fails in production, and how sagas use compensating transactions to build reliable cross-service workflows without distributed locking.

Jun 29, 2026

Observability for LLM Applications: Seeing Inside the Black Box

Observability for LLM Applications: Seeing Inside the Black Box

LLMs break traditional observability. Log tokens, trace multi-step chains, attribute costs, monitor quality with evals, and handle privacy deliberately.

Jun 22, 2026

Event Sourcing: When, Why, and How (and When Not To)

Event Sourcing: When, Why, and How (and When Not To)

Event sourcing is cool, until it isn't. Store events, not state but only when it makes sense.

Jun 15, 2026

Why Your Load Balancer is Solving a Market Design Problem

Why Your Load Balancer is Solving a Market Design Problem

Load balancing algorithms are resource allocation mechanisms in disguise.

Jun 8, 2026

Latency Optimization for LLM Applications

Latency Optimization for LLM Applications

Three seconds will still feel like forever to your users. Make sure they never have to wait that long staring at a spinner.

Jun 1, 2026

Distributed Locks: Patterns, Pitfalls, and the Redlock Controversy

Distributed Locks: Patterns, Pitfalls, and the Redlock Controversy

Locking across machines is harder than you think

May 25, 2026

The True Cost of LLM Applications

The True Cost of LLM Applications

Your LLM costs more than you think - here's the full picture

May 18, 2026

Backpressure: When The System Can't Keep Up

Backpressure: When The System Can't Keep Up

Fast producers + slow consumers = cascading failure

May 11, 2026

Building Reliable AI Agents

Building Reliable AI Agents

Unserstanding deeply what actually breaks in production

May 4, 2026

Database Replication Topologies

Database Replication Topologies

One copy isn’t enough. Here’s how databases stay synchronized.

Apr 27, 2026

Load more

The Main Thread

AboutEssaysXGitHubRSS
© 2026 The Main Thread.
beehiivPowered by beehiiv