Summarize the problem
My problem: I have built a slow API. I want to make my api faster.
I am using Node.js and express to make REST APIs. And I have one api that takes average response time of 3.5s.
Below is what it does.
It gets all userIds.
Based on the userIds, it requests parallel REST APIs to get other user Data such as projectIds and groupIds. (Since the databases are in different DB, it is inevitable to make different Rest APIs)
Based on the userData(userId, projectId, groupId etc..), it filters. ex) projectId = 1.
It requests 4 different REST APIs in parallel such as schedule and timezone and so on.
I believe I am making two many requests because if there is 10 accounts. I am making 54 requests in total to response.
I want to get whole DB table with each request and combine them with code. Help me there is better way to do it.