A tool to stress test http/https protocols
To use this, you must first create a new
object and call a method.
Suggest using the flag --max_old_space_size=<size>
to increase the amount of ram your APP can use.
const Anfordern = require('anfordern');
let anfordern = new Anfordern({
url: "your URL", // must be a string with a valid protocol
timer: 1000, // must be a number in ms
headers: { key: "value" }
});
Method | Arguments | returns | Description |
---|---|---|---|
.start() |
function(err, data) |
err if an error occurs data what the server sends back |
Starts sending requests at set interval |
.cluster() |
function(err, pid, data) |
err if an error occurs pid the process id of our worker data what the server sends back |
Clusters the app and send more than one request at each interval |
const Anfordern = require('anfordern');
let anfordern = new Anfordern({
url: process.env.URL,
timer: 1000
});
anfordern.cluster(function(err, pid, data) {
if(err) console.log(pid, err);
console.log(data);
})
Do not use this tool for anything that might be considered questionable. I am not responsible for how this tool is used. Use this only on your own hardware.