https://orcun.tech/posts/efficiently-managing-multiple-http-requests-in-javascript/