From 6c8a47d94e15005bb2c3b5fada28a91983b9ad8a Mon Sep 17 00:00:00 2001 From: Richard Fontein <32132657+rifont@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:12:37 +0200 Subject: [PATCH] chore(api): Increase rate limit window duration to 5 seconds (#6759) --- .../shared/src/consts/rate-limiting/apiRateLimits.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/shared/src/consts/rate-limiting/apiRateLimits.ts b/packages/shared/src/consts/rate-limiting/apiRateLimits.ts index 7083c94866e..c0e2d3786af 100644 --- a/packages/shared/src/consts/rate-limiting/apiRateLimits.ts +++ b/packages/shared/src/consts/rate-limiting/apiRateLimits.ts @@ -14,29 +14,29 @@ import { ApiRateLimitCategoryEnum, IApiRateLimitServiceMaximum } from '../../typ export const DEFAULT_API_RATE_LIMIT_SERVICE_MAXIMUM_CONFIG: IApiRateLimitServiceMaximum = { [ApiServiceLevelEnum.FREE]: { [ApiRateLimitCategoryEnum.TRIGGER]: 60, - [ApiRateLimitCategoryEnum.CONFIGURATION]: 15, + [ApiRateLimitCategoryEnum.CONFIGURATION]: 20, [ApiRateLimitCategoryEnum.GLOBAL]: 30, }, [ApiServiceLevelEnum.BUSINESS]: { [ApiRateLimitCategoryEnum.TRIGGER]: 600, - [ApiRateLimitCategoryEnum.CONFIGURATION]: 150, + [ApiRateLimitCategoryEnum.CONFIGURATION]: 200, [ApiRateLimitCategoryEnum.GLOBAL]: 300, }, [ApiServiceLevelEnum.ENTERPRISE]: { [ApiRateLimitCategoryEnum.TRIGGER]: 6000, - [ApiRateLimitCategoryEnum.CONFIGURATION]: 1500, + [ApiRateLimitCategoryEnum.CONFIGURATION]: 2000, [ApiRateLimitCategoryEnum.GLOBAL]: 3000, }, [ApiServiceLevelEnum.UNLIMITED]: { [ApiRateLimitCategoryEnum.TRIGGER]: 6000, - [ApiRateLimitCategoryEnum.CONFIGURATION]: 1500, + [ApiRateLimitCategoryEnum.CONFIGURATION]: 2000, [ApiRateLimitCategoryEnum.GLOBAL]: 3000, }, }; export const DEFAULT_API_RATE_LIMIT_ALGORITHM_CONFIG: IApiRateLimitAlgorithm = { - [ApiRateLimitAlgorithmEnum.BURST_ALLOWANCE]: 0.1, - [ApiRateLimitAlgorithmEnum.WINDOW_DURATION]: 1, + [ApiRateLimitAlgorithmEnum.BURST_ALLOWANCE]: 0.1, // allow 10% burst + [ApiRateLimitAlgorithmEnum.WINDOW_DURATION]: 5, // 5 second window duration }; export const DEFAULT_API_RATE_LIMIT_COST_CONFIG: IApiRateLimitCost = {