Lien de la note Hackmd
Section 1: Load Balancing
- Distributes incoming app or network traffic across multiple targets in a single or multiples AZ
- Scales your load balance as traffic to your aapp changes over time
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 ?
Scaling is the ability ot increase of decrease the compute capacity of your app.
- First graph: unused capacity on most days of the week, not cost optimized
- Second graph: under capacity on certain days
Automatic capacity scaling is necessary to support the fluctuating demands for service.
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
An Auto Scaling group is a collection of EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management.
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 ?
- Amazon Simple Notification Service
- AWS CloudTrail
- AWS Trusted Advisor
- Amazon Route 53
Answer
Keywords:
- send alerts
- Amazon CloudWatch Alarms
Answer: 1.