Skip to content

Enhance SB polling intervals #4328

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

Merged
merged 2 commits into from
May 6, 2025
Merged

Enhance SB polling intervals #4328

merged 2 commits into from
May 6, 2025

Conversation

svkrieger
Copy link
Contributor

@svkrieger svkrieger commented Apr 30, 2025

A short explanation of the proposed change:

  • Currently the retry-after header is used in the exponential backoff calculation. This PR makes it more intuitive by using the retry-after value as is, if it is larger than our own calculated polling interval. With that service owners can defer polling when they know that provisioning takes longer.

  • Introducing a configuration parameter broker_client_max_async_poll_interval_seconds for capping the polling interval. This helps preventing that polling intervals get too large. Default is still at 24h, which was hardcoded before.

Links to any other associated PRs

cloudfoundry/capi-release#542

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

With this change the retry-after header will be treated as an absolute value and not used for exponential backoff.
Whenever the retry-after interval sent by the service broker is larger than the calculated interval using the base interval and exponential backoff, the retry-after interval will be used. When the CC calculated interval is larger the retry-after interval will be ignored.
@svkrieger svkrieger force-pushed the enhance-sb-polling-intervals branch 3 times, most recently from 415219a to be56e86 Compare May 2, 2025 16:17
The maximum polling interval was hardcoded to 24h when set on the job. Though, the exponential backoff calculation did not take this into account.
Now the maximum can be configured through `broker_client_maximum_async_poll_interval_seconds` and will be taken into account for all scenarios. Default is still 24h and the config is optional.
@svkrieger svkrieger force-pushed the enhance-sb-polling-intervals branch from be56e86 to 47ef7e9 Compare May 2, 2025 16:42
@svkrieger svkrieger marked this pull request as ready for review May 5, 2025 08:43
@jochenehret
Copy link
Contributor

... if it is smaller than our own calculated polling interval ...
Not "larger"?

@svkrieger svkrieger merged commit 35a42b8 into main May 6, 2025
12 checks passed
@svkrieger svkrieger deleted the enhance-sb-polling-intervals branch May 6, 2025 06:46
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request May 6, 2025
Changes in cloud_controller_ng:

- Enhance SB polling intervals
    PR: cloudfoundry/cloud_controller_ng#4328
    Author: Sven Krieger <[email protected]>
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.

2 participants