Rate limiting
Funkwhale supports rate-limiting as of version 0.2.0. Pod admins can choose to rate limit specific endpoints to prevent abuse and improve the stability of the service. If the server drops a request due to rate-limiting, it returns a 429
status code.
By default, rate limits follow these rules:
Anonymous (unauthenticated) requests are subject to lower limits than authenticated requests
PUT
,DELETE
,PUT
,POST
, andPATCH
requests are subject to lower limits thanGET
requests
You can return a full list of scope with their corresponding rate-limits by making a GET
request to /api/v1/rate-limit
.
HTTP headers
Each API call returns HTTP headers to pass the following information:
What was the scope of the request
What is the rate-limit associated with the request scope
How many more requests in the scope can be made within the rate-limit timeframe
How much time does the client need to wait to send another request
Here is a full list of supported headers
Header |
Example value |
Description |
---|---|---|
|
50 |
The number of requests allowed within a given period |
|
3600 |
The time window, in seconds, during which the number of requests are measured |
|
|
The name of the scope computed for the request |
|
42 |
How many requests can be sent with the same scope before the rate-limit applies |
|
3543 |
How many seconds the client must wait before it can retry. Only applies if |
|
1568126089 |
A timestamp indicating when the |
|
3599 |
The number of seconds until the |