Skip to content

Commit 837a272

Browse files
committed
overrides not limits
1 parent e8844d1 commit 837a272

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

docs/proposals/limits-api.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Limits API"
3-
linkTitle: "Limits API"
2+
title: "User Overrides API"
3+
linkTitle: "User Overrides API"
44
weight: 1
5-
slug: limits-api
5+
slug: overrides-api
66
---
77

88
- Author: Bogdan Stancu
@@ -11,7 +11,7 @@ slug: limits-api
1111

1212
## Overview
1313

14-
This proposal outlines the design for a new API endpoint that will allow users to modify their current limits in Cortex. Currently, limits can only be changed by administrators modifying the runtime configuration file and waiting for it to be reloaded.
14+
This proposal outlines the design for a new API endpoint that will allow users to modify their current limits in Cortex. Currently, overrides can only be changed by administrators modifying the runtime configuration file and waiting for it to be reloaded.
1515

1616
## Problem
1717

@@ -26,8 +26,8 @@ This manual process is time-consuming, error-prone, and doesn't scale well with
2626

2727
### Endpoints
2828

29-
#### 1. GET /api/v1/user-limits
30-
Returns the current limits configuration for a specific tenant.
29+
#### 1. GET /api/v1/user-overrides
30+
Returns the current overrides configuration for a specific tenant.
3131

3232
Response format:
3333
```json
@@ -40,8 +40,8 @@ Response format:
4040
}
4141
```
4242

43-
#### 2. PUT /api/v1/user-limits
44-
Updates limits for a specific tenant. The request body should contain only the limits that need to be updated.
43+
#### 2. PUT /api/v1/user-overrides
44+
Updates overrides for a specific tenant. The request body should contain only the overrides that need to be updated.
4545

4646
Request body:
4747
```json
@@ -51,8 +51,8 @@ Request body:
5151
}
5252
```
5353

54-
#### 3. DELETE /api/v1/user-limits
55-
Removes tenant-specific limits, reverting to default limits.
54+
#### 3. DELETE /api/v1/user-overrides
55+
Removes tenant-specific overrides, reverting to default overrides.
5656

5757
### Implementation Details
5858

@@ -64,6 +64,27 @@ Removes tenant-specific limits, reverting to default limits.
6464
2. Security:
6565
- Rate limiting will be implemented to prevent abuse
6666
- Changes will be validated before being applied
67+
- A hard limit configuration will be implemented
68+
Hard limits will not be changable through the API
69+
Example:
70+
```yaml
71+
# file: runtime.yaml
72+
# In this example, we're overriding ingestion limits for a single tenant.
73+
overrides:
74+
"user1":
75+
ingestion_burst_size: 350000
76+
ingestion_rate: 350000
77+
max_global_series_per_metric: 300000
78+
max_global_series_per_user: 300000
79+
max_series_per_metric: 0
80+
max_series_per_user: 0
81+
max_samples_per_query: 100000
82+
max_series_per_query: 100000
83+
configurable-overrides: # still not sure about the naming for this section
84+
"user1":
85+
ingestion_rate: 700000
86+
max_global_series_per_user: 700000
87+
```
6788
6889
3. Error Handling:
6990
- Invalid limit values will return 400 Bad Request

0 commit comments

Comments
 (0)