AWS Classroomnotes 25/Sep/2022

AWS Auto Scaling Group Continued

  • Impact of parallel connections to a server. As users create parallel/concurrent connections (session) the load on cpu increases.
    Preview
  • In this lets try doing this,
    • increase number of ec2 instances by 1 when average cpu utilization for last 5 minutes > 70
    • decrease number of ec2 instances by 1 when average cpu utilization for last 5 minutes < 50
    • minimum instances = 1, max instances = 5
    • To create artificial stress on the ec2 instance we will be using stress tool.
  • Steps followed:
    Preview
    Preview
    Preview
    Preview
  • Wait for the auto scaling group to be created with no scaling policy. Now lets create a dynamic scaling policy
    Preview
  • Now Select Metric and Create Cloudwatch Alarm
    Preview
    Preview
    Preview
    Preview
    Preview
  • Now lets generate artifical load. Login into ec2 instance
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 60m -v
  • Now observe for the changes in desired capacity in the period of 5-10 mins
    Preview
  • Now stop the stress tool (ctrl + c) and wait for 5-10 mins the desired capacity will be back to 1

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube