Chapter 1 of 9

One line

Incident clock · Tue 29 Sep
14:00:45
real time
pod …k7wq2 · container api
Event-loop lag2 ms CPU90m Memory118Mi Requests waiting0 Readiness failures in a row0 / 3 Liveness failures in a row0 / 3 ReadyTrue

      

a request (each dot ≈ 7 requests) waiting, or the work holding the thread healthy, answered failed or killed
A Machine Room story · about 2½ minutes

The Bulk Import That Froze a Pod

Node.js runs your JavaScript on a single thread. Usually that's fine, because most of a request is spent waiting on a database or the network, and waiting doesn't use the thread. Synchronous work does. While it runs, nothing else in that process can run: no other requests, no health checks, not even a shutdown handler.

This story follows one real-world way that goes wrong. A config change lets a customer upload a 150 MB JSON file, and one pod parses it on its only thread. Then Kubernetes does exactly what it was told to do.

You'll learn

  1. Why one synchronous call, JSON.parse on a huge body, stops every request in a pod, including its health checks.
  2. What readiness and liveness probes do when they fail: readiness takes the pod out of the Service, and liveness restarts the container.
  3. Why exit code 137 doesn't always mean out of memory, and which field tells you what really happened.
  4. Why a problem inside one pod shows up as errors across the whole service, and how to fix it properly.

How to watch

The ringis the event loop. It only turns while it's getting work done. If it stops, the thread is stuck.
The sidebarshows the kubectl output you'd see at that moment in a real cluster.
The clockis the incident's real time. It tells you when the story is in slow motion or fast-forward.
Space play/pause · ← → 5 s · [ ] chapters · Esc close
0:00 / 2:40