mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-17 13:46:47 +02:00
### 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. |
||
---|---|---|
.. | ||
validators | ||
anonymise.test.ts | ||
anonymise.ts | ||
anyEventEmitter.test.ts | ||
anyEventEmitter.ts | ||
arraysHaveSameItems.test.ts | ||
arraysHaveSameItems.ts | ||
collapseHourlyMetrics.test.ts | ||
collapseHourlyMetrics.ts | ||
collect-ids.ts | ||
constants.ts | ||
constantTimeCompare.test.ts | ||
constantTimeCompare.ts | ||
db-lock.test.ts | ||
db-lock.ts | ||
ensureArray.ts | ||
ensureStringValue.test.ts | ||
ensureStringValue.ts | ||
escape-regex.ts | ||
extract-user.test.ts | ||
extract-user.ts | ||
findDuplicates.test.ts | ||
findDuplicates.ts | ||
findPublicFolder.ts | ||
flag-resolver.test.ts | ||
flag-resolver.ts | ||
format-base-uri.test.ts | ||
format-base-uri.ts | ||
generateImageUrl.ts | ||
get-prop-from-string.ts | ||
graceful-shutdown.ts | ||
index.ts | ||
is-email.test.ts | ||
is-email.ts | ||
isDefined.test.ts | ||
isDefined.ts | ||
isEmpty.ts | ||
load-index-html.ts | ||
map-values.test.ts | ||
map-values.ts | ||
metrics-helper.ts | ||
omit-keys.test.ts | ||
omit-keys.ts | ||
parseEnvVar.test.ts | ||
parseEnvVar.ts | ||
random-id.ts | ||
rewriteHTML.test.ts | ||
rewriteHTML.ts | ||
segments.ts | ||
semver.test.ts | ||
semver.ts | ||
snakeCase.test.ts | ||
snakeCase.ts | ||
time-utils.test.ts | ||
time-utils.ts | ||
timer.test.ts | ||
timer.ts | ||
unique.test.ts | ||
unique.ts | ||
validateJsonString.test.ts | ||
validateJsonString.ts | ||
validateOrigin.test.ts | ||
validateOrigin.ts | ||
version.ts |