Skip to content

Commit 057fc42

Browse files
committed
adjust line numbers in docs/components/receive.md to match updated code
Signed-off-by: Remi Vichery <[email protected]>
1 parent 4444cc2 commit 057fc42

File tree

1 file changed

+54
-62
lines changed

1 file changed

+54
-62
lines changed

docs/components/receive.md

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ In order to enable this mode, you can use the `receive.replication-protocol=capn
3434

3535
```json
3636
[
37-
{
38-
"endpoints": [
39-
{"address": "node-1:10901", "capnproto_address": "node-1:19391"},
40-
{"address": "node-2:10901", "capnproto_address": "node-2:19391"},
41-
{"address": "node-3:10901", "capnproto_address": "node-3:19391"}
42-
]
43-
}
37+
{
38+
"endpoints": [
39+
{ "address": "node-1:10901", "capnproto_address": "node-1:19391" },
40+
{ "address": "node-2:10901", "capnproto_address": "node-2:19391" },
41+
{ "address": "node-3:10901", "capnproto_address": "node-3:19391" }
42+
]
43+
}
4444
]
4545
```
4646

@@ -82,7 +82,7 @@ The example of `remote_write` Prometheus configuration:
8282

8383
```yaml
8484
remote_write:
85-
- url: http://<thanos-receive-container-ip>:10908/api/v1/receive
85+
- url: http://<thanos-receive-container-ip>:10908/api/v1/receive
8686
```
8787
8888
where `<thanos-receive-containter-ip>` is an IP address reachable by Prometheus Server.
@@ -121,13 +121,9 @@ The example content of `hashring.json`:
121121

122122
```json
123123
[
124-
{
125-
"endpoints": [
126-
"127.0.0.1:10907",
127-
"127.0.0.1:11907",
128-
"127.0.0.1:12907"
129-
]
130-
}
124+
{
125+
"endpoints": ["127.0.0.1:10907", "127.0.0.1:11907", "127.0.0.1:12907"]
126+
}
131127
]
132128
```
133129

@@ -137,30 +133,22 @@ It is possible to only match certain `tenant`s inside of a hashring file. For ex
137133

138134
```json
139135
[
140-
{
141-
"tenants": ["foobar"],
142-
"endpoints": [
143-
"127.0.0.1:1234",
144-
"127.0.0.1:12345",
145-
"127.0.0.1:1235"
146-
]
147-
}
136+
{
137+
"tenants": ["foobar"],
138+
"endpoints": ["127.0.0.1:1234", "127.0.0.1:12345", "127.0.0.1:1235"]
139+
}
148140
]
149141
```
150142

151143
The specified endpoints will be used if the tenant is set to `foobar`. It is possible to use glob matching through the parameter `tenant_matcher_type`. It can have the value `glob`. In this case, the strings inside the array are taken as glob patterns and matched against the `tenant` inside of a remote-write request. For instance:
152144

153145
```json
154146
[
155-
{
156-
"tenants": ["foo*"],
157-
"tenant_matcher_type": "glob",
158-
"endpoints": [
159-
"127.0.0.1:1234",
160-
"127.0.0.1:12345",
161-
"127.0.0.1:1235"
162-
]
163-
}
147+
{
148+
"tenants": ["foo*"],
149+
"tenant_matcher_type": "glob",
150+
"endpoints": ["127.0.0.1:1234", "127.0.0.1:12345", "127.0.0.1:1235"]
151+
}
164152
]
165153
```
166154

@@ -172,34 +160,34 @@ In order to ensure even spread for replication over nodes in different availabil
172160

173161
```json
174162
[
175-
{
176-
"endpoints": [
177-
{
178-
"address": "127.0.0.1:10907",
179-
"az": "A"
180-
},
181-
{
182-
"address": "127.0.0.1:11907",
183-
"az": "B"
184-
},
185-
{
186-
"address": "127.0.0.1:12907",
187-
"az": "C"
188-
},
189-
{
190-
"address": "127.0.0.1:13907",
191-
"az": "A"
192-
},
193-
{
194-
"address": "127.0.0.1:14907",
195-
"az": "B"
196-
},
197-
{
198-
"address": "127.0.0.1:15907",
199-
"az": "C"
200-
}
201-
]
202-
}
163+
{
164+
"endpoints": [
165+
{
166+
"address": "127.0.0.1:10907",
167+
"az": "A"
168+
},
169+
{
170+
"address": "127.0.0.1:11907",
171+
"az": "B"
172+
},
173+
{
174+
"address": "127.0.0.1:12907",
175+
"az": "C"
176+
},
177+
{
178+
"address": "127.0.0.1:13907",
179+
"az": "A"
180+
},
181+
{
182+
"address": "127.0.0.1:14907",
183+
"az": "B"
184+
},
185+
{
186+
"address": "127.0.0.1:15907",
187+
"az": "C"
188+
}
189+
]
190+
}
203191
]
204192
```
205193

@@ -282,7 +270,7 @@ These limits are applied per request and can be configured within the `request`
282270
- `series_limit`: the maximum amount of series in a single remote write request.
283271
- `samples_limit`: the maximum amount of samples in a single remote write request (summed from all series).
284272

285-
Any request above these limits will cause an 413 HTTP response (*Entity Too Large*) and should not be retried without modifications.
273+
Any request above these limits will cause an 413 HTTP response (_Entity Too Large_) and should not be retried without modifications.
286274

287275
Currently a 413 HTTP response will cause data loss at the client, as none of them (Prometheus included) will break down 413 responses into smaller requests. The recommendation is to monitor these errors in the client and contact the owners of your Receive instance for more information on its configured limits.
288276

@@ -296,6 +284,7 @@ By default, all these limits are disabled.
296284
### Remote write request gates
297285

298286
The available request gates in Thanos Receive can be configured within the `global` key:
287+
299288
- `max_concurrency`: the maximum amount of remote write requests that will be concurrently worked on. Any request request that would exceed this limit will be accepted, but wait until the gate allows it to be processed.
300289

301290
## Active Series Limiting (experimental)
@@ -307,14 +296,17 @@ Every Receive Router/RouterIngestor node, queries meta-monitoring for active ser
307296
To use the feature, one should specify the following limiting config options:
308297

309298
Under `global`:
299+
310300
- `meta_monitoring_url`: Specifies Prometheus Query API compatible meta-monitoring endpoint.
311301
- `meta_monitoring_limit_query`: Option to specify PromQL query to execute against meta-monitoring. If not specified it is set to `sum(prometheus_tsdb_head_series) by (tenant)` by default.
312302
- `meta_monitoring_http_client`: Optional YAML field specifying HTTP client config for meta-monitoring.
313303

314304
Under `default` and per `tenant`:
305+
315306
- `head_series_limit`: Specifies the total number of active (head) series for any tenant, across all replicas (including data replication), allowed by Thanos Receive. Set to 0 for unlimited.
316307

317308
NOTE:
309+
318310
- It is possible that Receive ingests more active series than the specified limit, as it relies on meta-monitoring, which may not have the latest data for current number of active series of a tenant at all times.
319311
- Thanos Receive performs best-effort limiting. In case meta-monitoring is down/unreachable, Thanos Receive will not impose limits and only log errors for meta-monitoring being unreachable. Similarly to when one receiver cannot be scraped.
320312
- Support for different limit configuration for different tenants is planned for the future.
@@ -331,7 +323,7 @@ Please see the metric `thanos_receive_forward_delay_seconds` to see if you need
331323

332324
The following formula is used for calculating quorum:
333325

334-
```go mdox-exec="sed -n '1012,1022p' pkg/receive/handler.go"
326+
```go mdox-exec="sed -n '1015,1025p' pkg/receive/handler.go"
335327
// writeQuorum returns minimum number of replicas that has to confirm write success before claiming replication success.
336328
func (h *Handler) writeQuorum() int {
337329
// NOTE(GiedriusS): this is here because otherwise RF=2 doesn't make sense as all writes

0 commit comments

Comments
 (0)