IntermediateScenario
10 min

API Latency Spike

APILatencyPerformanceTroubleshooting
Advertisement
Interview Question

Your API’s average latency jumped from 100ms to 2s without an increase in traffic. How would you investigate?

Key Points to Cover
  • Check APM/distributed tracing for slow endpoints
  • Identify database or downstream dependency delays
  • Look for thread/connection pool saturation
  • Check recent deployments/config changes
  • Add caching or optimize slow queries
Evaluation Rubric
Uses APM/tracing to isolate cause30% weight
Investigates downstream dependencies30% weight
Considers infra bottlenecks20% weight
Suggests practical remediation20% weight
Hints
  • 💡Check if a single slow dependency is causing tail latency.
Common Pitfalls to Avoid
  • ⚠️Jumping to conclusions without sufficient data from monitoring tools.
  • ⚠️Focusing solely on the API layer and neglecting external dependencies.
  • ⚠️Ignoring resource utilization and potential saturation issues.
  • ⚠️Failing to consider recent code changes or deployments as a potential cause.
  • ⚠️Not thoroughly analyzing application logs for subtle clues.
Potential Follow-up Questions
  • How do you design alerts for latency?
  • What about p95/p99 metrics?
Advertisement