From dd3b8bd784216e90d6dee1c6f767efd903bdddc7 Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich Date: Wed, 22 Nov 2023 11:49:05 +0200 Subject: [PATCH] infra: downsizing of ECS tasks in prod --- infra/lib/scorer/service.ts | 2 ++ infra/prod/index.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/infra/lib/scorer/service.ts b/infra/lib/scorer/service.ts index 676585d64..ffd3094da 100644 --- a/infra/lib/scorer/service.ts +++ b/infra/lib/scorer/service.ts @@ -610,6 +610,7 @@ export function createIndexerService({ ]; new awsx.ecs.FargateService("scorer-staking-indexer", { + propagateTags: "TASK_DEFINITION", cluster: cluster.arn, desiredCount: 1, networkConfiguration: { @@ -637,6 +638,7 @@ export function createIndexerService({ links: [], }, }, + tags: { name: "scorer-staking-indexer" }, }, tags: { name: "scorer-staking-indexer", diff --git a/infra/prod/index.ts b/infra/prod/index.ts index fc3404316..67a71dfcb 100644 --- a/infra/prod/index.ts +++ b/infra/prod/index.ts @@ -685,6 +685,9 @@ const scorerServiceDefault = createScorerECSService( { ...baseScorerServiceConfig, targetGroup: targetGroupDefault, + memory: 1024, + cpu: 512, + desiredCount: 2, }, envConfig ); @@ -696,6 +699,9 @@ const scorerServiceRegistry = createScorerECSService( listenerRulePriority: 3000, httpListenerRulePaths: ["/registry/*"], targetGroup: targetGroupRegistry, + memory: 4096, + cpu: 2048, + desiredCount: 2, }, envConfig );