Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

212
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda