Currently in my Angular project we upload batches of files using the webworker. It turns out that the webworker can make up to six requests at a time (depending on the browser from what I’ve read on other forums), however my backend only processes one request at a time, so depending on the processing time to return the response to the frontend ( despite being a promise) ends up exceeding the waiting time.
As a stopgap, I added a 1-second timeout between requests on the frontend so the backend had enough time to process and return the response.
What I would like to know is if I can reduce these simultaneous requests from the webworker? For example, instead of 6 requests at the same time, limit it to 3?