Streams 3
Corking and Uncorking
Http maxSockets defaults to unlimited
Cluster has two modes;
Default is round robin, can still let workers accept connections
Buffer memory improvements
TLS improvements
TLS asynchronous SNI callbacks
TLSÂ OCSP stapling
TLSÂ storage events
spawnSync/execSync commands
New Crypto APIs
VM improvements
ECMA-402 support
var cluster = require('cluster');
// Set this before calling other cluster functions.
cluster.schedulingPolicy = cluster.SCHED_NONE;
cluster.fork();
var exec = require('child_process').execFileSync
var $ = require('cheerio')
var html = exec('curl', ['-s', 'http://nodejs.org/']).toString()
var version = $(html).find('.version')
.text()
.replace(/^.*\s(?=v)/,'')
console.log(version)
var spawn = require('child_process').spawnSync
var $ = require('cheerio')
var child = spawn('curl', ['-s', 'http://nodejs.org/'])
console.log('curl exited with status %d', child.status)
var html = child.stdout.toString()
var version = $(html).find('.version')
.text()
.replace(/^.*\s(?=v)/,'')
console.log(version)