M10: Automatic Scaling and monitoring Flashcards
Module 10
Elastic load balancing
Distributes incoming application or network traffic across multiple targets in a single availability zone or across multiple availability zones
Offers several monitoring tools for continuous monitoring and logging for auditing and analytics
Three types of elastic load balancing
- Application load balancer: level 7, ideal for HTTP/S traffic including containers, ensures latest SSL/TLS used.
- Network load balancer: layer 4, transport, routing connections to targets based on IP protocol data
- Classic load balancer: load balancing across multiple EC2 instances, older.
Configuring load balancer
- Listener
2. Optional health checks
Configuring load balancer types
Application and network load balancers register targets in target groups and route traffic to target groups
Classic, register instances with load balancer
Reasons to use load balancer
- Achieve high availability and better fault tolerance for your application
- Automatically load balance your containerised applications
- Automatically scale your applications
- Use elastic load balancing in your VPC
- Enable hybrid load balancing
- Invoking lambda functions over HTTP/S
Amazon CloudWatch
Monitoring and observability service
Can respond to changes and take corrective action ss necessary
CloudWatch alarm
Single metric Maths expression based on CloudWatch metrics Static threshold Anomaly detection Metric maths expression
Specification needed for a static threshold alarm
- Namespace: metric wanted, eg EC2
- Metric: variable to measure
- Statistic: average, sum, percentile…
- Period: evaluation period
- Conditions: metric greater, greater equal…
- Additional configuration information: number of data points that need to be breached
- Actions: send notification to SNS topic, perform auto scaling, EC2 action
EC2 auto scaling
Maintains application availability and enables the automatic addition or removal of EC2 instances according to conditions you define
Ways to use auto scaling
EC2 Instances can be added / deleted:
- manually
- on a schedule
- in response to demand
- in combination with auto scaling
- dynamic and predictive scaling can be used together to scale faster
Auto scaling group
Collection of EC2 instances treated as a logical grouping for purposes of automatic scaling and management
Minimum, desired and maximum size
Launch configuration
Instance configuration template
Implement dynamic scaling
EC2 auto scaling, Amazon CloudWatch and elastic load balancing
AWS auto scaling
Separate service that monitors your application, automatically adjusting for the following resources :
- amazon EC2 instances and spot fleets
- amazon ECS tasks
- amazon DynamoDB tables and indexes
- amazon aurora replicas