16
A new release caused CPU usage to spike on one backend service. How would you debug it?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would first compare the new version against the old one and identify which endpoint or code path changed. Then I would profile the service, look at traces and logs, and isolate the hottest function or query. The reason I start with measurements is that performance issues are usually a symptom of a specific hot path, not a general feeling. Once I find the cause, I would fix the algorithm, reduce unnecessary allocations, or add caching if that fits the use case. I would also make sure the fix is covered by a benchmark so the same regression does not come back.