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

Enforce current assessments does not exceed max assessments #3

Open
keithws opened this issue Dec 5, 2019 · 3 comments
Open

Enforce current assessments does not exceed max assessments #3

keithws opened this issue Dec 5, 2019 · 3 comments

Comments

@keithws
Copy link

keithws commented Dec 5, 2019

I'd like to see at least a basic check that prevents a new assessment if current assessments is equal to or greater than max assessments. This should prevent this client from receiving a 429 error as well.

If you want to get fancy, you can queue new assessments when the current assessments are too high and attempt to pull items off the queue when an assessment completes and the current assessments are lower than the maximum.

@keltia
Copy link
Owner

keltia commented Dec 9, 2019

Neither the API calls nor the CLI utilty do parallel calls so I do not see where I could put this. If I get a 429 then it is returned to the caller who is supposed to handle it. ssllabs-scanfrom SSLLabs do some kind of 429 processing.

@keithws
Copy link
Author

keithws commented Dec 13, 2019

If the library does not support parallel requests, then it is less important I suppose.

However, it is recommended in the SSL Labs API documentation to call info before analyze, check the values of the assessment headers, and only then call analyze (for new assessments) if the current assessments are less than the maximum.

All successful API calls contain response headers X-Max-Assessments and X-Current-Assessments. They can be used to calculate how many new assessments can be submitted. It is recommended that clients update their internal state after each complete response.

Thanks again for creating this library!

@keltia
Copy link
Owner

keltia commented Dec 17, 2019

Is something like this enough?
e23cd35

Test added now.

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

No branches or pull requests

2 participants