-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
You are using only 1 core over the 32 available on the c3.8xlarge for the Express benchmark, while you compare with Crow and others in multi thread mode
It would be nice to update the express code to use fork method of Node.js
Code is quite easy (taken from http://rowanmanning.com/posts/node-cluster-and-express/)
// Include the cluster module
var cluster = require('cluster');
// Code to run if we're in the master process
if (cluster.isMaster) {
var cpuCount = require('os').cpus().length;
// Create a worker for each CPU
for (var i = 0; i < cpuCount; i += 1) {
cluster.fork();
}
// Code to run if we're in a worker process
} else {
// Include Express
var express = require('express');
// Create a new Express application
var app = express();
// Add a basic route – index page
app.get('/', function (req, res) {
res.send('Hello World!');
});
// Bind to a port
app.listen(3000);
console.log('Application running!');
}reajuria, knee-cola, williamdes, Jeff-HOU, hsk-kr and 3 more
Metadata
Metadata
Assignees
Labels
No labels