© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Live coding with containers
4 6
Cobus Bernard
Sr Developer Advocate
AWS
@cobusbernard
cobusbernard
cobusbernard
Amazon EC2 Spot Instance pools explained
$0.27 $0.29$0.50
1b 1c1a
8XL
$0.30 $0.16$0.214XL
$0.07 $0.08$0.082XL
$0.05 $0.04$0.04XL
$0.01 $0.04$0.01L
C4
$1.76
On
demand
$0.88
$0.44
$0.22
$0.11
Each instance family
Each instance size
Each availability zone
In every Region
Is a separate Spot pool
R5
M4
M5
I3 C5R4
i3en R5a
R5d
ASG capacity-optimized allocation strategy
us-east-1a
Desired capacity: 12
SpotAllocationStrategy: capacity-optimized
OnDemandBaseCapacity: 0 OnDemandPercentageAboveCapacity: 0
r5.large
m4.large
m5.large
R5 R5
R5 R5
us-east-1b us-east-1c
Overrides: [“r5.large”, “m4.large”, ”m5.large”]
$$
$
$$$
r5.large
m4.large
m5.large
$$$
$$
$
r5.large
m4.large
m5.large
$
$$$
$$
ASG lowest-price allocation strategy
us-east-1a
Desired capacity: 12
SpotAllocationStrategy: lowest-price
OnDemandBaseCapacity: 0 OnDemandPercentageAboveCapacity: 0
r5.large
m4.large
m5.large
R5 R5
R5 R5
us-east-1b us-east-1c
Overrides: [“r5.large”, “m4.large”, ”m5.large”]
$$
$
$$$
r5.large
m4.large
m5.large
$$$
$$
$
r5.large
m4.large
m5.large
$
$$$
$$
m4.xlarge Spot
Weight of 1
m4.2xlarge Spot
Weight of 2
m4.4xlarge On-Demand
Weight of 4
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
Different
instance types
contribute
differently to
total capacity
Now: Spot, On-Demand, and RIs in a single ASG with weights
Amazon EC2 Spot Instance pools explained
$0.27 $0.29$0.50
1b 1c1a
8XL
$0.30 $0.16$0.214XL
$0.07 $0.08$0.082XL
$0.05 $0.04$0.04XL
$0.01 $0.04$0.01L
C4
$1.76
On
demand
$0.88
$0.44
$0.22
$0.11
16
Weight
8
4
2
1
$0.11
Weighted
price
$0.11
$0.11
$0.11
$0.11
$0.017 $0.018$0.032
1b 1c1a
$0.038 $0.02$0.032
$0.016 $0.02$0.021
$0.025 $0.04$0.02
$0.01 $0.04$0.01
Thank you!
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cobus Bernard
Sr Developer Advocate
Amazon Web Services
@cobusbernard
cobusbernard
cobusbernard

AWS EMEA Online Summit - Live coding with containers

  • 2.
    © 2020, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Live coding with containers 4 6 Cobus Bernard Sr Developer Advocate AWS @cobusbernard cobusbernard cobusbernard
  • 4.
    Amazon EC2 SpotInstance pools explained $0.27 $0.29$0.50 1b 1c1a 8XL $0.30 $0.16$0.214XL $0.07 $0.08$0.082XL $0.05 $0.04$0.04XL $0.01 $0.04$0.01L C4 $1.76 On demand $0.88 $0.44 $0.22 $0.11 Each instance family Each instance size Each availability zone In every Region Is a separate Spot pool R5 M4 M5 I3 C5R4 i3en R5a R5d
  • 5.
    ASG capacity-optimized allocationstrategy us-east-1a Desired capacity: 12 SpotAllocationStrategy: capacity-optimized OnDemandBaseCapacity: 0 OnDemandPercentageAboveCapacity: 0 r5.large m4.large m5.large R5 R5 R5 R5 us-east-1b us-east-1c Overrides: [“r5.large”, “m4.large”, ”m5.large”] $$ $ $$$ r5.large m4.large m5.large $$$ $$ $ r5.large m4.large m5.large $ $$$ $$
  • 6.
    ASG lowest-price allocationstrategy us-east-1a Desired capacity: 12 SpotAllocationStrategy: lowest-price OnDemandBaseCapacity: 0 OnDemandPercentageAboveCapacity: 0 r5.large m4.large m5.large R5 R5 R5 R5 us-east-1b us-east-1c Overrides: [“r5.large”, “m4.large”, ”m5.large”] $$ $ $$$ r5.large m4.large m5.large $$$ $$ $ r5.large m4.large m5.large $ $$$ $$
  • 7.
    m4.xlarge Spot Weight of1 m4.2xlarge Spot Weight of 2 m4.4xlarge On-Demand Weight of 4 Availability Zone 1 Availability Zone 2 Availability Zone 3 Different instance types contribute differently to total capacity Now: Spot, On-Demand, and RIs in a single ASG with weights
  • 8.
    Amazon EC2 SpotInstance pools explained $0.27 $0.29$0.50 1b 1c1a 8XL $0.30 $0.16$0.214XL $0.07 $0.08$0.082XL $0.05 $0.04$0.04XL $0.01 $0.04$0.01L C4 $1.76 On demand $0.88 $0.44 $0.22 $0.11 16 Weight 8 4 2 1 $0.11 Weighted price $0.11 $0.11 $0.11 $0.11 $0.017 $0.018$0.032 1b 1c1a $0.038 $0.02$0.032 $0.016 $0.02$0.021 $0.025 $0.04$0.02 $0.01 $0.04$0.01
  • 9.
    Thank you! © 2020,Amazon Web Services, Inc. or its affiliates. All rights reserved. Cobus Bernard Sr Developer Advocate Amazon Web Services @cobusbernard cobusbernard cobusbernard

Editor's Notes

  • #6 This time, we have the exact same ASG represented, but using the capacity-optimized SpotAllocationStrategy. In this case we don’t have SpotInstancePools as that parameter is specific to lowest-Price. And if we look at the instances, ASG will launch instances on the deepest pools on each AZ, which may not always be the cheapest, but are from the deepest pools at instance launch time and reduce the likelihood of interruptions
  • #8 Introducing instance type weights Configure weight to scale in and out based on previous gen instances or vCPUs across multiple AZs Distribute Capacity evenly between availability zones for On-Demand and Spot separately