Wednesday 19 July 2017

Question about multiple async http calls

i'm fairly new to node and trying to push a bunch of documents up to AWS CloudSearch. I have 17 batches to send and I'm concerned about firing off 17 async http post calls at the same time. Does node manage things to not bog down the server, or do I need to manually build a queue to limit the number of calls going at one time?Likewise for downloading, I have to download over 400 files via GET. I built a queue using an EventEmitter to run them serially because I was worried about saturating the net connection and hitting the source server with a ton of requests at the same time but I'm guessing there's a better way.I'm using Node 8 and using async/await where I can.

Submitted July 19, 2017 at 11:29PM by Catalyzm

No comments:

Post a Comment