Skip to content

Commit 9eef4d8

Browse files
authored
ref(rate limits): Add concurrent headers (#4931)
* ref(rate limits): Add concurrent headers
1 parent b3dce0d commit 9eef4d8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/api/ratelimits.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ sidebar_order: 3
55

66
Sentry rate limits every API request made to prevent abuse and resource overuse. The limit is applied to each unique combination of caller and endpoint.
77

8-
The rate limit follows a fixed window approach. Requests are counted into time buckets, determined by the window size. If the number of requests from a caller exceeds the number of allowed requests within a window, then that request will be rejected.
98

10-
While there is a default rate limit of **40 requests per second**, each endpoint can have their own maximum number of requests and window size. You can track your rate limit usage by looking at special headers in the response.
9+
We restrict both how frequently a request is made (requests per second rate limit) and how many concurrent requests a caller can make (concurrent rate limit).
10+
11+
The requests per second rate limit follows a fixed window approach. Requests are counted into time buckets, determined by the window size. If the number of requests from a caller exceeds the number of allowed requests within a window, then that request will be rejected. While there is a default rate limit of **40 requests per second**, each endpoint can have their own maximum number of requests and window size.
12+
13+
Meanwhile, the concurrent rate limiter will reject requests if the caller has too many requests in progress at the same time.
14+
15+
You can track your rate limit usage by looking at special headers in the response.
16+
1117

1218
## Headers
1319

@@ -19,6 +25,10 @@ Every API request response includes the following headers:
1925
- The number of requests this caller has left on this endpoint within the current window
2026
- `X-Sentry-Rate-Limit-Reset`
2127
- The time when the next rate limit window begins and the count resets, measured in UTC seconds from epoch
28+
- `X-Sentry-Rate-Limit-ConcurrentLimit`
29+
- The maximum number of concurrent requests allowed within the window
30+
- `X-Sentry-Rate-Limit-ConcurrentRemaining`
31+
- The number of concurrent requests this caller has left on this endpoint within the current window
2232

2333
## Additional Information
2434

0 commit comments

Comments
 (0)