-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(api, shared, app-generic): Convert API rate limit FF to be LaunchDarkly compatible #4857
Conversation
…itical to feature-flags
…ture flag for consistency
NV-3061 🏎️ Rate Limiting NestJS Guard
What?Create the NestJS guard which is attached to the global App, Controllers and implements the TokenBucketRateLimit use case from NV-3060
Why? (ContextNestJS guards provide a capability to block traffic from the services it protects. We need to be able to protect specific resources from high traffic to enable service resiliency and reliability. Definition of Done
|
@@ -25,7 +25,7 @@ REDIS_CACHE_FAMILY= | |||
REDIS_CACHE_KEY_PREFIX= | |||
REDIS_CACHE_ENABLE_AUTOPIPELINING=true | |||
|
|||
IS_REQUEST_RATE_LIMITING_ENABLED=false | |||
IS_API_RATE_LIMITING_ENABLED=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"API Rate Limiting" aligns naming with the use-cases under development. If we decide to add Web Socket rate limiting or other types, we can then toggle these features independently.
...ation-generic/src/usecases/get-feature-flag/get-is-request-rate-limiting-enabled.use-case.ts
Outdated
Show resolved
Hide resolved
…//github.com/novuhq/novu into nv-3061-convert-rate-limit-ff-for-launchdarkly
@@ -0,0 +1,22 @@ | |||
import { Injectable } from '@nestjs/common'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was also renamed from get-is-request-rate-limiting-enabled
-> get-is-api-rate-limiting-enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me 🎉
What change does this PR introduce?
IS_REQUEST_RATE_LIMITING_ENABLED
->IS_API_RATE_LIMITING_ENABLED
for naming consistency with features under implementationWhy was this change needed?
Other information (Screenshots)
N/A