0
votes

t3 instances are burstable above baseline, so how does this have to be considered for auto-scaling by CPUUtilization?

Let's say we use t3.small instances with:

  • 24 CPU credits earned per hour
  • 2 vCPUs
  • 20% Baseline performance per vCPU

I would set this scaling trigger for CPUUtilization:

  • Statistic: Average
  • Unit: Percent
  • Period: 5min
  • Breach duration: 5min
  • Upper threshold: 15%
  • Lower threshold: 5%

So the upper threshold is set just below the baseline to avoid the additional cost when staying above the baseline for too long (and using up CPU credits).

In addition I set a CloudWatch alert when CPUUtilization of any instance stays above 20% for too long. This would at least get triggered when auto scaling has reached the max. number of allowed instances.

Does this all make sense?

1

1 Answers

1
votes

It is not advisable to use CPU Utilization as a metric for Auto Scaling when using T1/2/3 burstable instance types.

The reason is that the CPU on these instances can be artificially limited, thereby giving a false impression of how busy they are.

If you activate the "Unlimited" option, then this is okay because instance can burst as required without limit. Do not be afraid of the extra charge since it only costs extra if it exceeds a monthly average and you'll only be paying for CPU that was actually "used" when they were busy.

Alternatively, choose a different (non-burstable) instance type.