Posts tagged System Design — AI × software engineering, made practical.
You'll learn how system design rubrics score candidates, and how to present a simple-first design with measurable scale triggers so the rubric sees your judgement.
You will learn how the bulkhead pattern isolates shared capacity, starting with classic thread pools and then applying it to LLM agents through per-sub-agent context budgets, tool output caps and summary-only boundaries.
You will learn what a shard key actually commits you to (locality, load distribution, blast radius and rebalancing cost), how range, hash and directory sharding differ, and how to build in an escape hatch before you need one.
You will learn how service discovery works, how client-side and server-side discovery differ, when a registry is worth it compared with static config, and how the same choice applies to MCP servers and agent tool registries.
You'll learn why payload-based idempotency keys fail when an LLM agent retries, and how to fix it with plan-step IDs, intent keys, convergent tools and guarded one-shot actions.
Learn what CQRS actually splits between write and read models, why projection lag becomes a permanent fact you have to own once you adopt it, and how to expose staleness as data for both dashboards and AI agents.
You'll learn how to classify saga and agent-pipeline steps as reversible, semi-reversible, or terminal, and use that classification to decide execution order so your rollback path never tries to undo something that can't be undone.
Event-driven architecture never actually removes the dependency between your services — it just deletes the paper trail, and the same blind spot is already sitting inside your multi-agent pipelines.
A rising cache-hit ratio and a growing pile of 'site feels slow' tickets can both be true in the same quarter — here's the arithmetic behind that blind spot, and why the exact same trap is now showing up in LLM prompt caching and multi-agent pipelines.
When you split a task by role instead of by knowledge, both agents' logs can show flawless reasoning — and the merge still breaks, for a reason neither agent could have caught alone.
Majority vote feels like triple-checking your agents, but when three instances share one blind spot, unanimous agreement is just the same wrong answer said three times — here's the asymmetric tiebreaker pattern that actually catches it.
Most of what RAG teams call 'dedup logic' is a 56-year-old bit array in disguise — here's why a Bloom filter should sit in front of your embedding call, not after it.
One team's shard key change is a maintenance ticket; the other's is a multi-day outage — and the difference was decided months before anyone noticed the traffic shift.
A user swears their save vanished and nothing was lost — it's a race between your replica and the refresh button, and the same race quietly wrecks AI agents that check their own writes.
Two agents answered the same support ticket with two contradicting replies, no error ever fired, and the postmortem verdict was scarier than a bug: the system worked exactly as designed — nobody had just agreed on what that design was.
Every failure you're currently blaming on prompt engineering — the bottleneck agent, the re-plan that breaks on scale, the handoff where two agents end up disagreeing — already has a name and a fix, and distributed database engineers wrote it up over a decade ago.
A vanishing task flag in a two-agent system isn't a merge bug — it's Brewer's CAP theorem showing up uninvited, and your orchestration framework already picked a side without asking you.
The tenant_id shard that held up for a year under real human traffic didn't survive three weeks of an unattended AI agent — here's the layer that would have turned the outage into a config change.
One question — 'can you point to the seam?' — decides whether adding a person, a server, or an AI agent makes you faster or just adds coordination tax.
CAP only kicks in during the rare network partition — PACELC is the quieter, un-diagrammed trade-off charging your agent stack's latency budget on every single request, partition or not.
That double-booking bug you filed under "LLM hallucination" was actually your orchestrator making an unwritten CAP tradeoff — here's how to catch it before the next incident does.
A gut-check for engineers who reach for Kafka by default: if the consumer can't perceive the latency win, streaming isn't buying speed, it's buying you an incident channel.
A network hiccup forces every distributed system — including the fleet of LLM calls hiding behind a single "agent" — into a choice between a fast wrong answer and a slow right one, and most teams never notice they made it.
One back-of-envelope habit tells you, before you write a line of code, whether your design needs three servers or three hundred — and why your multi-agent pipeline is already slow for reasons that have nothing to do with your code.
A team spent two weeks bulletproofing a prompt that told an agent never to issue a refund — and the agent did it anyway, because the rule was sitting in the one place that was always up for negotiation.
A whiteboard test — and a real production refund bug — for telling an actual agent apart from a chatbot wearing a trenchcoat.