How can i make my REST API Faster with nodejs and express

0 votes
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.
Aug 19 in Node-js by Neha
• 8,920 points
27 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Node-js

0 votes
0 answers

How can I completely uninstall nodejs, npm and node in Ubuntu

I installed it using: sudo apt-get install ...READ MORE

May 15 in Node-js by Kichu
• 19,040 points
1,091 views
0 votes
1 answer
0 votes
1 answer

How to make login with Nodejs and MongoDB?

MongoDB Login and Registration with Node js ...READ MORE

answered Jun 16 in Node-js by Neha
• 8,920 points
1,881 views
0 votes
0 answers

How can I update NodeJS and NPM to their latest versions?

I just installed Node.js & NPM (Node Package Manager) I ...READ MORE

Aug 11 in Node-js by Neha
• 8,920 points
20 views
0 votes
1 answer

How do I “include” functions from my other files in nodejs?

Hello @kartik, You require any js file,so you just ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,780 points
1,756 views
0 votes
1 answer

How can I use an http proxy with node.js http.Client?

Hello @kartik, You can use request, I just found ...READ MORE

answered Jul 17, 2020 in Node-js by Niroj
• 82,780 points
6,272 views
0 votes
0 answers

Send Post request in Node js Rest API

FROM THE CLIENT SIDE, I CAN'T SEND ...READ MORE

Jun 27 in Node-js by Vaani
• 7,020 points
40 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,045 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP