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

203
Visualizações
What are the side effects of a large Keep-Alive in NODEJS

We've experienced 502 (BAD GATEWAY) on load tests due to the following settings in Express:

const app = express();
const server = app.listen(port);
server.keepAliveTimeout = 61 * 1000;
server.headersTimeout = 65 * 1000;

I've changed them to

const app = express();
const server = app.listen(port);
server.keepAliveTimeout = 120 * 1000;
server.headersTimeout = 125 * 1000;

And ever since the 502 (BAD GATEWAY) disappeared.

What are the consequences and side effects of a large KeepAlive ,assuming that I plan to support more Users Per Second in the future (at the moment around 30 U/S) ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

handling each request takes time, so when you send a heavy load on your server, your server keep your requests in memory and process each request in queue so, when your sever process fast it could empty the queue and memory as soon as possible but when it takes time, request reach timeout so when you increase the time out your server when trying to empty queue and memory look at time out and if a timeout occurred send 5XX error, and answer to your question, increasing the value of timeout don't increase request per second of your server

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