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, 2022 in Node-js by Neha
• 9,020 points
809 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, 2022 in Node-js by Kichu
• 19,040 points
2,467 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, 2022 in Node-js by Neha
• 9,020 points
10,222 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, 2022 in Node-js by Neha
• 9,020 points
568 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,840 points
3,442 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,840 points
10,591 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, 2022 in Node-js by Vaani
• 7,070 points
1,204 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,941 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,467 views
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