COST 9: How do you manage demand, and supply resources?

For a workload that has balanced spend and performance, ensure that everything you pay for is used and avoid significantly underutilizing instances. A skewed utilization metric in either direction has an adverse impact on your organization, in either operational costs (degraded performance due to over-utilization), or wasted AWS expenditures (due to over-provisioning).

Resources

Getting started with Amazon SQS
AWS Auto Scaling
AWS Instance Scheduler

Best Practices:

Improvement Plan

Perform an analysis on the workload demand

  • Analyze existing workload data : Analyze data from the existing workload, previous versions of the workload, or predicted usage patterns. Use log files and monitoring data to gain insight on how customers use the workload. Typical metrics are the actual demand, in requests per second, the times when the rate of demand changes or when it is at different levels, and the rate of change of demand. Ensure you analyze a full cycle of the workload, ensuring you collect data for any seasonal changes such as end of month or end of year events. The effort reflected in the analysis should reflect the workload characteristics. The largest effort should be placed on high value workloads that have the largest changes in demand. The least effort should be placed on low value workloads that have minimal changes in demand. Common metrics for value are risk, brand awareness, revenue or workload cost.
  • Forecast outside influence : Meet with team members from across the organization that can influence or change the demand in the workload. Common teams would be sales, marketing or business development. Work with them to know the cycles they operate with, and if there are any events that would change the demand of the workload. Forecast the workload demand with this data.
  • Implement a buffer or throttle to manage demand

  • Analyze the client requirements : Analyze the client requests to determine if they are capable of performing retries. For clients that cannot perform retries, buffers will need to be implemented. Analyze the overall demand, rate of change, and required response time to determine the size of throttle or buffer required.
  • Implement a buffer or throttle : Implement a buffer or throttle in the workload. A queue such as SQS can provide a buffer to your workload components. Amazon API Gateway can provide throttling for your workload components.
    Amazon Simple Queue Service
    Amazon API Gateway
  • Supply resources dynamically

  • Configure time-based scheduling : For predictable changes in demand, time-based scaling can provide the correct amount of resources in a timely manner. It is also useful if resource creation and configuration is not fast enough to respond to changes in demand. Using the workload analysis configure scheduled scaling using AWS Auto Scaling.
    Scheduled Scaling for Amazon EC2 Auto Scaling
  • Configure Auto Scaling : To configure scaling based on active workload metrics, use Amazon Auto Scaling. Use the analysis and configure auto scaling to trigger on the correct resource levels, and ensure that the workload scales in the required time.
    Getting Started with Amazon EC2 Auto Scaling