Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions dotcom-rendering/cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ export const InteractiveRenderingPropsCODE: RenderingCDKStackProps = {
guApp: 'interactive-rendering',
stage: 'CODE',
domainName: 'interactive-rendering.code.dev-guardianapis.com',
ec2Props: {
scaling: { minimumInstances: 1, maximumInstances: 3 },
instanceType: InstanceType.of(InstanceClass.T4G, InstanceSize.MICRO),
},
ecsProps: {
imageIdentifier: getImageIdentifier(),
cpu: 1024,
Expand All @@ -253,11 +249,6 @@ export const InteractiveRenderingPropsCODE: RenderingCDKStackProps = {
},
managedInstancesProps: {},
},
// Route 100% traffic to ECS.
targetGroupWeights: {
ec2: 0,
ecs: 1,
},
};
/** Interactive */
new RenderingCDKStack(
Expand All @@ -270,34 +261,6 @@ export const InteractiveRenderingPropsPROD: RenderingCDKStackProps = {
guApp: 'interactive-rendering',
stage: 'PROD',
domainName: 'interactive-rendering.guardianapis.com',
ec2Props: {
scaling: {
minimumInstances: 3,
maximumInstances: 30,
policies: {
step: {
cpu: cpuScalingSteps,
latency: {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The absence of latency based scaling in ecs is a query - should we have this? Can we have this?

scalingStepsOut: [
// When latency is lower than 0.2s no scaling up
{ lower: 0, upper: 0.2, change: 0 },
// When latency is higher than 0.2s we scale up by 50%
{ lower: 0.2, change: 50 },
// When latency is higher than 0.3s we scale up by 80%
{ lower: 0.3, change: 80 },
],
scalingStepsIn: [
// When latency is higher than 0.15s no scaling down
{ lower: 0.15, change: 0 },
// When latency is lower than 0.15s we scale down by 1
{ upper: 0.15, lower: 0, change: -1 },
],
},
},
},
},
instanceType: InstanceType.of(InstanceClass.C8G, InstanceSize.MEDIUM),
},
ecsProps: {
imageIdentifier: getImageIdentifier(),
cpu: 1024,
Expand All @@ -321,11 +284,6 @@ export const InteractiveRenderingPropsPROD: RenderingCDKStackProps = {
},
},
},
// Route 0% traffic to EC2, 100% to ECS.
targetGroupWeights: {
ec2: 0,
ecs: 1,
},
};
new RenderingCDKStack(
cdkApp,
Expand Down
Loading
Loading