What evidence helps distinguish an application bottleneck from a database or downstream dependency bottleneck?
Answer
Correlate end-to-end traces, queue time, service latency, database plans and locks, connection pools, CPU, memory, I/O and dependency errors. Change one controlled variable or bypass a dependency to test the hypothesis.
Strong answer includes
- cross-layer correlation
- queues and pools
- controlled hypothesis testing
Practical example
A slow endpoint's trace shows 90% of its time spent waiting on a database call, so instead of guessing, the engineer checks the query's execution plan and finds a missing index causing a full table scan; adding the index cuts the endpoint's p95 latency from 800ms to 40ms, confirming the database, not the application code, was the bottleneck.