Skip to content

Commit cfb6ed4

Browse files
committed
Add support rule evaluation via query frontend docs
Signed-off-by: SungJin1212 <[email protected]>
1 parent d0f253c commit cfb6ed4

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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 the pros and cons of rule evaluation via Query Frontend.
9+
10+
## How to enable
11+
12+
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.
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+
frontend_address: query-frontend.svc.cluster.local:9095
23+
```
24+
25+
In addition, you can configure gRPC client (Ruler -> Query Frontend) config via args:
26+
```
27+
-ruler.frontendClient.grpc-max-recv-msg-size=104857600
28+
-ruler.frontendClient.grpc-max-send-msg-size=16777216
29+
-ruler.frontendClient.grpc-compression=""
30+
-ruler.frontendClient.grpc-client-rate-limit=0
31+
-ruler.frontendClient.grpc-client-rate-limit-burst=0
32+
-ruler.frontendClient.backoff-on-ratelimits=false
33+
-ruler.frontendClient.backoff-min-period=100ms
34+
-ruler.frontendClient.backoff-max-period=10s
35+
-ruler.frontendClient.backoff-retries=10
36+
```
37+
38+
And via yaml:
39+
40+
```yaml
41+
ruler:
42+
frontend_client:
43+
max_recv_msg_size: 104857600
44+
max_send_msg_size: 16777216
45+
grpc_compression: ""
46+
rate_limit: 0
47+
rate_limit_burst: <int> | default = 0
48+
backoff_on_ratelimits: <boolean> | default = false
49+
backoff_config:
50+
min_period: 100ms
51+
max_period: 10s
52+
max_retries: 10
53+
```
54+
55+
## Pros and Cons
56+
57+
### Pros
58+
The rule evaluation performance is improved as we can use Query Frontend features like the vertical query sharding.
59+
The ruler can use fewer resources as it doesn't need to initialize the querier anymore.
60+
61+
### Cons
62+
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.
63+
So, if your rules use the native histogram, it is not allowed yet.

0 commit comments

Comments
 (0)