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

backlog size aware throttling #209

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pezra
Copy link

@pezra pezra commented Mar 20, 2025

This PR changes the retry_in calculation for concurrency throttled jobs using the :schedule strategy. The approach is to estimate when a throttled job will likely be runnable and schedule it for that time. This estimate is based on the current backlog size for the job group (estimated), the expected job runtime and the concurrency limit.

This should reduce/eliminate unnecessary delays in job processing caused by the current "ignore throttled jobs for TTL seconds" approach while retaining the benefits of the schedule strategy.

PS: I changed the appraisals file because install_if does all of the bundling work regardless of whether the condition evaluates to true or false. In fact, it fetches the packages list from gems.contribsys.com before it even checks the condition. If BUNDLE_GEMS__CONTRIBSYS__COM isn't set that fetch failed with an auth error.

install_if does all of the bundling work even if the condition is
false. That means it fetches the packages list from
gems.contribsys.com before it even checks the condition. If
BUNDLE_GEMS__CONTRIBSYS__COM isn't set it that fetch fails with an
auth error.
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (11aefdf) to head (df35ceb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   98.71%   98.77%   +0.05%     
==========================================
  Files          19       19              
  Lines         468      489      +21     
  Branches       77       84       +7     
==========================================
+ Hits          462      483      +21     
  Misses          6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This avoids unnecessary processing delays and smoothes the load on
sidekiq workers.
@pezra pezra force-pushed the queue-depth-aware-throttling branch from 880a11e to df35ceb Compare March 20, 2025 22:17
@pezra pezra changed the title Queue depth aware throttling backlog size aware throttling Mar 20, 2025
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