1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/src/lib
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
..
__snapshots__ feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
addons feat: add new message banner events (#5055) 2023-10-16 14:30:40 +01:00
db chore: introduce type to prevent potential issues (#5066) 2023-10-17 12:30:44 +02:00
domain/project-health
error fix: export NotFoundError and ISegmentService in internals.ts (#4997) 2023-10-11 14:31:45 +03:00
features fix: log diff (#5072) 2023-10-18 09:25:25 +02:00
middleware feat: make maintenance-related 503s more intuitive (#5018) 2023-10-16 09:27:29 +01:00
openapi feat: add option to return disabled strategies (#5059) 2023-10-17 12:35:07 +03:00
proxy feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
routes feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
schema feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
segments feat: context/segment usage private (#4826) 2023-09-25 15:50:44 +03:00
services feat: dependent features use new transaction mechanism (#5073) 2023-10-18 08:59:26 +02:00
types feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
util feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
app.test.ts
app.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
create-config.test.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
create-config.ts feat: Adds rate limiting to metric POST endpoints (#5075) 2023-10-18 13:00:44 +02:00
default-custom-auth-deny-all.ts
internals.ts fix: export NotFoundError and ISegmentService in internals.ts (#4997) 2023-10-11 14:31:45 +03:00
logger.test.ts
logger.ts
metric-events.ts
metrics.test.ts feat: feature changes counted in new table (#4958) 2023-10-10 12:32:23 +02:00
metrics.ts feat: feature changes counted in new table (#4958) 2023-10-10 12:32:23 +02:00
server-impl.test.ts feat: biome lint (#4853) 2023-09-29 14:18:21 +02:00
server-impl.ts feat: disable scheduler for tests (#4496) 2023-08-15 15:58:36 +02:00