Skip to content

fix: [DHIS2-21855] limit concurrent api requests - #1444

Open
JoakimSM wants to merge 3 commits into
masterfrom
DHIS2-21855
Open

fix: [DHIS2-21855] limit concurrent api requests#1444
JoakimSM wants to merge 3 commits into
masterfrom
DHIS2-21855

Conversation

@JoakimSM

@JoakimSM JoakimSM commented Jul 29, 2026

Copy link
Copy Markdown
Member

Implements DHIS2-21855


Key features

  1. limit the number of concurrent api requests that can be made

Description

https://dhis2.atlassian.net/browse/DHIS2-21855
dhis2/capture-app#4668

Making too many concurrent api requests can cause the browsers connection/resource pool to become exhausted (see: https://dhis2.atlassian.net/browse/DHIS2-21855?focusedCommentId=249571). Although the app (and its dependencies) should limit the number of requests it issues, I think it makes sense to enforce a global cap on concurrent requests as an additional safeguard (if the limit is reached, any additional API requests are queued and only sent once one or more of the in-flight requests have completed.)

Discussion points:

  1. Should the limit be configurable in some way? Maybe having a hardcoded limit is okay for now..
  2. If it isn't configurable, what hardcoded limit do we go with?

Checklist

  • Have written Documentation
    • Might depend on whether we make it configurable
  • Has tests coverage

@sonarqubecloud

Copy link
Copy Markdown

@JoakimSM
JoakimSM marked this pull request as ready for review July 29, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant