1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +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 docs: Auth tag (#4126) 2023-07-04 08:31:54 +00:00
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 docs: Health check endpoint (#3959) 2023-06-12 12:56:45 +00:00
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 feat: authorization middleware (#3464) 2023-04-06 11:46:54 +02:00
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