Code Room
On-callHard
Question
Your write-heavy Postgres primary shows a regular, painful pattern: every few minutes write latency p99 spikes from 5ms to 400ms for 20–30 seconds, then recovers, like clockwork. During each spike, disk write I/O and `iowait` jump, and the logs show frequent checkpoint activity with `checkpoints are occurring too frequently`. Traffic is steady — the spikes don't line up with traffic, they line up with each other at a fixed interval. The instance has plenty of CPU. Triage and mitigate.
What a strong answer looks like
Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.