Skip to content

[prober] Improve inter-probe wait for large interval probes - #1071

Merged
manugarg merged 2 commits into
mainfrom
interprobe
Apr 20, 2025
Merged

manugarg merged 2 commits into
mainfrom
interprobe

Conversation

@manugarg

@manugarg manugarg commented Apr 19, 2025 •

Copy link
Copy Markdown
Contributor

The way we spread probes is like this:

We arrange probes into interval buckets. Then:

  • In each interval bucket, we spread the probes equally, i.e. we sleep for a fixed duration before starting the next probe. This gap between the probes (interProbeGap) was capped at 2s, this PR raises the cap to 1min.
  • Each interval bucket is randomly spaced out from each other, but that space is capped at minimum of interval and 10s (this is also changing to 1m).

This behavior was initially introduced for high frequency native probes (<2s interval) that's why we capped inter-probe gap at 2s and interval bucket start delay at 10s. Idea was that 2s gap should be good enough for native probe types (e.g. HTTP) from performance impact point of view.

Now, with the introduction of browser probe types, this doesn't hold true. Browser probes require a ton of memory and CPU, and they usually have a higher interval, say 2-15min. If we have 6 browser probes as 10 min interval, we don't want them to start at 2s gap. This PR raise the max gap from 2s to 1min. We don't want this gap to be too high as the last probe in the interval bucket will start after (n-1)*gapDuration, moreover we may not benefit from a gap greater than 1m.

(Note to self: We should probably make this inter probe gap configurable.)

Fixes: #1070

@manugarg
manugarg merged commit 9f4cda6 into main Apr 20, 2025
@manugarg
manugarg deleted the interprobe branch April 20, 2025 06:50
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.

[prober] Spread low frequency probes better

1 participant