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

Rate limited retry after #127

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jeromegn
Copy link

I just hit a rate limited error when creating a new certificate (due to a bug, that created a loop of trying to create a certificate)

I thought I'd add this retry_after property to Acme::Client::Error::RateLimited instances (when available.)

According to the spec, the server may return a Retry-After header containing a value in seconds after which one may retry the same operation.

Let me know if you'd like this done another way.

def retry_after
@env.response_headers.fetch('Retry-After', DEFAULT_RETRY_AFTER).to_i
end
end
Copy link
Owner

Choose a reason for hiding this comment

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

CI is being picky about the newline

Copy link
Author

Choose a reason for hiding this comment

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

Fixed!

@cpu
Copy link

cpu commented Jul 11, 2017

According to the spec, the server may return a Retry-After header containing a value in seconds after which one may retry the same operation.

That's true, but I wanted to point out that if you're targetting Let's Encrypt and the Boulder implementation of the ACME spec we don't presently send this Retry-After header.

@jeromegn
Copy link
Author

@cpu oh, derp. Thanks for pointing that out. Was hoping to be rescue and set my job to be retried after the value provided by that header.

@cpu
Copy link

cpu commented Jul 11, 2017

@jeromegn I'm hopeful we can add it one day. I suspect it will be something we would evaluate as part of the "v2" implementation for Jan 2018. Apologies for being the bearer of bad news!

@unixcharles
Copy link
Owner

I don't think it hurt adding it already. Any opposition?

@parkr
Copy link

parkr commented Feb 20, 2018

@unixcharles I would love to use this – any interest on merging & cutting a new release?

@cpu
Copy link

cpu commented Feb 20, 2018

@parkr The Retry-After header is still unimplemented in Boulder. Are you targeting a different ACME server than one run by Let's Encrypt?

@unixcharles
Copy link
Owner

@cpu its the reason why it was never merged.

@unixcharles I would love to use this – any interest on merging & cutting a new release?

I never merged because its not implemented in boulder but if you have a different server implementation that supports it, I don't have any strong opposition.

@jeromegn
Copy link
Author

Do we know if this has been implemented by boulder when using ACME v2?

@cpu
Copy link

cpu commented Apr 3, 2018

Do we know if this has been implemented by boulder when using ACME v2?

Boulder doesn't implement Retry-After for V1 or V2 at the present time.

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.

4 participants