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

Handle second/minute-rates limits on Flavors and Analyzers #164

Closed
amr-cossi opened this issue Jan 30, 2019 · 4 comments
Closed

Handle second/minute-rates limits on Flavors and Analyzers #164

amr-cossi opened this issue Jan 30, 2019 · 4 comments
Assignees
Milestone

Comments

@amr-cossi
Copy link

Request Type

Feature Request

The goal of this feature would be to handle APIs limiting the number of requests per second or minute. Right now, if you launch a lot of queries simultaneously, CORTEX launches them all together (at the parallelization rate configured) but fails for all queries hitting the short rate limit.
It would be great to be able to configure a rate limit in # queries per # seconds for a Flavor (endpoint limit) and an Analyzer (service limit) and have CORTEX wait between queries to avoid the threshold.

@amr-cossi
Copy link
Author

Does this implementation handle a wait time between queries managed by CORTEX ?
In my understanding, with this modification, queries will fail because of the CORTEX limit instead of the distant endpoint limit.
The real feature would be to avoid failed queries altogether.

@nadouani
Copy link
Contributor

Your understanding is right: Cortex will not enqueue the jobs based on that rate limit.

We have probably misunderstood the feature request.

@vazromju
Copy link

hello
has somebody been able to get this analyzer working ?
in my case, with a right api-key it is in progress until timeout and it is dropped
I have tested with curl and it works from cortex box
I have been reading (without knowlegde of python) the paloalto script, /usr/local/lib/python3.6/site-packages/autofocus/autofocus.py
and I miss some parameters as scope that I cannot realize where this parameter is calculated.

so, has somebody been able to get it working?

Thank you

@BrijJhala
Copy link

@nadouani its great feature to have it. Can we reopen this ticket ? Thank you. who knows we will pick up to fix too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants