-
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 cfb6ed4
Showing
1 changed file
with
63 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,63 @@ | ||
--- | ||
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 Ingesters and the pros and cons of rule evaluation via Query Frontend. | ||
|
||
## How to enable | ||
|
||
By default, the Ruler queries to the Ingesters for evaluating rules (alerting rules or recording rules). If you have set `-ruler.frontend-address` then the Ruler query to 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 via args: | ||
``` | ||
-ruler.frontendClient.grpc-max-recv-msg-size=104857600 | ||
-ruler.frontendClient.grpc-max-send-msg-size=16777216 | ||
-ruler.frontendClient.grpc-compression="" | ||
-ruler.frontendClient.grpc-client-rate-limit=0 | ||
-ruler.frontendClient.grpc-client-rate-limit-burst=0 | ||
-ruler.frontendClient.backoff-on-ratelimits=false | ||
-ruler.frontendClient.backoff-min-period=100ms | ||
-ruler.frontendClient.backoff-max-period=10s | ||
-ruler.frontendClient.backoff-retries=10 | ||
``` | ||
|
||
And via yaml: | ||
|
||
```yaml | ||
ruler: | ||
frontend_client: | ||
max_recv_msg_size: 104857600 | ||
max_send_msg_size: 16777216 | ||
grpc_compression: "" | ||
rate_limit: 0 | ||
rate_limit_burst: <int> | default = 0 | ||
backoff_on_ratelimits: <boolean> | default = false | ||
backoff_config: | ||
min_period: 100ms | ||
max_period: 10s | ||
max_retries: 10 | ||
``` | ||
## Pros and Cons | ||
### Pros | ||
The rule evaluation performance is improved as we can use Query Frontend features like the vertical query sharding. | ||
The ruler can use fewer resources as it doesn't need to initialize the querier anymore. | ||
### Cons | ||
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. |