Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clients: Add rate limit handling to catalyst client #91

Merged
merged 5 commits into from
Nov 30, 2022

Conversation

victorges
Copy link
Member

@victorges victorges commented Nov 30, 2022

Simple logic, just waiting 15 seconds between each attempt. Should be fine since the request is also really cheap on catalyst side when it gets rate limited, and there will be at most 5 of these looping per task runner instance (3 instances)

My only concern now is that if we're operating at full capacity, these 5 executions will also block handling of any events from the currently running jobs. So we might stop checking if we're getting catalyst callbacks and handling the result callbacks (they become events as well).

Should consider reusing the "delayed task" abstraction used for checking catalyst callbacks for this as well, as a pre-step on the upload task execution in case it got rate limited.

Edit: Fixed the above and implemented an async back off through the delayed event.

@victorges victorges requested a review from a team as a code owner November 30, 2022 12:52
Total retry time will be shorter, 14s of cumulative sleep,
which seems better overall: try 4 times in 15 seconds, then
backoff asynchronously for a minute.
@victorges victorges enabled auto-merge (squash) November 30, 2022 14:58
@victorges victorges merged commit 256a748 into main Nov 30, 2022
@victorges victorges deleted the vg/feat/catalyst-rate-limit branch November 30, 2022 15:09
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.

None yet

2 participants