You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
I have seen a factor of four drop in https performance between node 0.12.7 and 0.10.40. Downloading a file with http and https, on a machine that has a 1GiB/sec internet connection, in the Amazon cloud, results in the following performance matrix:
While http performance remains the same, https performance has regressed significantly. The CPU is at 100% for both workloads. A git bisection indicates that the problem has been introduced sometime between 0.11.2 and 0.11.3.
The node program used is:
// Download a file with nodejs//varfs=require('fs');varurl=process.argv[2];// calculate the protocol, by examining the urlvarprotocol=undefined;if(url.indexOf("https")===0){protocol="https";}elseif(url.indexOf("http")===0){protocol="http";}else{console.log("error: protocol must be http or https");process.exit(1);}if(url===undefined){console.log("Error, must define the url");process.exit(1);}if(protocol===undefined){console.log("Error, must define the protocol");process.exit(1);}functiongetLeaf(pathname){returnpathname.split('\\').pop().split('/').pop();}vartrgFile=getLeaf(url);varfile=fs.createWriteStream(trgFile);varrequestModule=undefined;if(protocol==="http"){requestModule=require('http');}else{requestModule=require('https');}varrequest=requestModule.get(url,function(response){response.pipe(file);file.on('finish',function(){file.close();});}).on('error',function(err){fs.unlink(trgFile);process.exit(1);});
I have seen a factor of four drop in https performance between node 0.12.7 and 0.10.40. Downloading a file with http and https, on a machine that has a 1GiB/sec internet connection, in the Amazon cloud, results in the following performance matrix:
Throughput
node version 0.10.40 0.12.7
http 88 MiB/sec 88 MiB/sec
https 75 MiB/sec 20 MiB/sec
While http performance remains the same, https performance has regressed significantly. The CPU is at 100% for both workloads. A git bisection indicates that the problem has been introduced sometime between 0.11.2 and 0.11.3.
The node program used is:
The shell script that drives it is: