Skip to content

Commit d79a2cf

Browse files
committed
Add support rule evaluation via query frontend docs
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
1 parent d0f253c commit d79a2cf

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: "Rule evaluations via query frontend"
3+
linkTitle: "Rule evaluations via query frontend"
4+
weight: 10
5+
slug: rule-evalutions-via-query-frontend
6+
---
7+
8+
This guide explains how to configure the Ruler to evaluate rules via Query Frontends instead of the Ingesters and pros and cons of the rule evaluation via Query Frontend.
9+
10+
## How to enable
11+
12+
By default, the Ruler query 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.
13+
The address should be the gRPC listen address in host:port format.
14+
15+
You can configure via args:
16+
```
17+
-ruler.frontend-address=query-frontend.svc.cluster.local:9095
18+
```
19+
And via yaml:
20+
```yaml
21+
ruler:
22+
...
23+
frontend_address: query-frontend.svc.cluster.local:9095
24+
...
25+
```
26+
27+
In addition, you can configure gRPC client (Ruler -> Query Frontend) config via args:
28+
```
29+
-ruler.frontendClient.grpc-max-recv-msg-size=104857600
30+
-ruler.frontendClient.grpc-max-send-msg-size=16777216
31+
-ruler.frontendClient.grpc-compression=""
32+
-ruler.frontendClient.grpc-client-rate-limit=0
33+
-ruler.frontendClient.grpc-client-rate-limit-burst=0
34+
-ruler.frontendClient.backoff-on-ratelimits=false
35+
-ruler.frontendClient.backoff-min-period=100ms
36+
-ruler.frontendClient.backoff-max-period=10s
37+
-ruler.frontendClient.backoff-retries=10
38+
```
39+
40+
And via yaml:
41+
42+
```yaml
43+
ruler:
44+
...
45+
frontend_client:
46+
max_recv_msg_size: 104857600
47+
max_send_msg_size: 16777216
48+
grpc_compression: ""
49+
rate_limit: 0
50+
rate_limit_burst: <int> | default = 0
51+
backoff_on_ratelimits: <boolean> | default = false
52+
backoff_config:
53+
min_period: 100ms
54+
max_period: 10s
55+
max_retries: 10
56+
...
57+
```
58+
59+
## Pros and Cons
60+
61+
### Pros
62+
The rule evaluation performance is improved as we can use Query Frontend features like the vertical query sharding.
63+
The ruler can use fewer resources as it doesn't need to initialize the querier anymore.
64+
65+
### Cons
66+
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.
67+
So, if your rules use the natvie histogram, it is not allowed yet.

0 commit comments

Comments
 (0)