Skip to content

11. Breaking Things on Purpose, Then Writing It Down

Why drill this instead of just reading about it

Section titled “Why drill this instead of just reading about it”

A dashboard answers “what hurts” once telemetry exists — it doesn’t replace procedure. The expensive mistakes in a real incident are repeating the same twenty-minute spiral, losing the query that actually worked, and shipping a fix without writing down why the outage happened. This lesson turns Lessons 9 and 10’s observability stack into practiced muscle memory: break a dependency on purpose, investigate it through metrics/logs/traces, then leave a reusable runbook and a blameless post-incident record behind so the next person — including future-me — doesn’t start from zero.

Every drill follows the same order, deliberately, because panic makes people skip steps: confirm the symptom from the user’s perspective, open the golden-signals dashboard, drill into whichever signal actually moved, form a hypothesis narrow enough to falsify with one command, mitigate, then record.

Drill A: Redis down — and a bug neither the lesson nor I predicted

Section titled “Drill A: Redis down — and a bug neither the lesson nor I predicted”

The expectation going in was a fast, clean 500 on cart routes once Redis dropped. What actually happened: POST /api/cart didn’t return at all — measured at 3 minutes 21 seconds with no response before manual cancellation. Root cause was in the Redis client construction itself: no reconnectStrategy configured, so node-redis v4’s default behavior is to retry the connection indefinitely. Since the cart route awaits the Redis call directly with nothing wrapping it, the entire HTTP request stayed open for as long as the client kept retrying — unbounded, not just slow.

That’s a materially worse failure mode than a clean error: a hung request ties up a connection or handler indefinitely instead of failing fast, which under real load can exhaust a connection pool rather than just returning an error page. The fix that actually changes user-facing behavior isn’t capping the reconnect attempts alone — it’s wrapping the Redis call in a short timeout so a single request fails fast regardless of what the client’s background reconnection is doing.

A second thing worth its own line: the stock /health endpoint never checked Redis at all, and stayed green the entire time cart was completely broken. A monitoring setup watching only /health would have shown a fully healthy service throughout a real customer-facing outage.

Drill B: Postgres down — total outage, not a scoped one

Section titled “Drill B: Postgres down — total outage, not a scoped one”

The lesson’s own material predicted /api/products failing while everything else kept working. What was actually measured: every route, including /health — which touches nothing Postgres-related — returned an instant connection refusal. The Node process itself had crashed. Root cause: the database pool’s error handler called process.exit(-1) on any pool-level error, including “Postgres unreachable,” which kills the entire process rather than failing the one query that triggered it.

That distinction matters operationally, not just academically — mitigation for this drill needed two separate steps, restarting Postgres and manually restarting the crashed backend process, where the Redis drill needed only one (the client reconnected on its own once Redis came back). Documenting that difference explicitly is exactly the kind of detail a generic “restart the dependency” instinct misses under pressure.

Runbook vs. RCA — different documents, different lifespans

Section titled “Runbook vs. RCA — different documents, different lifespans”

A runbook is reusable: what to check first, which dashboard views matter, what confirms the theory, what mitigates it — no narrative timestamps, because it needs to still be correct next year regardless of who’s on call. An RCA is historical: what happened in this specific window, what we believed at each step, what was actually wrong, and what’s changing so this class of failure gets rarer. Both live in version control next to the application code, so they go through the same review process as everything else — and both RCAs from these drills documented honestly where a step (live Loki or Tempo verification) got skipped in favor of faster direct evidence, rather than implying more was checked than actually was.

Teams in the 10-150 person range typically pin one primary dashboard per service in the on-call index, not fifty favorites, and update the same runbook file in the PR that ships the actual fix rather than as a separate, easily-forgotten task. The recurring shortcut that hurts: health checks that only hit a shallow /health endpoint while a real dependency is down — exactly what both drills here demonstrated directly, not hypothetically.


Next: Lesson 12, The first steps in the Cloud.