[aws black belt online seminar] · • aws auto scaling - aws auto scaling —
TRANSCRIPT
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Webinar
https://amzn.to/JPWebinar https://amzn.to/JPArchive2019-10-02
Amazon EC2 Auto Scaling & AWS Auto
Scaling
[AWS Black Belt Online Seminar]
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
( )
- EC2
EC2
AWS
• Amazon EC2 Auto Scaling
• AWS Auto Scaling
• AWS
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Black Belt Online Seminar
•
•
①吹き出しをクリック②質問を入力③ Sendをクリック
#awsblackbelt
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 2018 x x
AWS (http://aws.amazon.com)
• AWS
AWS
•
• AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to
change in accordance with the AWS Customer Agreement available at
http://aws.amazon.com/agreement/. Any pricing information included in this document is provided
only as an estimate of usage charges for AWS services based on certain information that you
have provided. Monthly charges will be based on your actual use of AWS services, and may vary
from the estimates provided.
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ビジネスの需要予測
Key:
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
従来型ハードウェア
Key:
大規模なシステム投資
ビジネスの需要予測
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
実際の需要
Key:
大規模なシステム投資
従来型ハードウェア
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
使わなかった部分
Key:
大規模なシステム投資
機会損失
実際の需要
従来型ハードウェア
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
実際の需要
実際のAWSリソース
Key:
Auto Scalingサービス群により実際の需要に合わせたオートスケールが可能
• 準備しすぎの無駄を極小化
• 機会損失を極小化
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• - (Desired Capacity, )
•
• -
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• - (Desired Capacity, )
•
• -
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
1.
2. (EC2 )
1) 2) 3)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
• 1
•
Auto Scaling group
: 4
Auto Scaling
Auto Scaling group
: 4
Auto Scaling
Auto Scaling group
: 4
Auto Scaling
Auto Scaling
1
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
• Auto Scaling
•
Auto Scaling group
: 2
Auto Scaling
Auto Scaling group
: 2→4
Auto Scaling
Auto Scaling group
: 4
Auto Scaling
Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
• Auto Scaling
•
Auto Scaling group
: 2
Auto Scaling
:
4
Auto Scaling group
: 2→4
Auto Scaling
Auto Scaling group
: 4
Auto Scaling
Auto Scaling
→
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• - (Desired Capacity, )
•
• -
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
EC2 Auto Scaling
Availability zone A Availability zone B
Auto Scaling group
Availability
zone A
Availability
zone B
Availability
zone C
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• - (Desired Capacity, )
•
• -
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
-
• Auto Scaling
•
Auto Scaling group
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
EC2 Auto Scaling
EC2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
EC2 Auto Scaling
EC2
Application
Auto ScalingECS
EMR AppStream 2.0
DynamoDB Aurora
SageMaker
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
AWS Auto Scaling
( + )
EC2 Auto Scaling
EC2
Application Auto Scaling
ECS
EMR AppStream 2.0
DynamoDB Aurora
SageMaker
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
AWS Auto Scaling
( + )
EC2 Auto Scaling
EC2
Application Auto Scaling
ECS
EMR AppStream 2.0
DynamoDB Aurora
SageMaker
EC2
(EC2 )
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
•
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
–
• EC2 Auto Scaling
• 1 1• : CPUUtilization 50% 1
• [1]• 1
•
[1] https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-scaling-simple-step.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
– (1)
• EC2 Auto Scaling, Application Auto Scaling
• 1
•
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-scaling-simple-step.html
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
– (2)
•
• (1)
(2)3 1
2
•
•
• 3001 : 50 <= CPUUtil < 60
2 : 60 <= CPUUtil < 70
3 : 70 <= CPUUtil < 80
(1) (2)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
– (1/3)
• EC2 Auto Scaling, Application Auto Scaling
• 1
• CPUUtilization 40%
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-scaling-target-tracking.html
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/application-auto-scaling-target-tracking.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
– (2/3)
•
• ( ) (
)
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
– (3/3)
• 2
• TargetTracking-xxx-AlarmLow-UUID
• TargetTracking-xxx-AlarmHigh-UUID
• High (3 ) Low (15 )
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(1/3)
• EC2 Auto Scaling (2019-10 )
• 2 2CPUUtilization, NetworkIn, NetworkOut,
https://docs.aws.amazon.com/ja_jp/autoscaling/plans/userguide/how-it-works.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(2/3)• 24 48
• 0•
• 5 (300 )• 10 9
55
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(3/3)
•
• AWS Auto Scaling
•
• ASG 24 24
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(1/2)
• EC2 Auto Scaling, Application Auto Scaling
•
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/schedule_time.html
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(2/2)
• MinCapacity( ) MaxCapacity( )
• MinCapacity →MinCapacity
• MaxCapacity →MaxCapacity
• (EC2 AS ) MinCapacity, MaxCapacity, DesiredCapacity(
)
MinCapacity
MaxCapacity
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(1/2)
EC2
1)
2)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
(2/2)
•
• EC2
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• EC2 Auto Scaling
• Application Auto Scaling
• AWS Auto Scaling –
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• EC2 Auto Scaling
• Application Auto Scaling
• AWS Auto Scaling –
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling –
• Auto Scaling
• ( : ) = (9:1)
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (1)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (2)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (3)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (4)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (5)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (6)
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (7)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (9)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (10)
• : 12
= 12
2
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (10)
• : 12
• : 2
= 12
= 2
2
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Auto Scaling Group (10)
• : 12
• : 2
• : 70:30
= 12
= 2 = 7 = 3
2
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
= 7 = 3
EC2 Auto Scaling Group (10)
• : 12
• : 2
• : 70:30
9
3
= 12
= 2
32+7 = 9
2
2
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• EC2 Auto Scaling
• Application Auto Scaling
• AWS Auto Scaling –
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Auto Scaling
(1)
→EC2
https://aws.amazon.com/jp/summits/tokyo-osaka-2019-report/
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Auto Scaling
(2)
• (maintain )
https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/spot-fleet-target-tracking.html• maintain
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Auto Scaling
(3)
“Auto Scaling” →
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Auto Scaling
(4)
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application Auto Scaling
• CLI(API, SDK)
•
• CLI(API, SDK)
API Application Auto Scaling API
• (CLI )
aws application-autoscaling register-scalable-target ¥
--service-namespace ¥
--resource-id ID ¥
…
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling
• EC2 Auto Scaling
• Application Auto Scaling
• AWS Auto Scaling –
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
- EC2 Auto Scaling
EC2 Auto Scaling
→
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(1)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(2)
EC2 Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(3)
Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(4)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(5)
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(6)
“Auto Scaling ”
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(7)
Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(8)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(9)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(10)
”Active”
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(11)
“Auto Scaling ” Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(12)
48
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(13)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(14)
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(15)
“Auto Scaling ”
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(16)
Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(17)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(18)
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Auto Scaling EC2 Auto Scaling
(19)
EC2 Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling) ( )
• →
• CloudWatch Metrics 1 5
• Auto Scaling
https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/using-cloudwatch-new.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/healthcheck.html
• EC2
• 2/2 Auto Scaling
• ELB ASG ELB
• EC2 ELB
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/healthcheck.html
•
• /index.html S3 DB
• ELB
• 5 (300 )
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-instance-termination.html
•
1.
2. ( )
3. ( )
4.
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection
• ASG
•
• (Terminate)
•
•
•
( )
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-suspend-resume-processes.html
•
• ASG
• Launch, Terminate, AddToLoadBalancer, AlarmNotification,
AZRebalance, HealthCheck, ReplaceUnhealthy, ScheduledActions
• Auto Scaling
• Launch Terminate Auto
Scaling
•
• →
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling) Auto Scaling
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/as-enter-exit-standby.html
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/detach-instance-asg.html
• ( )
•
• Auto Scaling
• ELB
Auto Scaling 1
•
•
•
• Auto Scaling
• Running
Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
/ Terminate
• →
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/lifecycle-hooks.html
•
• Auto Scaling
•
• CloudWatch Event Lambda
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling)
• → yum update yum install
AMI
( )
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• (EC2 Auto Scaling) Windows Red Hat Enterprise Linux
• 1
•
AMI +
• 2019 AMI AMI
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
• Auto Scaling
•
• Auto Scaling
• -
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Auto Scaling
•
•
•
•
• 2019
•
•
• Auto Scaling
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• - Amazon EC2 Auto Scaling | AWS — https://aws.amazon.com/jp/ec2/autoscaling/faqs/
• - AWS Auto Scaling | AWS — https://aws.amazon.com/jp/autoscaling/faqs/
• Amazon EC2 Auto Scaling - Amazon EC2 Auto Scaling ( ) —
https://docs.aws.amazon.com/ja_jp/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html
• Application Auto Scaling - Application Auto Scaling —
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/what-is-application-auto-scaling.html
• Application Auto Scaling
• - Application Auto Scaling —
https://docs.aws.amazon.com/ja_jp/autoscaling/application/userguide/what-is-application-auto-
scaling.html#getting-started
• AWS Auto Scaling - AWS Auto Scaling —
https://docs.aws.amazon.com/ja_jp/autoscaling/plans/userguide/what-is-aws-auto-scaling.html
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Q&A
AWS Japan Blog https://aws.amazon.com/jp/blogs/news/
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS AWS
https://amzn.to/JPArchive
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Well-Architected 個別技術相談会
•
•
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Webinar
https://amzn.to/JPWebinar https://amzn.to/JPArchive