-
Notifications
You must be signed in to change notification settings - Fork 806
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support rule evaluation via query frontend docs
Signed-off-by: SungJin1212 <[email protected]>
- Loading branch information
1 parent
d0f253c
commit 298ef9e
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "Rule evaluations via query frontend" | ||
linkTitle: "Rule evaluations via query frontend" | ||
weight: 10 | ||
slug: rule-evalutions-via-query-frontend | ||
--- | ||
|
||
This guide explains how to configure the Ruler to evaluate rules via Query Frontends instead of the Ingester/Store Gateway and the pros and cons of rule evaluation via Query Frontend. | ||
|
||
## How to enable | ||
|
||
By default, the Ruler queries both Ingesters and Store Gateway depending on the Rule time range for evaluating rules (alerting rules or recording rules). If you have set `-ruler.frontend-address` then the Ruler queries the Query Frontend for evaluation rules. | ||
The address should be the gRPC listen address in host:port format. | ||
|
||
You can configure via args: | ||
``` | ||
-ruler.frontend-address=query-frontend.svc.cluster.local:9095 | ||
``` | ||
And via yaml: | ||
```yaml | ||
ruler: | ||
frontend_address: query-frontend.svc.cluster.local:9095 | ||
``` | ||
In addition, you can configure gRPC client (Ruler -> Query Frontend) config, please refer to frontend_client section in [ruler config](../configuration/config-file-reference.md#ruler_config). | ||
## Pros and Cons | ||
If this feature is enabled, the query execute path is as follows: | ||
Ruler -> Query Frontend -> Query Scheduler -> Querier -> Ingester/Store Gateway | ||
So, there are more hops than before (Ruler -> Ingester/Store Gateway). | ||
### Pros | ||
The rule evaluation performance is improved in such a situation where the number of Queriers pulling queries from the Query Scheduler is enough because we can use Query Frontend features like the vertical query sharding. | ||
Also, the Ruler can use fewer resources as it doesn't need to run query engine to evaluate rules. | ||
### Cons | ||
If there are not enough Queriers, adding rule queries to Query Scheduler could cause query starvation problem and rules cannot be evaluated in time. | ||
Another is, currently, the only support format of the query response of the Query Frontend is the JSON format. The JSON format only contains partial information of the native histogram. | ||
So, if your rules use the native histogram, it is not allowed yet. |