Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure: keep refreshes spread over time
When a `vmssVmsCacheJitter` is provided, API calls (after start) will be randomly spread over the provided time range, then happens at regular interval (for a given VMSS). This prevents API calls spikes. But we noticed that the various VMSS' refreshes will progressively converge and agglomerate over time (in particular after a few large throttling windows affected the autoscaler), which defeats the purpose. Re-randomizing the next refresh deadline every time (rather than just at autoscaler start) keeps the calls properly spread. Configuring `vmssVmsCacheJitter` and `vmssVmsCacheTTL` allows users to control the average and worst case refresh interval (and avg API call rate). And we can count on VMSS size change detection to kick early refreshes when needed. That's a small behaviour change, but possibly still a good time for that, as `vmssVmsCacheJitter` was introduced recently and wasn't part of any release yet.
- Loading branch information