Skip to content

Switch Cortex Ruler to query Query Frontend #5105

Closed
@yeya24

Description

@yeya24

Is your feature request related to a problem? Please describe.
As we can see from the Cortex architecture https://cortexmetrics.io/docs/architecture/, Ruler queries ingesters (and store gateways) to get data for rules evaluation. This works fine currently but it hard to reuse some features supported in query frontend like vertical query sharding to make rule evaluation faster.

By switching Ruler to query Query Frontend, it simplifies the current architecture to make Query Frontend the entrypoint for both external and internal queries. Ruler components can use less resources as it doesn't need to embed a querier anymore.

Describe the solution you'd like
This feature should be behind a feature flag. If the flag is specified, Ruler will query Query Frontend instead. The implementation should be similar to how Thanos does https://github.com/thanos-io/thanos/blob/main/cmd/thanos/rule.go#L795, by having a custom query func and send HTTP requests to query frontend.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions