High Availability and Scaling Flashcards

1
Q

What Is a Launch Template in Auto Scaling Groups?

A

A launch template specifies all the needed settings that go into building out an EC2 instance. It is a collection of settings you can configure so you don’t have to walk through the EC2 wizard over and over.

  • it includes the AMI, EC2 instance size,
    security groups, potentially networking information,key-pair, and the user data to inject and the IAM Role to attach.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Launch Templates vs. Launch Configurations

A

Templates:
- More than just autoscaling(can be used to provision ec2 instances)
- Supports versioning
- More granularity
- AWS recommended

Configurations:
- Only for autoscaling
- Immutable
- Limited configuration options
- Don’t use them

Both not editable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are Auto Scaling Groups

A

An Auto Scaling group contains a collection of EC2 instances that are treated as a collective group for purposes of scaling and management.

It includes health checks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the Auto Scaling Steps?

A
  1. Define Your Template: You have to pick from your available
    launch templates or launch configurations.
  2. Networking and Purchasing: Pick your networking space and
    purchasing options. Using multiple AZs allows for high availability.
  3. ELB Configuration: EC2 instances can be registered behind
    a load balancer. The Auto Scaling group can be set to respect the load balancer health checks.
  4. Set Scaling Policies: Minimum, maximum, and desired capacity
    needs to be set to ensure you don’t have too many or too few resources.
  5. Notifications: SNS can act as a notification tool,
    allowing you to let someone know when a scaling event occurs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to avoid long provisioning times in autoscaling?

A

You can avoid long provisioning times by putting everything in an AMI. This is better than using user data whenever possible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the different types of scaling policies and concepts used with AWS Auto Scaling?

A
  • Manual Scaling: Allows you to manually adjust the number of instances in your Auto Scaling group.
  • Scheduled Scaling: Allows you to scale your Auto Scaling group based on a predefined schedule. This can be useful for applications that have predictable traffic patterns.
  • Dynamic Scaling: Automatically adjusts the capacity of your Auto Scaling group based on various metrics and conditions. There are three types of dynamic scaling policies:
    • Simple scaling: Scales your Auto Scaling group up or down by a specified number of instances in response to changes in a metric value.
    • Step scaling: Scales your Auto Scaling group up or down by a specified number of instances in response to changes in a metric value, but with multiple steps. This allows you to define more granular scaling behavior.
    • Target tracking scaling: Scales your Auto Scaling group to maintain a specified target value for a metric. For example, you could use a target-tracking scaling policy to maintain a certain level of CPU utilization or request latency.
  • Cooldown Periods: A time delay between scaling actions to avoid excessive scaling.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are ASG Lifecycle hooks?

A

Lifecycle hooks enable you to perform custom actions by pausing instances as an Auto Scaling group launches or terminates them. When an instance is paused, it remains in a wait state either until you complete the lifecycle action using the complete-lifecycle-action command or the CompleteLifecycleAction operation, or until the timeout period ends (one hour by default).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 3 different ASG Health Checks types?

A

Amazon EC2 Auto Scaling can determine the health status of an instance using one or more of the following:

  • Status checks provided by Amazon EC2 to identify hardware and software issues that may impair an instance. The default health checks for an Auto Scaling group are EC2 status checks only. Only “Running” is considered a healthy state. “impaired(1of2 of checks pass” is considered unhealthy.
  • Health checks provided by Elastic Load Balancing (ELB). These health checks are disabled by default but can be enabled. Can be more application-aware (level 7).
  • Your custom health checks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly