1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/routes
Christopher Kolstad b06613d1b0
feat: Adds rate limiting to metric POST endpoints (#5075)
### What
The heaviest requests we serve are the register and metrics POSTs from
our SDKs/clients.
This PR adds ratelimiting to /api/client/register, /api/client/metrics,
/api/frontend/register and /api/frontend/metrics with a default set to
6000 requests per minute (or 100 rps) for each of the endpoints.

It will be overrideable by the environment variables documented.

### Points of discussion
@kwasniew already suggested using featuretoggles with variants to
control the rate per clientId. I struggled to see if we could
dynamically update the middleware after initialisation, so this attempt
will need a restart of the pod to update the request limit.
2023-10-18 13:00:44 +02:00
..
admin-api feat: dependent features use new transaction mechanism (#5073) 2023-10-18 08:59:26 +02:00
auth
client-api feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
edge-api feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
proxy-api feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
backstage.test.ts
backstage.ts
controller.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
health-check.test.ts
health-check.ts
index.ts feat: allow trust proxy (#4396) 2023-08-03 13:47:19 +03:00
logout.test.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
logout.ts
public-invite.test.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
public-invite.ts OpenAPI: add operation tests: require summaries and descriptions (#4377) 2023-08-01 15:58:15 +02:00
unleash-types.ts
util.ts feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00