Nice Post! One thing I would like to point out, Parallel API calls can be detrimental sometimes if you go overboard with them. Say my function did 5 API calls simultaneously, and this function was called at a high rate in my code you can actually end up causing a lot of load on the target server. Moreover, most APIs also have rate limiting setup and successive requests might be blocked.
A way to circumvent this is to use a Queue of promises and process promises from the queue at a fixed concurrency level (say 2 at a atime, or 3 at a time). P-queue is a great library to achieve this.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice Post! One thing I would like to point out, Parallel API calls can be detrimental sometimes if you go overboard with them. Say my function did 5 API calls simultaneously, and this function was called at a high rate in my code you can actually end up causing a lot of load on the target server. Moreover, most APIs also have rate limiting setup and successive requests might be blocked.
A way to circumvent this is to use a Queue of promises and process promises from the queue at a fixed concurrency level (say 2 at a atime, or 3 at a time). P-queue is a great library to achieve this.