Dealing with multiple concurrent requests to an API has been a challenge for me. When too many requests are made at once (sometimes as many as 200+), they tend to fail with errors.
I have a list of students and I need to create test assignments for each of them, requiring one API call per student. To handle this, I utilized forkJoint
to group observables with API calls and wait until all requests are completed. Once done, a notification is sent to the user informing them that tests have been assigned to the students.
While this solution works well with the browser's limited request count (such as Chrome's limit of 10), it doesn't quite translate in the realm of HTTP/2. I came across this useful example which helped address the issue of handling a large number of requests. However, I still face the challenge of waiting for all (200+) requests to complete before displaying the notification. Figuring out how to achieve this using RxJs remains a puzzle for me.