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

152
Vistas
node http performance under windows

I'm trying to measure the performance of my application and bumped into an issue with the Windows system. When I'm bombarding the app below via the http://localhost:8001/ address, I get about 4 thousand requests. However, if I start doing the same from another laptop, I get only ~150 requests per second. The network is a home WiFi with about 45Mbps speed. What is more important, the amount of instances does not make any difference, the speed is always the same 150 requests per second. I've disabled the firewall on the machine with the server application but still see the same 150 requests per second. Please, help me understand this issue, what is going on?

UPD: I create the load using ab -c 10 -n 1000 http://<host>:8001/ where <host> is either the name of another laptop or localhost.

const http = require('http');
const cluster = require('cluster');
const numCPUs = 8;
const requestListener = function (req, res) {
    res.writeHead(200);
    if (req.url === '/test') {
        res.end(JSON.stringify(content)); // some big payload
        return;
    }
    res.end('some small payload');
}

cluster.schedulingPolicy = cluster.SCHED_RR;

if (cluster.isMaster) {
    console.log(`Master ${process.pid} is running on ${numCPUs} CPUs`);

    for (let i = 0; i < numCPUs; i++) {
        cluster.fork();
    }

    cluster.on('exit', (worker, code, signal) => {
        console.log(`worker ${worker.process.pid} died`);
    });
} else {
    const server = http.createServer(requestListener);

    server.listen(8001);
}

about 4 years ago · Juan Pablo Isaza
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