Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda