I am making a node.js server that makes a lot of ajax requests to download json or html code, to different websites (not ddos/dos). For this language, I was wondering how many requests I can make at the same time without problems. Like is it ok to do like
for(i=0;i<1000;i+=1) {
callajax();
}
or do I have to do
function call() {
callajax(call);
}
this sorta calls the next ajax call, when the current one finishes.
If the top one is ok, how many ajax calls can I call at the same time before I have to wait till they return. I don't want problems with non-returning ajax requests.
Can anyone share some insight into this?
Also, lets say I have two servers running on the same wifi network. If both of them runs their node.js server making ajax requests, is that the same thing as doing it from 1 server?