Auto Scaling Flashcards

1
Q

Auto Scaling

Auto Scaling resizes your computer clusters (Amazon EC2 instances) based on demand.

A

Auto Scaling

Auto Scaling resizes your computer clusters (Amazon EC2 instances) based on demand.

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

Auto Scaling components

  • Launch configuration: defines how Auto Scaling should launch your Amazon EC2 instances (similar to creating EC2 instances)
  • Auto Scaling group: uses a launch configuration to launch Amazon EC2 instances
  • Auto Scaling policy: uses a combination of policies and alarms to determine when the specified conditions for launching and terminating instances are met
  • Scheduled action: allows you to scale your application in response to predictable load changes
A

Auto Scaling components

  • Launch configuration: defines how Auto Scaling should launch your Amazon EC2 instances (similar to creating EC2 instances)
  • Auto Scaling group: uses a launch configuration to launch Amazon EC2 instances
  • Auto Scaling policy: uses a combination of policies and alarms to determine when the specified conditions for launching and terminating instances are met
  • Scheduled action: allows you to scale your application in response to predictable load changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does Auto Scaling work?

A

How does Auto Scaling work?

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

Auto Scaling Group

A

Auto Scaling Group

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

Auto Scaling Policies

A

Auto Scaling Policies

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

Elastic Load Balancing, CloudWatch, and Auto Scaling

A

Elastic Load Balancing, CloudWatch, and Auto Scaling

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

Auto Scaling Consideration

  • Avoid Auto Scaling thrashing
    • Be more cautious about scaling in ( = you are decreasing the computing capacity due to low utilization); avoid aggressive instance termination
    • Scale out early, scale in slowly
  • Set the min, max, and desired capacity parameter values carefully
    • Desired capacity determines how many instances will be running whenever there are no scaling policies being applied
  • You cannot modify a Launch Configuration. If you want to modify the LC for a running Auto Scaling Group, you need to create a new LC and then assign it to the ASG. New instances will use the new LC and previous instances will still be running.
  • Auto Scaling cannot span multiple regions
A

Auto Scaling Consideration

  • Avoid Auto Scaling thrashing
    • Be more cautious about scaling in ( = you are decreasing the computing capacity due to low utilization); avoid aggressive instance termination
    • Scale out early, scale in slowly
  • Set the min, max, and desired capacity parameter values carefully
    • Desired capacity determines how many instances will be running whenever there are no scaling policies being applied
  • You cannot modify a Launch Configuration. If you want to modify the LC for a running Auto Scaling Group, you need to create a new LC and then assign it to the ASG. New instances will use the new LC and previous instances will still be running.
  • Auto Scaling cannot span multiple regions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Auto Scaling - Loose Coupling

State information that contains information that is unique to the user (HTTP session information) is often used when generating dynamic content.

State sharing pattern lets you maintain state information in a scale-out structure. The state information is referenced by multiple servers. This makes the server “stateless”, having no state information.

Stateless Application: An application that needs no knowledge of previous interactions and stores no session information.

A

Auto Scaling - Loose Coupling

State information that contains information that is unique to the user (HTTP session information) is often used when generating dynamic content.

State sharing pattern lets you maintain state information in a scale-out structure. The state information is referenced by multiple servers. This makes the server “stateless”, having no state information.

Stateless Application: An application that needs no knowledge of previous interactions and stores no session information.

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

Auto Scaling Lifecycle Hooks

  1. Auto Scaling responds to scale out events by launching instances and scale in events by terminating instances.
  2. Auto Scaling puts the instance into a wait state (Pending:Wait or Terminating:Wait). The instance remains in this state until either you tell Auto Scaling to continue or the timeout period ends.
  3. You can perform a custom action using one or more of the following options:
  • Define a CloudWatch Events target to invoke a Lambda function when a lifecycle action occurs. The Lambda function is invoked when Auto Scaling submits an event for a lifecycle action to CloudWatch Events. The event contains information about the instance that is launching or terminating, and a token that you can use to control the lifecycle action.
  • Define a notification target for the lifecycle hook. Auto Scaling sends a message to the notification target. The message contains information about the instance that is launching or terminating, and a token that you can use to control the lifecycle action.
  • Create a script that runs on the instance as the instance starts. The script can control the lifecycle action using the ID of the instance on which it runs.
  1. By default, the instance remains in a wait state for one hour, and then Auto Scaling continues the launch or terminate process (Pending:Proceed or Terminating:Proceed). If you need more time, you can restart the timeout period by recording a heartbeat. If you finish before the timeout period ends, you can complete the lifecycle action, which continues the launch or termination process.
A

Auto Scaling Lifecycle Hooks

  1. Auto Scaling responds to scale out events by launching instances and scale in events by terminating instances.
  2. Auto Scaling puts the instance into a wait state (Pending:Wait or Terminating:Wait). The instance remains in this state until either you tell Auto Scaling to continue or the timeout period ends.
  3. You can perform a custom action using one or more of the following options:
  • Define a CloudWatch Events target to invoke a Lambda function when a lifecycle action occurs. The Lambda function is invoked when Auto Scaling submits an event for a lifecycle action to CloudWatch Events. The event contains information about the instance that is launching or terminating, and a token that you can use to control the lifecycle action.
  • Define a notification target for the lifecycle hook. Auto Scaling sends a message to the notification target. The message contains information about the instance that is launching or terminating, and a token that you can use to control the lifecycle action.
  • Create a script that runs on the instance as the instance starts. The script can control the lifecycle action using the ID of the instance on which it runs.
  1. By default, the instance remains in a wait state for one hour, and then Auto Scaling continues the launch or terminate process (Pending:Proceed or Terminating:Proceed). If you need more time, you can restart the timeout period by recording a heartbeat. If you finish before the timeout period ends, you can complete the lifecycle action, which continues the launch or termination process.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Auto Scaling Lifecycle Hooks

Auto Scaling lifecycle hooks enable you to perform custom actions as Auto Scaling launches or terminates instances. For example, you could install or configure software on newly launched instances, or download log files from an instance before it terminates.

Each Auto Scaling group can have multiple lifecycle hooks. However, there is a limit on the number of hooks per Auto Scaling group.

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