Netflix-Skunkworks / atlas-system-agent

Agent that reports system metrics through SpectatorD.
Apache License 2.0
5 stars 8 forks source link

random delay for initial polling #137

Closed copperlight closed 2 months ago

copperlight commented 2 months ago

The previous implementation of initial_polling_delay has a bias where it moves the start second to the range of 11-19, which results in those seconds having 3X as many instances that would report. We want to avoid thundering herd behavior as best we can for something that runs on every instance, so we want a better distribution.

This implementation takes the start seconds which are too close to the minute boundary and uniformly distributes them across the range of 10-50.

Enhacement for #135.