Skip to content

Commit 347a5c8

Browse files
authored
Merge pull request #1303 from guardian/tf-asg-policy
Use request count for autoscaling policy
2 parents d80f8a9 + 8a70a27 commit 347a5c8

File tree

2 files changed

+66
-8
lines changed

2 files changed

+66
-8
lines changed

cdk/lib/__snapshots__/dotcom-components.test.ts.snap

Lines changed: 62 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cdk/lib/dotcom-components.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ chown -R dotcom-components:support /var/log/dotcom-components
216216
];
217217

218218
const scaling: GuAsgCapacity = {
219-
minimumInstances: this.stage === 'CODE' ? 1 : 6,
219+
minimumInstances: this.stage === 'CODE' ? 1 : 3,
220220
maximumInstances: this.stage === 'CODE' ? 2 : 18,
221221
};
222222

@@ -252,8 +252,8 @@ chown -R dotcom-components:support /var/log/dotcom-components
252252
scaling,
253253
});
254254

255-
ec2App.autoScalingGroup.scaleOnCpuUtilization('CpuScalingPolicy', {
256-
targetUtilizationPercent: 40,
257-
});
255+
ec2App.autoScalingGroup.scaleOnRequestCount('RequestCountScalingPolicy', {
256+
targetRequestsPerMinute: 20000,
257+
});
258258
}
259259
}

0 commit comments

Comments
 (0)