From 4cde403b86743a4f12c8943d1e2d1dac89e63073 Mon Sep 17 00:00:00 2001 From: akash1810 Date: Thu, 17 Sep 2026 10:35:53 +0100 Subject: [PATCH 1/3] refactor: Make target weighting configurable This is a no-op change. Co-authored-by: connoromalleyatwork --- dotcom-rendering/cdk/bin/cdk.ts | 12 ++++++++++++ dotcom-rendering/cdk/lib/renderingStack.ts | 11 +++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/dotcom-rendering/cdk/bin/cdk.ts b/dotcom-rendering/cdk/bin/cdk.ts index 9bc82cd7a17..56d5dfa91d3 100644 --- a/dotcom-rendering/cdk/bin/cdk.ts +++ b/dotcom-rendering/cdk/bin/cdk.ts @@ -124,6 +124,12 @@ export const TagPageRenderingPropsCODE: RenderingCDKStackProps = { scaleOutCooldown: Duration.seconds(60), }, }, + + // Route all traffic to EC2 + targetGroupWeights: { + ec2: 1, + ecs: 0, + }, }, }; @@ -178,6 +184,12 @@ export const TagPageRenderingPropsPROD: RenderingCDKStackProps = { scaleOutCooldown: Duration.seconds(60), }, }, + + // Route all traffic to EC2 + targetGroupWeights: { + ec2: 1, + ecs: 0, + }, }, }; diff --git a/dotcom-rendering/cdk/lib/renderingStack.ts b/dotcom-rendering/cdk/lib/renderingStack.ts index 2acd6f517ca..596d184c6f6 100644 --- a/dotcom-rendering/cdk/lib/renderingStack.ts +++ b/dotcom-rendering/cdk/lib/renderingStack.ts @@ -72,6 +72,10 @@ export interface RenderingCDKStackProps extends Omit { scaling: NonNullable< GuLoadBalancedAppExperimentalProps['ecsProps'] >['scaling']; + + targetGroupWeights: NonNullable< + GuLoadBalancedAppExperimentalProps['targetGroupWeights'] + >; }; } @@ -303,12 +307,7 @@ export class RenderingCDKStack extends CDKStack { cpu: ecsProps.taskCpu, scaling: ecsProps.scaling, }, - - // Route all traffic to EC2 - targetGroupWeights: { - ec2: 1, - ecs: 0, - }, + targetGroupWeights: ecsProps.targetGroupWeights, }), }); From 2d58444d5f61502d59fca332ad794686dae0c2b3 Mon Sep 17 00:00:00 2001 From: akash1810 Date: Thu, 17 Sep 2026 10:38:01 +0100 Subject: [PATCH 2/3] feat: Route 100% of traffic for tag-page-rendering CODE to ECS We have performed a number of load tests against CODE and are happy with it's performance compared to EC2. Co-authored-by: connoromalleyatwork --- dotcom-rendering/cdk/bin/cdk.ts | 6 +++--- .../cdk/lib/__snapshots__/renderingStack.test.ts.snap | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dotcom-rendering/cdk/bin/cdk.ts b/dotcom-rendering/cdk/bin/cdk.ts index 56d5dfa91d3..bea2dc2708e 100644 --- a/dotcom-rendering/cdk/bin/cdk.ts +++ b/dotcom-rendering/cdk/bin/cdk.ts @@ -125,10 +125,10 @@ export const TagPageRenderingPropsCODE: RenderingCDKStackProps = { }, }, - // Route all traffic to EC2 + // Route all traffic to ECS targetGroupWeights: { - ec2: 1, - ecs: 0, + ec2: 0, + ecs: 1, }, }, }; diff --git a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap index 12a9eecac0c..53883481abe 100644 --- a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap +++ b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap @@ -2966,13 +2966,13 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering CODE "TargetGroupArn": { "Ref": "TargetGroupTagpagerendering42E428EE", }, - "Weight": 1, + "Weight": 0, }, { "TargetGroupArn": { "Ref": "TagpagerenderingEcsTargetGroupTagpagerendering0976D2E5", }, - "Weight": 0, + "Weight": 1, }, ], }, From a7188fca29fda9db872aeb1e45f5d9a7debe920a Mon Sep 17 00:00:00 2001 From: akash1810 Date: Thu, 17 Sep 2026 10:43:31 +0100 Subject: [PATCH 3/3] feat: Serve 10% of tag-page-rendering PROD traffic with ECS After load testing, we're confident that ECS can serve production traffic. 10% equates to 70-100 requests/minute. Co-authored-by: connoromalleyatwork --- dotcom-rendering/cdk/bin/cdk.ts | 6 +++--- .../cdk/lib/__snapshots__/renderingStack.test.ts.snap | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dotcom-rendering/cdk/bin/cdk.ts b/dotcom-rendering/cdk/bin/cdk.ts index bea2dc2708e..51db54f2ddb 100644 --- a/dotcom-rendering/cdk/bin/cdk.ts +++ b/dotcom-rendering/cdk/bin/cdk.ts @@ -185,10 +185,10 @@ export const TagPageRenderingPropsPROD: RenderingCDKStackProps = { }, }, - // Route all traffic to EC2 + // Route 90% traffic to EC2, 10% to ECS targetGroupWeights: { - ec2: 1, - ecs: 0, + ec2: 9, + ecs: 1, }, }, }; diff --git a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap index 53883481abe..b4886f48dcb 100644 --- a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap +++ b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap @@ -5459,13 +5459,13 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "TargetGroupArn": { "Ref": "TargetGroupTagpagerendering42E428EE", }, - "Weight": 1, + "Weight": 9, }, { "TargetGroupArn": { "Ref": "TagpagerenderingEcsTargetGroupTagpagerendering0976D2E5", }, - "Weight": 0, + "Weight": 1, }, ], },