Latency spikes at the top of every hour and recovers after about two minutes.
IntermediateTroubleshootingLatency
Answer
Likely causes → Scheduled work: cron jobs or batch reports hitting the same DB, cache entries all set with a 1-hour TTL expiring together (stampede), log rotation, or backups/snapshots.
Diagnose →
kubectl get cronjobs -A -o custom-columns=NAME:.metadata.name,SCHEDULE:.spec.schedule | grep -E '^\S+\s+0 '
Overlay DB CPU, cache hit ratio and job start times on the same graph.
Fix → Move heavy jobs to a read replica and off the hour, and add jitter to cache TTLs.
Prevent → Use jittered schedules (e.g. 17 * * * *), request coalescing or "early refresh" for hot cache keys, and a shared calendar of batch jobs.
More on Latency
p99 latency jumped from 200 ms to 3 s right after a deploy; error rate is flat.BeginnerThe API is slow, the database shows 100% CPU, and the slow query log is full of one query doing a sequential scan.BeginnerA JVM service has latency spikes every 30–60 seconds; GC logs show "Pause Full (G1 Compaction Pause)" taking 4 seconds.IntermediateThe first request after idle takes 5 seconds; Lambda logs show "Init Duration: 4512.33 ms".BeginnerLatency grows with traffic and logs show "QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00".IntermediateA container uses only 40% of its CPU limit on average, yet latency is high; `container_cpu_cfs_throttled_periods_total` keeps rising.Advanced