From 1b4295548d7ffe9fd70adfcb0a992084959cfeeb Mon Sep 17 00:00:00 2001 From: Deep Singhvi Date: Sat, 4 May 2024 23:10:37 -0500 Subject: [PATCH] (fix): scale fdr based on request account (#800) --- servers/fdr-deploy/scripts/fdr-deploy-stack.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/fdr-deploy/scripts/fdr-deploy-stack.ts b/servers/fdr-deploy/scripts/fdr-deploy-stack.ts index 7dd3b0feed..cdb342e001 100644 --- a/servers/fdr-deploy/scripts/fdr-deploy-stack.ts +++ b/servers/fdr-deploy/scripts/fdr-deploy-stack.ts @@ -173,9 +173,11 @@ export class FdrDeployStack extends Stack { if (options.redis) { const scalableTaskCount = fargateService.service.autoScaleTaskCount({ maxCapacity: options.maxTaskCount, + minCapacity: options.desiredTaskCount, }); - scalableTaskCount.scaleOnCpuUtilization("CpuUtilizationScaling", { - targetUtilizationPercent: 50, + scalableTaskCount.scaleOnRequestCount("RequestCountScaling", { + targetGroup: fargateService.targetGroup, + requestsPerTarget: 1000, }); }