lundi 26 janvier 2015

Configuring AWS auto scaling metrics

I'm trying to figure out how to configure my AWS auto scaling metrics, but I'm finding it to a bit confusing so I was hoping for a little assistance.


I managed to stumble on this netflix configuration doc



To scale up early we recommend tripping a CloudWatch alarm at 75% of the target threshold for a small amount of time. We typically recommend 5-10 minutes to trigger an event. Note, be mindful about the time required to start an instance, consider both EC2 and application startup time. The 25% headroom provides excess capacity for short irregular request spikes. It also protects against the loss of capacity due to instances failing on startup. For example, if max CPU utilization is 80%, set the alarm to trigger after 5 minutes at 60% CPU.


Scaling down slowly is important to mitigate the risk of removing capacity too quickly, or incorrectly reducing capacity. To prevent these scenarios we use time as a proxy to scaling slowly. For example, scale up by 10% if CPU utilization is greater than 60% for 5 minutes, scale down by 10% if CPU utilization is less than 30% for 20 minutes. The advantage to using time, as opposed to asymmetric scaling policies, is to prevent capacity 'thrashing', or removing too much capacity followed by quickly re-adding the capacity. This can happen if the scale down policy is too aggressive. Time-based scaling can also prevent incorrectly scaling down during an unplanned service outage. For example, suppose an edge service temporarily goes down. As a result of reduced requests associated with the outage, the middle tier may incorrectly scale down. If the edge service is down for less than the configured alarm time, no scale down event will occur.



Which can be found here http://ift.tt/1qB34ip


There's a few things I'm not fully comprehending that I would like some help understanding.


Lets start with the CloudWatch alarm at 75% of the target threshold. Does this mean I need to set an alarm within CloudWatch or are those alarms automatically set when configuring your auto scaling metrics?


My settings



  1. min instance "1"

  2. max instance "10"

  3. scaling cool down "360" (seconds)

  4. Trigger "CPU"

  5. Trigger statistic "average" I'm not sure what this should be

  6. Unit of measurement "percent" Measurement period "5" (minutes) I'm assuming this is the time between measurements?

  7. Upper threshold "60" Assuming this is 60% of CPU utilization. I'm not sure how netflix is setting the max 80% Upper

  8. Breach scale increment "10" Assuming that means scale up 10%

  9. Lower threshold "30" Assuming this is 30% of CPU utilization. They are suggesting in their article after 20mins, I'm not sure how to set that time as I only see 5mins?

  10. Lower breach scale increment "-10" I'm assuming that means scale down by 10%


Questions



  1. So I'd like to know if my settings are a match to what netflix is using?

  2. I'd like to clarify my questions within the my settings so that I have a better understanding of scaling going forward.

  3. Should an alarm send an email notification to you?


Thanks in advance





Aucun commentaire:

Enregistrer un commentaire