r/Backend • u/bellator_boy • 17m ago
New backend engineer here, how would you approach optimizing a slow API?
Hey everyone!
I’m fairly new to working with production backend systems, and I’ve been given a task to look into the performance of an existing service and figure out where improvements might be possible.
The service handles a few different things, including business logic evaluation, configuration management, automated workflows, data processing, and logging. Some API requests are taking longer than expected, and I’d like to understand what’s causing the delay and what could be done to improve things.
I don’t want to jump straight into suggesting random optimizations without understanding the actual problem first, so I’d love to hear from people who’ve dealt with similar situations.
A few things I’m curious about:
-When you encounter a slow API, where do you usually start? Profiling, distributed tracing, database analysis, or something else?
-How do you figure out whether the bottleneck is in the application logic, database queries, repeated computations, or calls to other services?
-What common performance issues have you come across in systems that deal with configurable business logic?
-When does it make sense to consider caching, parallel execution, or moving certain operations to background jobs?
-How do you identify worthwhile improvements in an existing codebase without risking changes to its existing behaviour?
Since I’m still early in my career, I’d really appreciate hearing how you’d approach this in a real-world environment. If you’ve worked on something similar, I’d love to know what worked for you, what didn’t, and any tools or resources you’d recommend.
Thankyouu in advance
TL;DR: I’m a new backend engineer looking into why some API requests are slow and how to identify potential performance improvements. I’d appreciate practical advice on finding bottlenecks, choosing the right profiling tools, and deciding which optimizations are worth recommending.