A 1.8-second Node.js API request what would you investigate first?
Hey Product Hunt π
I'm working on APILens, a Node.js API observability tool, and I want to discuss a debugging problem that backend developers often face.
Imagine you're investigating a slow API request and the trace shows:
Total request time: 1,800 ms
Database queries: 1,200 ms across 40 queries
Outbound HTTP call: 350 ms
Remaining application time: 250 ms
This is an illustrative scenario, not production or customer data.
My first instinct would be to investigate the repeated database queries. But before changing the code, I'd want to understand whether those queries are redundant, whether they can be combined, and whether the external API is also contributing to the latency.
What would you investigate first, and what evidence would you need before making a change?
I'm building APILens to help developers correlate request timing, database activity and outbound HTTP calls in a single trace. I'm particularly interested in how experienced developers use this information to decide what to fix first.
For context, here is what I'm building:
APILens: https://apilens.rest
Node.js instrumentation package: https://www.npmjs.com/package/auto-api-observe
I'd be interested in hearing how you approach this with your current tools, and what information you wish your traces showed. Different approaches are welcome!
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.