Skip to content

[FEATURE] Add poll jitter to prevent thundering herd after restarts #270

Description

@gergely-szabo-sap

Context

The CF provider does not implement poll jitter. Without jitter, resources created at similar times requeue simultaneously, causing "thundering herd" spikes — especially after provider restarts when all resources are re-enqueued at once. At scale (500+ resources), this can briefly saturate both the internal rate limiter and the CF CAPI per-user rate limit.

Scope

  • Add WithPollJitterHook to the controller options in cmd/provider/main.go
  • Expose --poll-jitter-percentage CLI flag (following provider-kubernetes pattern, default 10%)
  • Apply jitter to all controllers (all CF controllers are pure native, so no hybrid/upjet complications)
  • Document how to configure in the README.md example in the BTP
  • Test the jitter configuration

Out of scope

Hint: Smaller feature wishes tend to be implemented and shipped quicker!

  • Adaptive poll intervals (longer-term, requires WithPollIntervalHook)
  • Per-controller jitter settings

Technical Steps

  1. Add --poll-jitter-percentage flag to cmd/provider/main.go (default 10, same as provider-kubernetes)
  2. Compute jitter: jitter := time.Duration(float64(*pollInterval) * float64(*pollJitterPercentage) / 100.0)
  3. Apply via managed.WithPollJitterHook(jitter) in controller options
  4. Reference implementation: provider-kubernetes main.go exposes --poll-jitter-percentage; provider-gcp hardcodes 5%

Workarounds & Alternatives

  • Manually stagger resource creation times (impractical at scale)

Additional context

Metadata

Metadata

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

Status
Refinement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions