DevOps Engineer interview question · Most asked
Response time rose from 200 ms to 5 seconds, but CPU and memory look normal. How do you troubleshoot it with APM tools such as Datadog or AppDynamics?
Scenario Asked in DevOps Engineer · Site Reliability Engineer (SRE) interviews
Summary
Normal CPU and memory with high latency means the service is mostly waiting: on a database, another service, a lock, a connection pool, DNS or a thread pool. APM traces show exactly where: open slow traces, find the span that takes the 5 seconds, and follow it to the dependency.
Longer Answer
- Service map / flow map: which downstream call's latency rose at the same time?
- Trace breakdown: time in database spans vs HTTP calls vs the service's own code; look for a span with a suspiciously round duration (timeouts and retries: 5 s is a common default timeout).
- Database: slow query analytics (Datadog DBM, AppDynamics database visibility): new or changed queries, lock waits.
- Pools and threads: connection pool wait time, thread pool queue length, async event loop lag.
- Infrastructure the APM doesn't see: DNS resolution time, TLS handshakes to a new endpoint, NAT gateway port exhaustion, a network path change.
- Correlate: deploy markers, config changes, a dependency's own incident, traffic mix (a slow endpoint now called more).
- In AppDynamics, business transactions and snapshots give the same view as Datadog's traces; the method doesn't change with the tool.
Key Points
- High latency with idle CPU = waiting.
- Find the slow span in traces.
- Round numbers suggest timeouts.
- Check pools, threads, locks and DNS.
- Correlate with changes and dependencies.
Explanation
What interviewers look for
Knowing that normal resource usage points to waiting, and using traces to find what the service waits for.
More DevOps Engineer questions
- Every deployment produces a burst of 502s. What do you check?
- Design an end-to-end CI/CD and GitOps setup for 50 microservices, with testing, security scanning, artifact management and production deployment.
- Pods keep restarting with OOMKilled under load. How do you investigate and fix it?
- What happens when you type a URL into a browser and press Enter?
- Your ecommerce site runs 30 microservices on Kubernetes. After a deployment, customers start getting HTTP 503 errors. How do you investigate and resolve it?
- Your Kubernetes-based ecommerce site goes down during peak traffic. Walk through your first 15 minutes.
- A rollback after a release made the outage worse because the database had already been migrated. How do you design releases so rollbacks are always safe?
- After a release, checkout becomes slow. How do you use traces, JVM metrics, connection pool metrics and database monitoring to find the cause?