Skip to content
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

Improve HTTP probe gap between targets for automatic discovery #25

Open
manugarg opened this issue Nov 2, 2021 · 0 comments
Open

Improve HTTP probe gap between targets for automatic discovery #25

manugarg opened this issue Nov 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@manugarg
Copy link
Contributor

manugarg commented Nov 2, 2021

Copied from google/cloudprober#575, originally filed by @benner.

Improve HTTP probe gap between targets for automatic discovery

Current behavior (interval_between_targets_msec) is perfect for static target list but target list are updating dynamically (e. g. file_targets) all probes if there are changes has tendency to move to interval beginning.

I spot this possibility from code and made short experiment:

  • 1 probe
  • 6 targets in file
  • interval_between_targets_msec: 10000
  • interval_msec: 60000

In beginning if there are no changes everything works as expected (10s between probes):

benner=> SELECT LAG(time, 1) OVER () - time from (SELECT DISTINCT(time) FROM m ORDER BY time) AS m LIMIT 10;
     ?column?     
------------------
 
 -00:00:10.47214
 -00:00:09.223467
 -00:00:10.22748
 -00:00:10.386196
 -00:00:10.057331
 -00:00:09.633533
 -00:00:10.472111
 -00:00:09.223475
 -00:00:10.227483
(10 rows)

Then I manually removed some targets from file end (latest targets to probe in whole interval) and adding it again after update/refresh time. After repeating this few times I'm getting all probes in almost same time:

benner=> SELECT LAG(time, 1) OVER () - time from (SELECT DISTINCT(time) FROM m ORDER BY time) AS m LIMIT 10 OFFSET 50;
     ?column?     
------------------
 -00:00:09.536079
 -00:00:00.097285
 -00:00:00.320518
 -00:00:00.08567
 -00:00:49.960433
 -00:00:09.536071
 -00:00:00.097328
 -00:00:00.320667
 -00:00:00.085556
 -00:00:49.960377
(10 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant