How did my Node.js + MongoDB API take 13 seconds to respond? 😭
How did my Node.js + MongoDB API take 13 seconds to respond? 😭
I recently ran into a performance issue in one of my backend APIs.
The API was built with Node.js + MongoDB, and the response time was nearly 13 seconds. 🫠
At first, I thought:
“Maybe MongoDB is slow?”
But obviously, there was more going on.
Now I'm trying to identify the actual bottleneck and optimize the API properly — database queries, indexing, population/aggregation, unnecessary processing, network calls, etc.
For developers who have worked on Node.js + MongoDB production APIs:
What would you check first when an API takes ~13 seconds to respond?
Would love to hear how you would debug this step-by-step