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

Add a random, exponential increasing delay when there are no results for a service #117

Merged
merged 2 commits into from
Nov 17, 2022

Conversation

leklund
Copy link
Member

@leklund leklund commented Nov 15, 2022

The first delay will be between 2 and 11 seconds and it will max out
beween 130 and 175 seconds:

delay count: range of possible delay in seconds

1 => [2, 11]
2 => [10, 28]
3 => [30, 57]
4 => [68, 104]
5 (and up) => [130, 175]

the first delay will be between 2 and 11 seconds and it will max out
beween 130 and 175 seconds:

delay count: range of possible delay in seconds

1 => [2, 11]
2 => [10, 28]
3 => [30, 57]
4 => [68, 104]
5 (and up) => [130, 175]
@@ -40,6 +41,7 @@ type Subscriber struct {
metrics *prom.Metrics
postprocess func()
logger log.Logger
delayCount int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RunRealtime() and RunOrigins() are both called on the same subscriber instance. I think we'll need separate delay counts for origins and billing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. good point. fixed in d4bc0a6

@leklund leklund merged commit 7f51742 into main Nov 17, 2022
@leklund leklund deleted the backoff branch November 17, 2022 15:11
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.

None yet

2 participants