1
node.js
에 슈퍼 기본 http 요청 앱을 만들고 있습니다.초당 요청 http.get() - Node.js
var http = require('http');
var options = {
host: 'www.domain-here.com',
port: 80,
path: '/index.html'
};
for(var i = 0; i < 500; i++) {
http.get(options, function(res) {
console.log("[" + this.count + "] Response: " + res.statusCode);
}.bind({ count: i })).on('error', function(e) {
console.log("[" + this.count + "] Error: " + e.message);
}.bind({ count: i }));
}
초당 HTTP 요청 수를 알아야합니다. 초당 요청 수를 늘리는 방법에 대해 알고 싶습니다.
감사합니다. 그것은 비록 초당 평균 요청입니다. – Justin