Volume 11 · Chapter 3 — Banking Production Support and Troubleshooting
Common Failure Patterns and Runbooks
3.1 Introduction
Most production incidents fall into a handful of recognizable patterns, and knowing them - their symptoms, causes, and standard responses - lets you diagnose and mitigate far faster. This chapter catalogues the common failure patterns (high latency, elevated errors, resource exhaustion, cascading failure, traffic spikes) as lightweight runbooks. Recognizing which pattern you’re facing is a huge accelerator in an incident, and being able to enumerate these patterns and their responses is exactly the practical knowledge senior support and interview questions look for.
3.2 High Latency
Symptom: requests are slow - elevated latency, especially at the p95/p99 tail. Common causes: a slow database query or saturated database, a slow or timing-out downstream dependency, resource saturation (CPU/memory) forcing queuing, insufficient capacity for the load, or a recent change that made something slower. Diagnosis: use traces to find where the time goes - which service or call is the slow segment - then logs and the component’s metrics to see why. Response: if a recent deploy caused it, roll back; if the database is the bottleneck, offload reads to replicas/cache or fix the query; if under-capacity, scale out; if a dependency is slow, the circuit breaker and timeouts should be containing it. The key is that latency is localized with traces - don’t guess where the slowness is.
3.3 Elevated Error Rate
Symptom: a rise in failed requests - error rate climbing. Common causes: a bad deployment introducing a bug, a failing dependency, bad input or data, resource exhaustion causing failures, or a configuration problem. Diagnosis: metrics scope it, traces localize which service or downstream call errors, and logs (by correlation ID) reveal the specific error. Check what changed - a recent deploy is a prime suspect. Response: if a deployment caused it, roll back (fastest fix); if a dependency is failing, the circuit breaker should fail fast to a fallback and you address the dependency; if it’s bad data or config, correct it. The distinction from latency is that errors are outright failures, so the logs’ error messages usually point directly at the cause once traces localize the failing component.
flowchart TB
Sym{Symptom?} -->|Slow| Lat[High latency:\ntrace to find slow segment;\nDB/dependency/capacity/change]
Sym -->|Failing| Err[Elevated errors:\nlogs for error; check deploy;\ndependency/data/config]
Sym -->|Resource maxed| Sat[Saturation:\nscale out; fix leak/query;\nraise limits]
Sym -->|Spreading outage| Casc[Cascading failure:\ncircuit breakers/timeouts;\nfind the origin dependency] 3.4 Resource Exhaustion
Symptom: a resource is maxed out - CPU pinned, memory exhausted (out-of-memory kills), disk full, database connections exhausted, thread pool saturated, or queue depth growing unbounded. Common causes: insufficient capacity for the load, a memory leak, an inefficient query or operation consuming resources, connection leaks (not releasing connections), or a spike in demand. Diagnosis: the saturation metric identifies which resource; then determine whether it’s genuine load (needs scaling) or a leak/inefficiency (needs fixing). Response: scale out or up for genuine capacity needs; fix leaks (memory, connections) and inefficient queries; use connection pooling; set and tune resource limits. Resource exhaustion often underlies latency and errors, so identifying the exhausted resource is frequently the key to explaining a broader symptom.
3.5 Cascading Failure and Traffic Spikes
Cascading failure - one component’s failure dragging down others - shows as a spreading outage where multiple services fail in sequence. The cause is usually a failing dependency propagating through synchronous calls without adequate resilience (missing timeouts, retries amplifying load, no circuit breaker). Response: the resilience patterns should contain it - circuit breakers stop calling the failing dependency, timeouts prevent resource exhaustion from blocked calls - and you find and address the origin dependency; sometimes shedding load helps. Traffic spikes - a sudden surge overwhelming capacity - show as latency and errors under high request rate; the response is auto-scaling to add capacity, queues to buffer, and load shedding or rate limiting if the spike exceeds what you can scale to. Both patterns are ultimately about the system’s resilience and elasticity holding under stress.
3.6 Banking Production Scenario
A bank’s support team recognizes failure patterns quickly. When payment latency climbs, they identify the high-latency pattern, trace to the database as the slow segment, and find an inefficient query from a recent deploy - rollback mitigates. When an error spike hits, they recognize the elevated-error pattern, and logs reveal a failing downstream dependency the circuit breaker is now failing fast. When memory alerts fire, they identify resource exhaustion - a connection leak - and fix it while scaling to cope. When payday traffic surges, the traffic-spike pattern triggers auto-scaling and queue buffering. Because the team recognizes these standard patterns and has runbooks for each, they diagnose and mitigate in minutes rather than investigating from scratch every time - the practical payoff of pattern recognition in production support.
3.7 Troubleshooting: Failing to Recognize Patterns
Slow incident resolution often means not recognizing the failure pattern. Treating every incident as novel and investigating from scratch wastes time - learn the common patterns (latency, errors, saturation, cascading, spikes) and their standard responses. Confusing symptom with cause (fixing high latency without finding the saturated database behind it) means not tracing to the underlying resource. Repeatedly hitting the same failure means no runbook was written - document the pattern and response after each incident. Missing that errors or latency stem from resource exhaustion means not reading the saturation signals. Not containing a cascading failure means resilience patterns (circuit breakers, timeouts) are missing. The discipline is to recognize the pattern fast, apply its runbook, trace symptoms to their underlying resource or dependency, and capture new patterns as runbooks so the team resolves them faster next time.
What are the common production failure patterns, and how do you respond to each?
Most production incidents fall into a handful of recognizable patterns, and knowing them lets me diagnose and mitigate far faster than investigating from scratch. The first is high latency - requests are slow, especially at the p95/p99 tail. Common causes are a slow or saturated database, a slow or timing-out downstream dependency, resource saturation forcing queuing, insufficient capacity, or a recent change that made something slower. I use traces to localize where the time goes - which service or call is the slow segment - then logs and that component’s metrics to see why, and I respond by rolling back if a deploy caused it, offloading reads to replicas or cache or fixing the query if the database is the bottleneck, scaling out if under-capacity, or relying on circuit breakers and timeouts if a dependency is slow. The second is an elevated error rate - a rise in failed requests, commonly from a bad deployment, a failing dependency, bad data or input, resource exhaustion, or a config problem. Metrics scope it, traces localize the failing component, and logs by correlation ID reveal the specific error; I check what changed, roll back if a deploy caused it, let the circuit breaker fail fast to a fallback if a dependency is failing, and fix bad data or config otherwise. The third is resource exhaustion - a resource maxed out, like CPU pinned, memory exhausted with out-of-memory kills, disk full, database connections or thread pool exhausted, or unbounded queue growth - caused by insufficient capacity, a memory or connection leak, an inefficient query, or a demand spike. The saturation metric identifies the resource, and I determine whether it’s genuine load (scale out or up) or a leak or inefficiency (fix it, use connection pooling, tune limits); this often underlies latency and errors. The fourth is cascading failure - one component’s failure dragging down others in a spreading outage - usually a failing dependency propagating through synchronous calls without adequate resilience; the response is that circuit breakers and timeouts should contain it while I find and address the origin dependency, and sometimes shed load. The fifth is a traffic spike - a sudden surge overwhelming capacity, showing as latency and errors under high request rate - handled by auto-scaling to add capacity, queues to buffer, and load shedding or rate limiting if the surge exceeds what I can scale to. The common thread is recognizing which pattern I’m facing quickly - because errors, slowness, saturation, cascades, and spikes are different failure modes with different causes and standard responses - then applying its runbook, tracing symptoms to the underlying resource or dependency rather than confusing symptom with cause, and capturing any new pattern as a runbook afterward. That pattern recognition is what turns incident response from investigating everything from scratch into a fast, methodical application of known responses.
Chapter Revision Notes
- High latency: trace to the slow segment; causes are slow DB/dependency, saturation, under-capacity, or a change - roll back, offload/cache, or scale.
- Elevated errors: logs reveal the error, traces localize it; check for a bad deploy (roll back), failing dependency (circuit breaker), or bad data/config.
- Resource exhaustion: saturation metric names the resource; distinguish genuine load (scale) from a leak/inefficiency (fix, pool connections, tune limits).
- Cascading failure: contained by circuit breakers and timeouts; find the origin dependency. Traffic spikes: auto-scale, buffer with queues, shed/rate-limit.
- Recognize the pattern fast, apply its runbook, trace symptoms to the underlying cause, and capture new patterns as runbooks.