Home AWS Module 10 - Automatic Scaling and Monitoring
Post
Cancel

AWS Module 10 - Automatic Scaling and Monitoring

Lien de la note Hackmd

Section 1: Load Balancing

Types of loads balancers

How Elastic Loads Balancing works

  • With Application Load Balncers and Network Load Balancers, you register targets in traffic to the target groups
  • With Classic Load Balancers, you register instance with the load balancer
  • Load balancer performs health checks to monitor health of registered targets

Elastic Load Balancing use cases

  • High available and fault-tolerant app
  • Containerized app
  • Elasticity and scalability
  • VPC
  • Hybrid environments
  • Incoke Lambad functions over HTTP(S)

Load balancer monitoring

  • Amazon CloudWatch metrics
    • Used to verify that the system is performing as expected and creates an alarm to initiate an action if a metric goes outside an acceptable range
  • Access logs
    • Capture detailed information about requests sent to your load balancer
  • AWS CloudTrail logs
    • Capture the who, what, when, and where of API interactions in AWS services

Section 2: Amazon CloudWatch

Monitoring AWS resources

To use AWS efficiently, you need insight into your AWS resources:

  • How do you know when you should launch more Amazon EC2 instances ?
  • Is your app’s performance or availability being affected by a lack of sufficient capacity ?
  • How much of your infrastructure is actually being used ?

Amazon CloudWatch

  • Monitors
    • AWS resources
    • App that run on AWS
  • Collect and track
    • Standard metrics
    • Custom metrics
  • Alarms
    • Send notifications to an Amazon SNS topic
    • Perform Amazon EC2 Auto Scaling or Amazon EC2 actions
  • Events
    • Define rules to match changes in AWS environment and route these events to one or more target functions or streams for processing

CloudWatch alarsm

  • Create alarms basde on
    • Static threshold
    • Anomlay detection
    • Metric math expression
  • Specify
    • Namespace
    • Metric
    • Statistic
    • Period
    • Conditions
    • Additional configuration
    • Actions

Section 3: Amazon EC2 Auto Scaling

Why is scaling important ?

  • First graph: unused capacity on most days of the week, not cost optimized
  • Second graph: under capacity on certain days

Amazon EC2 Auto Scaling

  • Hels you maintaint app
  • Enables you to automatically add or remove EC2 instances according to conditions that you define
  • Detects impaired EC2 instances and unhealthy app, and replaces the instances without your intervention
  • Provides several scaling options
    • Manual
    • Scheduled
    • Dynamic (on-demand)
    • Predictive

Typical weekly traffic at Amazon.com

November traffic to Amazon.com

Auto Scaling groups

Scaling ou vs scaling in

How Amazon EC2 Auto Scaling works

Implementing dynamic scaling

AWS Auto Scaling

  • Monitors you app and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost
  • Provides a simple, powerful user interface that enables you to build scaling plans for resources, including
    • Amazon EC2 instances and Spot Fleet
    • Amazon Elastic Container Service (Amazon ECS) Tasks
    • Amazon DynamoDB tables and indexes
    • Amazon Aurora Replicas

Wrap-up

Which service would you sue to send alerts base on Amazon CloudWatch alarms ?

  1. Amazon Simple Notification Service
  2. AWS CloudTrail
  3. AWS Trusted Advisor
  4. Amazon Route 53
Answer

Keywords:

  • send alerts
  • Amazon CloudWatch Alarms

Answer: 1.

This post is licensed under CC BY 4.0 by the author.