Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Different approaches to optimize the response time of an api that does calculation in server side with NodeJs

I am making an API call from the client (Angular v10) to server-side (NodeJs v12). This API call performs calculations on a very large set of data that takes up around 7-10 min to get completed.

The objective here is to somehow reduce response time to make it efficient and return response faster to clients. The calculation algorithm does contain lots of for loops which consume most of the time.

Some of the alternatives I have are -

  1. Increase the server's processing power where code is going to be deployed.
  2. Integrate AWS Lambda functions to the server and lets it do the calculations part for me. Don't know much about it. Any feedback on this is really appreciated

Is there any other approaches/technology that i should look upon in advance to avoid performance concerns later?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It's not so easy to give you an advice, because to do that I should have some more specific information about the implementation. So below i'm going to list some tips related to the information that you gave and some more topics that you could study more deeply to achieve your goal.

  1. for loops are computationally expensive, so you should have the to reduce if possible some of this. One good approach could be treat the information by query (what database are you using?)

  2. Do you have a monolithic API? Maybe you could split it in micro services take a look at that

  3. AWS lambda is a good ideia, but for me you are not resolving your problem using that.

  4. If you are facing problem retrieving a massing bunch of data, may be you could consider use a memory database as Redis to make cache follow this link

  5. You also have the possibility to apply an old fashioning way to improve your calculus using memoization take a look at that

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!