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

feat: remote graphite retries #1085

Merged
merged 37 commits into from
Nov 5, 2024
Merged

Conversation

AleksandrMatsko
Copy link
Member

@AleksandrMatsko AleksandrMatsko commented Sep 19, 2024

Add retry logic for graphite remote

Use exponential backoff retry policy for graphite remote metric source. Retries is configured with special fields

graphite_remote:
  - cluster_id: 
     ...
     # for requests
     timeout: 60s
     # retries configuration for requests, that fetch data
     retries:
         # initial interval for retry attempt
         initial_interval: 60s        
         # used to calc interval between retries: RandomizedRetryInterval = RetryInterval * 
         # * (random value from range [1 - randomization_factor, 1 + randomization_factor]) 
         randomization_factor: 0.5
         # next RetryInterval = RetryInterval * multiplier
         multiplier: 1.5
         # caps RetryInterval (NOT RandomizedRetryInterval)
         max_interval: 120s
         # if already max_retries_count retries performed, stop retrying
         max_retries_count: 3
         # if time passed since first try is more than max_elapsed_time than stop retrying
         max_elapsed_time: 360s
     # for healthcheck requests
     heathcheck_timeout: 60s
     # retries configuration for healthcheck requests
     heathcheck_retries:
         # fields same for retries
         ...

Also added new error: ErrRemoteUnavailable to signal user about graphite unavailability.

script.sh Outdated Show resolved Hide resolved
@AleksandrMatsko AleksandrMatsko marked this pull request as ready for review October 4, 2024 10:44
@AleksandrMatsko AleksandrMatsko requested a review from a team as a code owner October 4, 2024 10:44
clock/clock.go Outdated Show resolved Hide resolved
cmd/config.go Outdated Show resolved Hide resolved
interfaces.go Outdated Show resolved Hide resolved
mchrome
mchrome previously approved these changes Oct 30, 2024
almostinf
almostinf previously approved these changes Oct 30, 2024
kissken
kissken previously approved these changes Oct 31, 2024
@AleksandrMatsko AleksandrMatsko dismissed stale reviews from kissken, almostinf, and mchrome via 61f61fa October 31, 2024 08:55
@AleksandrMatsko
Copy link
Member Author

/build

Copy link

github-actions bot commented Nov 5, 2024

Build and push Docker images with tag: feat-remote-graphite-retries.2024-11-05.fe51434

@AleksandrMatsko AleksandrMatsko merged commit bbff8da into master Nov 5, 2024
7 checks passed
@AleksandrMatsko AleksandrMatsko deleted the feat/remote-graphite-retries branch November 5, 2024 09:01
Copy link

github-actions bot commented Nov 5, 2024

Build and push Docker images with tag: 2024-11-05.bbff8da

2 similar comments
Copy link

github-actions bot commented Nov 5, 2024

Build and push Docker images with tag: 2024-11-05.bbff8da

Copy link

github-actions bot commented Nov 5, 2024

Build and push Docker images with tag: 2024-11-05.bbff8da

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.

5 participants