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

Pagination support for Ruler and Alertmanager resource listing APIs #5672

Open
alvinlin123 opened this issue Nov 23, 2023 · 0 comments
Open

Comments

@alvinlin123
Copy link
Member

alvinlin123 commented Nov 23, 2023

Is your feature request related to a problem? Please describe.

There are uses cases from my customers that needs large amount of rules, alerts, and silences. Lager means more than 10K+ with an upper bound limited by underlying infra.

Currently resource listing APIs in Ruler and Alert Manager returns everything in one call which is not scalable because 1) marshalling the large amount of structs into JSON is CPU and memory intensive and 2) transferring large amount of JSON is time consuming and occupies value resources like memory and network bandwidth for too long.

Describe the solution you'd like
I would like to have pagination support for any APIs in Ruler and Alert Manager that list resuorces.

Describe alternatives you've considered

  • I told the customer to not create too many stuff and, they rejected this proposal with good reasons.
  • I thought about just limit amount of data returned and have customer leverage API filter parameters, but that is not customer friendly nor solving the problem 100%.

There are existing issues/proposals in Prometheus to support pagination:

My ask

I think we can partner with Mimir in grafana/mimir#5657 in influencing having Prometheus maintainers to make a decision on an API spec. I also wonder if Cortex can support pagination behind a feature flag before Prometheus does.

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

1 participant