Under load, pods start failing readiness with `Readiness probe failed: Get "http://10.244.1.7:8080/healthz": context deadline exceeded (Client.Timeout exceeded while awaiting headers)`, and the remaining pods collapse.
AdvancedTroubleshootingReliability Patterns in Production
Answer
Likely causes → The probe endpoint competes with real traffic for the same threads, or checks downstream dependencies. Under load it times out (default timeoutSeconds: 1), pods are removed from endpoints, the remaining pods get more traffic and fail too: a cascading failure.
Diagnose →
kubectl describe pod -n shop -l app=checkout | grep -B2 -A2 "Readiness probe failed"
kubectl get endpointslices -n shop -l kubernetes.io/service-name=checkout -w
Fix → Make the readiness endpoint cheap and local (no dependency calls), raise timeoutSeconds and failureThreshold, and serve probes on a separate lightweight listener if possible. Add load shedding so overloaded pods reject excess work instead of becoming unready.
Prevent → Load test with probe behaviour in mind, and never use dependency checks in liveness probes.
More on Reliability Patterns in Production
Clients get 503s with body `upstream connect error or disconnect/reset before headers. reset reason: overflow`, and Envoy logs show flag `UO`.AdvancedNGINX ingress returns 504 and logs `upstream timed out (110: Connection timed out) while reading response header from upstream`.BeginnerAfter a 30-second database blip, Postgres keeps rejecting connections with `FATAL: sorry, too many clients already` for 20 minutes.AdvancedCustomers were charged twice during an incident where the payment API timed out.AdvancedEvery rolling deploy produces a short burst of 502s on the AWS ALB.IntermediateRedis restarted and immediately the database CPU hit 100% and the site went down.Advanced