0% found this document useful (0 votes)
22 views42 pages

Week 10a AcademyCloudFoundations - Module - HA

The document outlines the AWS Academy Cloud Foundations module on Automatic Scaling and Monitoring, covering key topics such as Elastic Load Balancing, Amazon CloudWatch, and Amazon EC2 Auto Scaling. It emphasizes the importance of distributing traffic, monitoring resources in real-time, and dynamically scaling EC2 instances to maintain application availability. The module includes activities, objectives, and a lab scenario for practical application of the concepts learned.

Uploaded by

Isuri Gunarathne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views42 pages

Week 10a AcademyCloudFoundations - Module - HA

The document outlines the AWS Academy Cloud Foundations module on Automatic Scaling and Monitoring, covering key topics such as Elastic Load Balancing, Amazon CloudWatch, and Amazon EC2 Auto Scaling. It emphasizes the importance of distributing traffic, monitoring resources in real-time, and dynamically scaling EC2 instances to maintain application availability. The module includes activities, objectives, and a lab scenario for practical application of the concepts learned.

Uploaded by

Isuri Gunarathne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

AWS Academy Cloud Foundations

Automatic Scaling and Monitoring


Module overview

Topics Activities
• Elastic Load Balancing • Elastic Load Balancing activity
• Amazon CloudWatch activity
• Amazon CloudWatch
• Amazon EC2 Auto Scaling
Lab
• Scale and Load Balance Your
Architecture

Knowledge
check
2
Module objectives

After completing this module, you should be able to:


• Indicate how to distribute traffic across Amazon Elastic Compute
Cloud (Amazon EC2) instances by using Elastic Load Balancing
• Identify how Amazon CloudWatch enables you to monitor AWS
resources and applications in real time
• Explain how Amazon EC2 Auto Scaling launches and releases
servers in response to workload changes
• Perform scaling and load balancing tasks to improve an architecture

3
Module 10: Automatic Scaling and Monitoring

Section 1: Elastic Load Balancing


Reminder
• We are always working with the idea that “Everything fails all of the
time”
• This is one of the reasons why we are using multiple Availability Zones (AZ) in
our designs
• In addition though we can right size and horizontal scale our workload
• Rather than having a single powerful EC2 instance we can use a larger number of smaller
devices and the workload can be distributed across all of these
• The number of devices can adapt to the number of requests, reducing the costs to the
customer

5
Reminder
• The idea of a number of servers also reduce the impact of a failure
• If a single powerful EC2 fails then you lose everything
• If a single EC2 fails in a cluster then the impact is reduced to the customer

6
Elastic Load Balancing

• Distributes incoming
application or network traffic
across multiple targets in a
Elastic
single Availability Zone or Load
across multiple Availability Balancing
Zones.
IP
• Scales your load balancer as addresses
Containers
traffic to your application EC2 Lambda functions
instances
changes over time.

7
Types of load balancers

8
How Elastic Load Balancing works
• With Application Load
Balancers and Network
Load Balancers, you
register targets in target AWS Cloud
Load balancer accepts
groups, and route traffic to
the target groups. Availability Zone A
incoming traffic
Availability Zone B
from clients.
• With Classic Load
Balancers, you register
instances with the load Listener checks for
Listener connection Listener
balancer.
requests.
Load balancer
Load balancer routes
performs health ✔ . traffic only to ✔ . ✔ . ✔ .
checks to monitor
health of registered
targets.
Target
X
Target healthy targets. Target Target Target

9
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. 12
Elastic Load Balancing Security
• In the use of a ELB only that device requires a Public IP Address
○ the Load balancer will be associated with both of the public subnets
AWS Cloud

Availability Zone 1 Availability Zone 2

Public subnet
Public subnet

Private subnet Private subnet

13
• Elastic Load Balancing distributes
Section 1 key incoming application or network
takeaways traffic across multiple targets in
one or more Availability Zones.
• Elastic Load Balancing supports
three types of load balancers:
• Application Load Balancer
• Network Load Balancer
• Classic Load Balancer
• ELB offers instance health
checks, security, and monitoring.

14
Module 10: Automatic Scaling and Monitoring

Section 2: Amazon CloudWatch


Monitoring AWS resources

• Cloudwatch Introduction Video

16
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 application's performance or availability being affected by


a lack of sufficient capacity?

• How much of your infrastructure is actually being used?

17
Amazon CloudWatch

• Monitors –
• AWS resources
• Applications that run on AWS
• Collects and tracks –
Amazon • Standard metrics
CloudWatch • 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
18
Amazon CloudWatch
• Cloudwatch is a free resource assuming you are happy with a 5
minute interval
• You can pay for 1 second monitoring with High Resolution
• The information about each resource is then stored separately
from the device which you are monitoring
• In a event of a failure we can still pull out the statistics about
the device
• In this respect you can carry out monitoring on the device
automatically as we will see or manually
• The data can be stored for 15 months but this will change
based on the level of detail you need
• Cloudwatch can also monitor your on premise solutions as well

19
Amazon CloudWatch
• Below is an example where I was working on a database and the stats
which I needed to see
• I was actually working on this database the day before these were
recovered and the database itself had been deleted
• The format of the data can be changed to your needs
• In my case a line chart was fine as I needed an overview of what was
happening

20
CloudWatch alarms

• Create alarms based on –


• Static threshold
• Anomaly detection
• Metric math expression
• Specify –
• Namespace
• Metric
• Statistic
• Period
• Conditions
• Additional configuration
• Actions
21
• Amazon CloudWatch helps you
Section 2 key monitor your AWS resources—and
takeaways the applications that you run on
AWS—in real time.
• CloudWatch enables you to –
• Collect and track standard and
custom metrics.
• Set alarms to automatically send
notifications to SNS topics, or perform
Amazon EC2 Auto Scaling or Amazon
EC2 actions.
• Define rules that match changes in
your AWS environment and route
these events to targets for processing.
23
Module 10: Automatic Scaling and Monitoring

Section 3: Amazon EC2 Auto Scaling


Why is scaling important?
On a Wednesday
Wasting Money ! Not providing the service level expected
Unused Over
capacity capacity

Su M T W Th F Su M T W Th F
Sa Sa

Used Provisioned
capacity capacity
(demand) 25
Amazon EC2 Auto Scaling

• Helps you maintain application


availability
• Enables you to automatically add or
remove EC2 instances according to
conditions that you define
• Detects impaired EC2 instances and
unhealthy applications, and replaces
Su M T W Th F
the instances without your
Sa intervention
Used Provisioned
• Provides several scaling options –
capacity capacity Manual, scheduled, dynamic or on-
(demand) demand, and predictive

26
Typical weekly traffic at Amazon.com

Provisioned capacity

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

27
November traffic to Amazon.com

Provisioned capacity 76 percent

The challenge is to efficiently guess


the unknown quantity of how much
compute capacity you need.

November
24 percent
28
Auto Scaling groups

Auto Scaling group An Auto Scaling group is a


collection of EC2 instances that
are treated as a logical
grouping for the purposes of
automatic scaling and
Minimum size Launch or terminate
instances as needed management.
Desired
capacity

Maximum
size 29
Scaling out versus scaling in

Elastic Load

Balancing

Auto Scaling group Auto Scaling group Auto Scaling group

Base Scale out Scale in


configuration (launch (terminate
instances) instances) 30
How Amazon EC2 Auto Scaling works
What Where When
VPC Maintain current number
Private subnet • Health checks
AMI

Auto Scaling group Manual scaling


EC2 • Min, max, desired capacity
instance

Scheduled scaling
Launch
Auto Scaling group • Scheduled actions
configuration
• AMI • VPC and subnets
• Instance type • Load balancer Dynamic scaling
• IAM role • Scaling policies
• Security groups
• EBS volumes Predictive scaling
• AWS Auto Scaling
31
Implementing dynamic scaling

Elastic Load
Balancing

Auto Scaling group

CPU
utilization If average
CPU
utilization is
> 60% for 5
minutes…
Run Amazon EC2 Auto Scaling
Amazon EC2 Auto Scaling policy Amazon CloudWatch
32
AWS Auto Scaling

• Monitors your applications and automatically


adjusts capacity to maintain steady,
predictable performance at the lowest possible
AWS Auto cost
Scaling • Provides a simple, powerful user interface that
enables you to build scaling plans for
resources, including –
• Amazon EC2 instances and Spot Fleets
• Amazon Elastic Container Service (Amazon ECS)
Tasks
• Amazon DynamoDB tables and indexes
• Amazon Aurora Replicas
33
• Scaling enables you to respond quickly
Section 3 key to changes in resource needs.
• Amazon EC2 Auto Scaling maintains
takeaways application availability by automatically
adding or removing EC2 instances.
• An Auto Scaling group is a collection of
EC2 instances.
• A launch configuration is an instance
configuration template.
• Dynamic scaling uses Amazon EC2
Auto Scaling, CloudWatch, and Elastic
Load Balancing.
• AWS Auto Scaling is a separate service
from Amazon EC2 Auto Scaling.
34
Lab 6:
Scale and Load
Balance Your
Architecture

35
Lab 6: Scenario
AWS Cloud

Region
Availability Zone A Availability Zone B
VPC: 10.0.0.0/16 Internet Public subnet 2:
Public subnet 1: gateway 10.0.2.0/24
10.0.0.0/24
Security group

NAT
Web Server
gateway
1
Private subnet 1: Private subnet 2:
10.0.1.0/24 10.0.3.0/24
Security group Security group

RDS DB RDS DB
Primary Secondary

36
Lab 6: Tasks

• Create an Amazon Machine Image (AMI) from a running instance.


• Create an Application Load Balancer.
• Create a launch configuration and an Auto Scaling group.
• Automatically scale new instances within a private subnet.
• Create Amazon CloudWatch alarms and monitor performance of your
infrastructure.

37
Lab 6: Final product
AWS Cloud
Region Availability Zone A Availability Zone B
VPC: 10.0.0.0/16 Internet
Public subnet 1: gateway Public subnet 2:
10.0.0.0/24 10.0.2.0/24
Security group

NAT
gateway Application
Private subnet 1: Load Private subnet 2:
10.0.1.0/24 Balancer 10.0.3.0/24

Security group Security group


Web Auto Scaling Web
Instanc group Instanc
e e
Security group Security group
RDS RDS DB
DB Secondar
Primary y
38
Begin lab 6
~ 30 minutes

Begin Lab 6: Scale


and Load Balance
Your Architecture

39
Lab debrief:
Key takeaways

40
Module 10: Automatic Scaling and Monitoring

Module wrap-up
Module summary

In summary, in this module you learned how to:


• Indicate how to distribute traffic across Amazon Elastic Compute
Cloud (Amazon EC2) instances using Elastic Load Balancing.
• Identify how Amazon CloudWatch enables you to monitor AWS
resources and applications in real time.
• Explain how Amazon EC2 Auto Scaling launches and releases
servers in response to workload changes.
• Perform scaling and load balancing tasks to improve an architecture.

42
Complete the knowledge check

43
Sample exam question

Which service would you use to send alerts based on Amazon CloudWatch
alarms?

A. Amazon Simple Notification Service


B. AWS CloudTrail
C. AWS Trusted Advisor
D. Amazon Route 53

44
Thank you

This work may not be reproduced or redistributed, in whole or in part, without prior written permission from Amazon Web Services, Inc. Commercial copying, lending, or
selling is prohibited. Corrections or feedback on the course, please email us at: aws-course-feedback@amazon.com. For all other questions, contact us at:
https://aws.amazon.com/contact-us/aws-training/. All trademarks are the property of their owners.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy