Skip to content

Ignore KeyBundle errors for a specified duration #67

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

Merged
merged 4 commits into from
Sep 10, 2020

Conversation

jschlyter
Copy link
Collaborator

@jschlyter jschlyter commented Sep 7, 2020

When fetching remote keys, KeyBundle will retry every time even if errors had recently occurred. This might not be desirable for many applications, as errors like this usually fix themselves within a short amount of time. Until then, additional requests would result in more load, latency, excess logging and key source spamming.

The PR adds an ignore_errors_period parameter to the KeyBundle object, that is used to specify the amount of time (in seconds) during which fetching is skipped. Default value is 0 (zero), effectively disabling this functionality and resulting in retries every time the bundle is accessed. For most applications, a hold down timer of 60 seconds or more is probably reasonable.

@jschlyter jschlyter self-assigned this Sep 7, 2020
@jschlyter
Copy link
Collaborator Author

Any comments from @c00kiemon5ter before going ahead?

@c00kiemon5ter
Copy link
Member

I'll look into this and the other PR today ;)

Copy link
Member

@c00kiemon5ter c00kiemon5ter left a comment

Choose a reason for hiding this comment

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

This is a suggestion - I would go for it.

Otherwise I think it's fine.

@c00kiemon5ter c00kiemon5ter merged commit 2b00abb into IdentityPython:develop Sep 10, 2020
@c00kiemon5ter c00kiemon5ter changed the title Add optional error holddown for KeyBundle Ignore KeyBundle errors for a specified duration Sep 10, 2020
@jschlyter jschlyter deleted the key_bundle_backoff branch March 17, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants