SlideShare une entreprise Scribd logo
1  sur  48
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
S a v e u p t o 9 0 % a n d R u n P r o d u c t i o n W o r k l o a d s o n
S p o t
B o y d M c G e a c h i e , S e n i o r P r o d u c t M a n a g e r , E C 2 S p o t I n s t a n c e s
N o v e m b e r 2 9 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Fundamentals of Amazon EC2 Spot Instances
What Spot is and how it works
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
On-Demand
Pay for compute capacity by
the second or hour with no
long-term commitments
For spiky workloads,
or apps being developed or
tested on EC2 for the first
time
AWS EC2 consumption models
Reserved
Reserved Instances provide you
with a significant discount
compared to On-Demand
instance pricing
For applications that have steady
state or predictable usage,
Reserved Instances can provide
significant savings compared to
using On-Demand instances
Spot
Spot Instances allow you to
request spare Amazon EC2
computing capacity for up to 90%
off the On-Demand price
For fault-tolerant instance-flexible
or time-insensitive workloads
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spare capacity at scale
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer example—Clemson University
vCPU Distribution
c4.2xlarge c3.8xlarge c4.8xlarge i3.4xlarge
m4.4xlarge c4.4xlarge r4.4xlarge m4.2xlarge
m3.2xlarge r4.8xlarge m4.16xlarge x1.16xlarge-
200,000
400,000
600,000
800,000
1,000,000
1,200,000
Concurrent vCPU
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spare capacity at scale
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Low, Predictable Prices Eliminate the bid! No need to learn new APIs Pause & Resume with
Stop/Start & Hibernate
Spot – Predictable Prices, Pause & Resume
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
With Spot, the rules are simple [OLD]
Markets where the price of
compute changes based on
supply and demand.
You’ll never pay more than
your bid. When the market
exceeds your bid you get 2
minutes to wrap up your work.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
With Spot the rules are simple [NEW]
The price changes infrequently
based on supply and demand
of spare capacity
Just request capacity and pay
the current rate. When we
need the capacity back you’ll
get a 2 minute warning
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Capacity pools
AZ1
AZ2
Seoul Capacity Example
D2 C4 M4 I2 R3 R4
Shared
Shared
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
$0.37 $0.29$0.50
1b 1c1a
8XL
$0.40 $0.16$0.214XL
$0.13 $0.13$0.182XL
$0.05 $0.06$0.06XL
$0.01 $0.04$0.02L
R4
$2.128
On
Demand
$1.064
$0.532
$.266
$0.133
Each instance family
Each instance size
Each Availability Zone
In every region
Is a separate Spot pool
Show me the pools!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Instance flexible Time flexible Region flexible
Flexibility is crucial
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Flexibility is crucial—instance
• m4.xlarge capacity is different from m4.large. Use as many sizes as you can efficiently!
Instance Size
• If you’re using the c4.large, you can almost certainly use m4.large and r4.large. They
have the same number of vCPUs, just with some extra memory!
Instance Family
• Availability Zones consist of one or more discrete data centers. US-East-2a and US-
East-2b capacity is different! If your application can use multiple AZs, do it!
Availability Zone
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Flexibility is crucial—time
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
6 more regions and 17 more
Availability Zones announced!
44 Availability Zones
16 Regions
Flexibility is crucial—region
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Nature of a Spot application
Common application requirements to be successful in using Spot Instances
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. examples
• Experiments
• Development
• Testing
• One-time queries
• Model training
T i m e i n s e n s i t i v eT i m e s e n s i t i v e
Nature of Spot applicationsexamples
• Web services
• APIs
• Production big data
• Production grid computing
• Production sequencing
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive best practices
Fault tolerance
for Spot
Stateless Multi-AZ Loosely coupled
Instance
flexibility
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools
Instance
Sizes
Instance
Families
Availability
Zones
Capacity
Pools
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools how many?
3
Capacity
Pools
21
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—Spot Fleet
Launch thousands of Spot Instances
with one RequestSpotFleet call.
Diversify your resources automatically using
the fleet diversified strategy. Grow your availability.
Apply custom weighting.
Create your own capacity unit based on your
application needs.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—Spot Advisor
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer Examples—Yelp
• Seagull is Yelp’s distributed system for concurrent task execution
• Seagull’s infrastructure costs were reduced by 85% by moving to
Spot Instances
Seagull
Infrastructure
Cost
Timeline (May 2015–April 2016)
55% reduction in costs after initial transition
to Spot Instances
Additional 60% savings
after transition to Spot +
autoscaling complete
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SupportedOS
• Amazon
Linux
• Ubuntu
• Windows
Time insensitive – use hibernate!
Supportedinstances
• C3
• C4
• M4
• R3
• R4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer examples—Guttman Lab, Caltech
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tools and practical examples
The common tools leveraged by Spot customers and how they use them
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS
CloudFormation
AWS
OpsWorks
Amazon
EMR
Amazon
ECS
AWS Data
Pipeline
AWS BatchAuto Scaling
Spot in action on AWS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Containers
Often stateless
Fault tolerant
Instance flexible
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Container Service—Console
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Container Service—Console
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools
Instance
Sizes
Instance
Families
Availability
Zones
Capacity
Pools
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools
1 5 2 10
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic Container Service—CloudFormation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
#!/bin/bash
while sleep 5; do
if [ -z $(curl -Isf http://169.254.169.254/latest/meta-data/spot/termination-time) ];
then
/bin/false
else
ECS_CLUSTER=$(curl -s http://localhost:51678/v1/metadata | jq .Cluster | tr -d ")
CONTAINER_INSTANCE=$(curl -s http://localhost:51678/v1/metadata 
| jq .ContainerInstanceArn | tr -d ")
aws ecs update-container-instances-state --cluster $ECS_CLUSTER 
--container-instances $CONTAINER_INSTANCE --status DRAINING
fi
done
Elastic Container Service—interruptions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our ECS cluster in action
50 instances requested
over 30 days
- Never dropped
below 45 instances
- 85% discount if you
wanted 50 and
could withstand
dropping to 45
0
0.02
0.04
0.06
0.08
0.1
0.12
30
35
40
45
50
55
Instances Average Price Per Instance
- If you only wanted
45, the discount is
still 83%
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer examples—Mapbox
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer examples—Mapbox
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Big data
Capable of being accelerated
Fault tolerant
Instance flexible
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hadoop components
Master
TaskCore
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hadoop components
Master
TaskCore
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
T i m e f l e x i b l eI n s t a n c e f l e x i b l e
Hadoop—time sensitive or insensitive?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic MapReduce—time sensitive
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Elastic MapReduce—instance fleets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools
Instance
Sizes
Instance
Families
Availability
Zones
Capacity
Pools
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time sensitive—capacity pools
2 2 1 4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Requested 1000
vCPUs over 30 days
Minimum 848 vCPUs
Mode 1008 vCPUs
Average 1005 vCPUs
Average Price of
$0.0118 per vCPU
Savings of over 81%
Our EMR Instance Fleets cluster in action
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customer examples—FINRA
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

Contenu connexe

Tendances

Tendances (20)

MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and GluonMCL310_Building Deep Learning Applications with Apache MXNet and Gluon
MCL310_Building Deep Learning Applications with Apache MXNet and Gluon
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
 
CMP207_High Performance Computing on AWS
CMP207_High Performance Computing on AWSCMP207_High Performance Computing on AWS
CMP207_High Performance Computing on AWS
 
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWSGPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
GPSWKS407-Strategies for Migrating Microsoft SQL Databases to AWS
 
DAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the CloudDAT317_Migrating Databases and Data Warehouses to the Cloud
DAT317_Migrating Databases and Data Warehouses to the Cloud
 
Optimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWSOptimising Cost and Efficiency on AWS
Optimising Cost and Efficiency on AWS
 
MSC204_Leverage AWS Marketplace to accelerate production ready workloads
MSC204_Leverage AWS Marketplace to accelerate production ready workloadsMSC204_Leverage AWS Marketplace to accelerate production ready workloads
MSC204_Leverage AWS Marketplace to accelerate production ready workloads
 
How to Get the HPC Best-in-class Performance via Intel Xeon Skylake Processor...
How to Get the HPC Best-in-class Performance via Intel Xeon Skylake Processor...How to Get the HPC Best-in-class Performance via Intel Xeon Skylake Processor...
How to Get the HPC Best-in-class Performance via Intel Xeon Skylake Processor...
 
EUT302_Data Ingestion at Seismic Scale Best Practices for Processing Petabyte...
EUT302_Data Ingestion at Seismic Scale Best Practices for Processing Petabyte...EUT302_Data Ingestion at Seismic Scale Best Practices for Processing Petabyte...
EUT302_Data Ingestion at Seismic Scale Best Practices for Processing Petabyte...
 
GPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of ManufacturingGPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
GPSTEC326-GPS Industry 4.0 AI and the Future of Manufacturing
 
GPSWKS301_Comprehensive Big Data Architecture Made Easy
GPSWKS301_Comprehensive Big Data Architecture Made EasyGPSWKS301_Comprehensive Big Data Architecture Made Easy
GPSWKS301_Comprehensive Big Data Architecture Made Easy
 
Build your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholdersBuild your case for the cloud and engage your business stakeholders
Build your case for the cloud and engage your business stakeholders
 
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
GPSBUS220-Refactor and Replatform .NET Apps to Use the Latest Microsoft SQL S...
 
SRV332_Building Serverless Real-Time Data Processing (Now with Unicorns!).pdf
SRV332_Building Serverless Real-Time Data Processing (Now with Unicorns!).pdfSRV332_Building Serverless Real-Time Data Processing (Now with Unicorns!).pdf
SRV332_Building Serverless Real-Time Data Processing (Now with Unicorns!).pdf
 
Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)
 
GPSTEC315_GPS Optimizing Tips Amazon Redshift for Cloud Data
GPSTEC315_GPS Optimizing Tips Amazon Redshift for Cloud DataGPSTEC315_GPS Optimizing Tips Amazon Redshift for Cloud Data
GPSTEC315_GPS Optimizing Tips Amazon Redshift for Cloud Data
 
ARC329_Optimizing Performance and Efficiency for Amazon EC2 and More with Tur...
ARC329_Optimizing Performance and Efficiency for Amazon EC2 and More with Tur...ARC329_Optimizing Performance and Efficiency for Amazon EC2 and More with Tur...
ARC329_Optimizing Performance and Efficiency for Amazon EC2 and More with Tur...
 
GPSTEC317-From Leaves to Lawns AWS Greengrass at the Edge and Beyond
GPSTEC317-From Leaves to Lawns AWS Greengrass at the Edge and BeyondGPSTEC317-From Leaves to Lawns AWS Greengrass at the Edge and Beyond
GPSTEC317-From Leaves to Lawns AWS Greengrass at the Edge and Beyond
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
Run Your HPC Workload at Scale for a Fraction of the Cost - AWS Online Tech T...
Run Your HPC Workload at Scale for a Fraction of the Cost - AWS Online Tech T...Run Your HPC Workload at Scale for a Fraction of the Cost - AWS Online Tech T...
Run Your HPC Workload at Scale for a Fraction of the Cost - AWS Online Tech T...
 

Similaire à Save up to 90% and Run Production Workloads on Spot - CMP307 - re:Invent 2017

Similaire à Save up to 90% and Run Production Workloads on Spot - CMP307 - re:Invent 2017 (20)

透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本透過Spot instances, Containers & Serverless降低成本
透過Spot instances, Containers & Serverless降低成本
 
Webinar | How TLG Aerospace Saved 75% with Amazon EC2 Spot Instances
Webinar | How TLG Aerospace Saved 75% with  Amazon EC2 Spot InstancesWebinar | How TLG Aerospace Saved 75% with  Amazon EC2 Spot Instances
Webinar | How TLG Aerospace Saved 75% with Amazon EC2 Spot Instances
 
AWS reInvent 2017 recap - Optimizing Costs as You Scale on AWS
AWS reInvent 2017 recap - Optimizing Costs as You Scale on AWSAWS reInvent 2017 recap - Optimizing Costs as You Scale on AWS
AWS reInvent 2017 recap - Optimizing Costs as You Scale on AWS
 
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot FleetCMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
CMP316_Hedge Your Own Funds Run Monte Carlo Simulations on EC2 Spot Fleet
 
Run Your CI/CD Pipeline at Scale for a Fraction of the Cost - AWS Online Tech...
Run Your CI/CD Pipeline at Scale for a Fraction of the Cost - AWS Online Tech...Run Your CI/CD Pipeline at Scale for a Fraction of the Cost - AWS Online Tech...
Run Your CI/CD Pipeline at Scale for a Fraction of the Cost - AWS Online Tech...
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
 
AWS Learning Webinar Spot Instances Benefits & Best Practices Explained
AWS Learning Webinar Spot Instances Benefits & Best Practices ExplainedAWS Learning Webinar Spot Instances Benefits & Best Practices Explained
AWS Learning Webinar Spot Instances Benefits & Best Practices Explained
 
AWS Cost Optimisation Best Practices Webinar
AWS Cost Optimisation Best Practices WebinarAWS Cost Optimisation Best Practices Webinar
AWS Cost Optimisation Best Practices Webinar
 
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud EconomicsReducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
 
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud EconomicsReducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
 
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud EconomicsReducing the Total Cost of IT Infrastructure with AWS Cloud Economics
Reducing the Total Cost of IT Infrastructure with AWS Cloud Economics
 
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
Best practices for optimizing your EC2 costs with Spot Instances | AWS Floor28
 
Introducing the New Simplified Access Model for EC2 Spot Instances - AWS Onli...
Introducing the New Simplified Access Model for EC2 Spot Instances - AWS Onli...Introducing the New Simplified Access Model for EC2 Spot Instances - AWS Onli...
Introducing the New Simplified Access Model for EC2 Spot Instances - AWS Onli...
 
Optimize Amazon EC2 for Fun and Profit - SRV203 - Chicago AWS Summit
Optimize Amazon EC2 for Fun and Profit - SRV203 - Chicago AWS SummitOptimize Amazon EC2 for Fun and Profit - SRV203 - Chicago AWS Summit
Optimize Amazon EC2 for Fun and Profit - SRV203 - Chicago AWS Summit
 
Cost Optimisation Solutions on AWS
Cost Optimisation Solutions on AWS Cost Optimisation Solutions on AWS
Cost Optimisation Solutions on AWS
 
SRV203 Optimizing Amazon EC2 for Fun and Profit
 SRV203 Optimizing Amazon EC2 for Fun and Profit SRV203 Optimizing Amazon EC2 for Fun and Profit
SRV203 Optimizing Amazon EC2 for Fun and Profit
 
Optimize EC2 for Fun and Profit - SRV203 - Anaheim AWS Summit
Optimize EC2 for Fun and Profit - SRV203 - Anaheim AWS SummitOptimize EC2 for Fun and Profit - SRV203 - Anaheim AWS Summit
Optimize EC2 for Fun and Profit - SRV203 - Anaheim AWS Summit
 
AWS Cost Optimisation Solutions
AWS Cost Optimisation SolutionsAWS Cost Optimisation Solutions
AWS Cost Optimisation Solutions
 
How Hess Has Continued to Optimize the AWS Cloud After Migrating - ENT218 - r...
How Hess Has Continued to Optimize the AWS Cloud After Migrating - ENT218 - r...How Hess Has Continued to Optimize the AWS Cloud After Migrating - ENT218 - r...
How Hess Has Continued to Optimize the AWS Cloud After Migrating - ENT218 - r...
 
Optimizar los costos a medida que mejora en AWS - MXO207 - Mexico City Summit
Optimizar los costos a medida que mejora en AWS - MXO207 - Mexico City SummitOptimizar los costos a medida que mejora en AWS - MXO207 - Mexico City Summit
Optimizar los costos a medida que mejora en AWS - MXO207 - Mexico City Summit
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Save up to 90% and Run Production Workloads on Spot - CMP307 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT S a v e u p t o 9 0 % a n d R u n P r o d u c t i o n W o r k l o a d s o n S p o t B o y d M c G e a c h i e , S e n i o r P r o d u c t M a n a g e r , E C 2 S p o t I n s t a n c e s N o v e m b e r 2 9 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Fundamentals of Amazon EC2 Spot Instances What Spot is and how it works
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. On-Demand Pay for compute capacity by the second or hour with no long-term commitments For spiky workloads, or apps being developed or tested on EC2 for the first time AWS EC2 consumption models Reserved Reserved Instances provide you with a significant discount compared to On-Demand instance pricing For applications that have steady state or predictable usage, Reserved Instances can provide significant savings compared to using On-Demand instances Spot Spot Instances allow you to request spare Amazon EC2 computing capacity for up to 90% off the On-Demand price For fault-tolerant instance-flexible or time-insensitive workloads
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spare capacity at scale
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer example—Clemson University vCPU Distribution c4.2xlarge c3.8xlarge c4.8xlarge i3.4xlarge m4.4xlarge c4.4xlarge r4.4xlarge m4.2xlarge m3.2xlarge r4.8xlarge m4.16xlarge x1.16xlarge- 200,000 400,000 600,000 800,000 1,000,000 1,200,000 Concurrent vCPU
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spare capacity at scale
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Low, Predictable Prices Eliminate the bid! No need to learn new APIs Pause & Resume with Stop/Start & Hibernate Spot – Predictable Prices, Pause & Resume
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. With Spot, the rules are simple [OLD] Markets where the price of compute changes based on supply and demand. You’ll never pay more than your bid. When the market exceeds your bid you get 2 minutes to wrap up your work.
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. With Spot the rules are simple [NEW] The price changes infrequently based on supply and demand of spare capacity Just request capacity and pay the current rate. When we need the capacity back you’ll get a 2 minute warning
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Capacity pools AZ1 AZ2 Seoul Capacity Example D2 C4 M4 I2 R3 R4 Shared Shared
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. $0.37 $0.29$0.50 1b 1c1a 8XL $0.40 $0.16$0.214XL $0.13 $0.13$0.182XL $0.05 $0.06$0.06XL $0.01 $0.04$0.02L R4 $2.128 On Demand $1.064 $0.532 $.266 $0.133 Each instance family Each instance size Each Availability Zone In every region Is a separate Spot pool Show me the pools!
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Instance flexible Time flexible Region flexible Flexibility is crucial
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Flexibility is crucial—instance • m4.xlarge capacity is different from m4.large. Use as many sizes as you can efficiently! Instance Size • If you’re using the c4.large, you can almost certainly use m4.large and r4.large. They have the same number of vCPUs, just with some extra memory! Instance Family • Availability Zones consist of one or more discrete data centers. US-East-2a and US- East-2b capacity is different! If your application can use multiple AZs, do it! Availability Zone
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Flexibility is crucial—time
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 6 more regions and 17 more Availability Zones announced! 44 Availability Zones 16 Regions Flexibility is crucial—region
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Nature of a Spot application Common application requirements to be successful in using Spot Instances
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. examples • Experiments • Development • Testing • One-time queries • Model training T i m e i n s e n s i t i v eT i m e s e n s i t i v e Nature of Spot applicationsexamples • Web services • APIs • Production big data • Production grid computing • Production sequencing
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive best practices Fault tolerance for Spot Stateless Multi-AZ Loosely coupled Instance flexibility
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools Instance Sizes Instance Families Availability Zones Capacity Pools
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools how many? 3 Capacity Pools 21
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—Spot Fleet Launch thousands of Spot Instances with one RequestSpotFleet call. Diversify your resources automatically using the fleet diversified strategy. Grow your availability. Apply custom weighting. Create your own capacity unit based on your application needs.
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—Spot Advisor
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer Examples—Yelp • Seagull is Yelp’s distributed system for concurrent task execution • Seagull’s infrastructure costs were reduced by 85% by moving to Spot Instances Seagull Infrastructure Cost Timeline (May 2015–April 2016) 55% reduction in costs after initial transition to Spot Instances Additional 60% savings after transition to Spot + autoscaling complete
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SupportedOS • Amazon Linux • Ubuntu • Windows Time insensitive – use hibernate! Supportedinstances • C3 • C4 • M4 • R3 • R4
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer examples—Guttman Lab, Caltech
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Tools and practical examples The common tools leveraged by Spot customers and how they use them
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CloudFormation AWS OpsWorks Amazon EMR Amazon ECS AWS Data Pipeline AWS BatchAuto Scaling Spot in action on AWS
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Containers Often stateless Fault tolerant Instance flexible
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Container Service—Console
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Container Service—Console
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools Instance Sizes Instance Families Availability Zones Capacity Pools
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools 1 5 2 10
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic Container Service—CloudFormation
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. #!/bin/bash while sleep 5; do if [ -z $(curl -Isf http://169.254.169.254/latest/meta-data/spot/termination-time) ]; then /bin/false else ECS_CLUSTER=$(curl -s http://localhost:51678/v1/metadata | jq .Cluster | tr -d ") CONTAINER_INSTANCE=$(curl -s http://localhost:51678/v1/metadata | jq .ContainerInstanceArn | tr -d ") aws ecs update-container-instances-state --cluster $ECS_CLUSTER --container-instances $CONTAINER_INSTANCE --status DRAINING fi done Elastic Container Service—interruptions
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our ECS cluster in action 50 instances requested over 30 days - Never dropped below 45 instances - 85% discount if you wanted 50 and could withstand dropping to 45 0 0.02 0.04 0.06 0.08 0.1 0.12 30 35 40 45 50 55 Instances Average Price Per Instance - If you only wanted 45, the discount is still 83%
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer examples—Mapbox
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer examples—Mapbox
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Big data Capable of being accelerated Fault tolerant Instance flexible
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hadoop components Master TaskCore
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hadoop components Master TaskCore
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. T i m e f l e x i b l eI n s t a n c e f l e x i b l e Hadoop—time sensitive or insensitive?
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic MapReduce—time sensitive
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Elastic MapReduce—instance fleets
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools Instance Sizes Instance Families Availability Zones Capacity Pools
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time sensitive—capacity pools 2 2 1 4
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Requested 1000 vCPUs over 30 days Minimum 848 vCPUs Mode 1008 vCPUs Average 1005 vCPUs Average Price of $0.0118 per vCPU Savings of over 81% Our EMR Instance Fleets cluster in action
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customer examples—FINRA
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!