limit concurrent downloads per user and queue the rest - #341
Closed
grojeda wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A user (identified by their
recipientemail) can now have at most 10 downloads in flight at once; anything beyond that is queued inside ogcapi and submitted to AWS Batch automatically as their slots free, rather than rejected — a queued download still gets a job ID and answers on the status endpoint. A slot stays occupied for the whole workflow (the master job plus the prepare/collect children DAS spawns), counted from one cached sweep of the Batch queues shared by all users. The execute and status responses gainqueuedandqueuePositionso the portal can show the queued state without parsing message text; both additions are backwards compatible. Configurable underaws.batch.job.user-limit—max-concurrentdefaults to 10,enabled: falseturns it off. Note therecipientemail is not authenticated, so this is a fairness mechanism rather than a security control.