SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Markus Ostertag, Head of Development, Team Internet AG, @osterjour
Constantin Gonzalez, Principal Solutions Architect, AWS, @zalez
November 30, 2016
Running Lean Architectures
How to Optimize for Cost Efficiency
ARC313
What you’ll get out of this session
• Best practices on how to lower your AWS bill
• A more scalable, robust, dynamic architecture
• More time to innovate
• Real-world customer examples
• Easy to implement
Structure
Business
Architecture
Operations
Business Goals
“Pay as little as possible
for what we use.”
AWS pricing philosophy
Ecosystem
Global Footprint
New Features
New Services
More AWS
Usage
More
Infrastructure
Lower
Infrastructure
Costs
Reduced
Prices
More
CustomersInfrastructure
Innovation
57 price reductions
since 2006
Economies
of Scale
AWS TCO calculator
AWS simple monthly calculator
AWS billing alerts
AWS billing console
AWS Trusted Advisor
aws.amazon.com/premiumsupport/trustedadvisor/
Free with Business or Enterprise Support
Free Trusted Advisor Trial!
• Free trial begins on 12/6/16
• Runs for 30 days
• Full suite of checks and best practice
recommendations available
• For customers not already on
business/enterprise support plans
• No action required:
Just log in and start using!
https://console.aws.amazon.com/trustedadvisor
Reserved Instances
Reserved Instances basics
1y RI
Break even
3y RI
Break even
Markus Ostertag
Head of Development @ Team Internet
Who is Team Internet?
Domain monetization business
30 people
HQ in Munich, Germany
Tech focused
Reserved Instances
Reserved Instances – our usage
Use the regional benefit
Change existing Reserved Instances to scope “Region”
Capacity reservation decoupled from cost optimization
Convertible Reserved Instances
Use case: “(Very) Long running, but flexible”
Architecture Goals
“Avoid waste as much
as possible.”
Turn off unused instances
• Developer, test, training instances
• Use simple instance start and stop
• Or tear down and build up all together
using AWS CloudFormation
• Instances are disposable!
Customer example
Monday Friday End of Vacation Season
35% saved
Automate, automate, automate
• AWS SDKs
• AWS CLI
• AWS CloudFormation
• AWS OpsWorks
• Netflix Janitor Monkey
• Cloudlytics EC2 Scheduler
• Auto Scaling
How Auto Scaling works
AWS CloudFormation example launch configuration
"LaunchConfig": {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Metadata" : {
"AWS::CloudFormation::Init" : {
"config" : {
… packages, sources, files, services …
}
}
},
"Properties": {
"ImageId" : "ami-149f7863",
"InstanceType" : "m1.small",
"SecurityGroups" : [ {"Ref" : "WebServerSecurityGroup"} ],
"KeyName" : "MySSHKey",
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash -vn",
… your user data script …
]]}}
}
}
AWS CloudFormation example
Auto Scaling group definition
"WebServerGroup" : {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties" : {
"AvailabilityZones" : [
"us-east-1a",
"us-east-1b",
"us-east-1c",
],
"LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
"MinSize" : “3",
"MaxSize" : “6",
"DesiredCapacity" : “3",
"LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ]
}
}
Align resources with demand
Use Spot Instances
• Price based on supply/demand
• You choose your maximum price/hour
• Your instance is started if the Spot price is lower
• Your instance is terminated if
the Spot price is higher, with 2 minutes notice
• But: You did plan for fault tolerance, didn’t you?
Spot Instance example
On-Demand:
$0.24
$0.028 (11.7%) $0.026 (10,8%)
$3.28
(1367%)
Spot Instance use cases
• Stateless Web/App server fleets
• Amazon EMR
• Continuous Integration (CI)
• High Performance Computing (HPC)
• Grid Computing
• Media Rendering/Transcoding
aws.amazon.com/ec2/spot
Spot Bid Advisor
Spot Instances recap
• Very dynamic pricing
• Opportunity to save 80-90% cost
• But there are risks
• Different prices per AZ
• Leverage Auto Scaling!
• One group with Spot Instances
• One group with On-Demand
• Get the best of both worlds
• Spot fleets – Manage thousands of
Spot Instances with one API call
“But my applications are
too small
for Auto Scaling!”
Amazon EC2 Container Service
• Easily manage Docker containers
• Flexible container placement
• Designed for use with other AWS services
• Extensible
• Performance at Scale
• Secure
10%
15%
7%
12%
20%
9%
Consolidate with Amazon ECS
App 1 App 2
App 3 App 4
App 5 App 6
6
12 34
5
Amazon ECS
cluster
AWS Lambda
Amazon S3 bucket events AWS Lambda
Original object Compressed object
1
2
3
Get rid of idle time with AWS Lambda
• Automatic scaling
• Automatic provisioning
• No need to manage infrastructure
• Just bring your code
• $0.20 per million requests, 1M free
• 100 ms payment granularity
• Never pay for idle
Less than 40% utilization?
Consider using AWS Lambda instead!
Optimizing database utilization
Database optimization through caching
DynamoDB Amazon RDS DynamoDB Amazon RDS
ElastiCache
Caching saves money
DynamoDB reads
Saved 3k reads per second (>20k reads per second in total)
Cache really everything!
Cache hit ratio 25-30% Cache hit ratio 89-95%
Without negative caching With negative caching
Hit
Miss
Cache invalidation
“There are only two hard things in Computer Science:
cache invalidation and naming things” -- Phil Karlton
Two ways to cache:
Time to Live (TTL) with invalidation
Keep the cache in sync all the time
Synchronous writes
Sync/check in the app with after-write return values
DynamoDB
ElastiCache
write/update always
write/update always
Uncoupled writes/invalidation
Sync/updates via Lambda (uncoupled)
DynamoDB
ElastiCache
write/update always
no update
Lambda
DynamoDB
Stream
update
Think of strategies for optimizing CU use
• Use multiple tables to support varied access patterns
• Understand access patterns for time series data
• Compress large attribute values
Consider read (4K) vs. write (1K) sizes
Use Amazon SQS to buffer over-capacity writes
Resize capacity units dynamically
Amazon SQS can buffer requests
Dynamic DynamoDB
Offload popular traffic to
Amazon S3 and/or Amazon CloudFront
Operational Goals
“Focus on what you do best,
let AWS do the rest.”
Leverage existing services
• Use Amazon RDS, DynamoDB,
ElastiCache for Redis or
Amazon Redshift
• Instead of running your own database
• Amazon Elasticsearch Service
• Instead of running your own cluster
• Amazon SQS
• Amazon Kinesis,
Amazon Kinesis Firehose, Amazon SNS, and more …
AWS has experts for each service
RDS
Amazon Redshift
Amazon
Elasticsearch
Service
Amazon Kinesis
SQS
DynamoDB
Pick the right tool for the job
Key/Value
Scalable
throughput
Low latency
Amazon Aurora
More complex
data/queries
Scalable
storage
Amazon
Redshift
Big (complex)
data
Higher
latency
ElastiCache
for Redis
Key/Value
In-Memory
(Very) low
latency
There is not one database to rule them all
MongoDB
Tracking
API
RTB
Engine
User&Stats
API
Tracking
API
RTB
Engine
DynamoDB
Decoupled
Amazon
Aurora
Amazon
Redshift
User&Stats
API
Advantages
• No undifferentiated heavy lifting
(= cost savings)
• AWS operates the DB
infrastructure for us
• Simple and more granular scale out
• No interference between
RTB/Tracking and User/Stats
Let’s recap
1. Use AWS TCO/cost/billing tools
2. Use Reserved Instances
3. Avoid idle instances through automation
4. Use Spot Instances
5. Optimize database utilization
6. Pick the right tool for the job
7. Offload your architecture
But wait! There’s even more!
https://youtu.be/SG1DsYgeGEk
AWS re:Invent 2015
ARC302 Running Lean Architectures: Optimizing for Cost Efficiency
• DynamoDB GSI Tweaking
• Using CloudFront to avoid
multi-region setups
• Amazon S3 storage tiering
• … and much more!
Thank you!
Remember to complete
your evaluations!

Más contenido relacionado

La actualidad más candente

찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
Amazon Web Services Korea
 

La actualidad más candente (20)

(ARC305) How J&J Manages AWS At Scale For Enterprise Workloads
(ARC305) How J&J Manages AWS At Scale For Enterprise Workloads(ARC305) How J&J Manages AWS At Scale For Enterprise Workloads
(ARC305) How J&J Manages AWS At Scale For Enterprise Workloads
 
AWS re:Invent 2016: Best Practices for Data Warehousing with Amazon Redshift ...
AWS re:Invent 2016: Best Practices for Data Warehousing with Amazon Redshift ...AWS re:Invent 2016: Best Practices for Data Warehousing with Amazon Redshift ...
AWS re:Invent 2016: Best Practices for Data Warehousing with Amazon Redshift ...
 
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
 
Building Your First Big Data Application on AWS
Building Your First Big Data Application on AWSBuilding Your First Big Data Application on AWS
Building Your First Big Data Application on AWS
 
찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
찾아가는 AWS 세미나(구로,가산,판교) - AWS 기반 빅데이터 활용 방법 (김일호 솔루션즈 아키텍트)
 
WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
WKS407 Wild Rydes Takes Off – The Dawn of a New UnicornWKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
WKS407 Wild Rydes Takes Off – The Dawn of a New Unicorn
 
Building and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECSBuilding and scaling your containerized microservices on Amazon ECS
Building and scaling your containerized microservices on Amazon ECS
 
Migrate from Oracle to Amazon Aurora using AWS Schema Conversion Tool & AWS D...
Migrate from Oracle to Amazon Aurora using AWS Schema Conversion Tool & AWS D...Migrate from Oracle to Amazon Aurora using AWS Schema Conversion Tool & AWS D...
Migrate from Oracle to Amazon Aurora using AWS Schema Conversion Tool & AWS D...
 
Automated Compliance and Governance with AWS Config and AWS CloudTrail - June...
Automated Compliance and Governance with AWS Config and AWS CloudTrail - June...Automated Compliance and Governance with AWS Config and AWS CloudTrail - June...
Automated Compliance and Governance with AWS Config and AWS CloudTrail - June...
 
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
AWS re:Invent 2016: Big Data Architectural Patterns and Best Practices on AWS...
 
Towards Full Stack Security
Towards Full Stack Security Towards Full Stack Security
Towards Full Stack Security
 
AWS re:Invent 2016: Achieving Agility by Following Well-Architected Framework...
AWS re:Invent 2016: Achieving Agility by Following Well-Architected Framework...AWS re:Invent 2016: Achieving Agility by Following Well-Architected Framework...
AWS re:Invent 2016: Achieving Agility by Following Well-Architected Framework...
 
AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
 
AWS re:Invent 2016: Real-time Data Processing Using AWS Lambda (SVR301)
AWS re:Invent 2016: Real-time Data Processing Using AWS Lambda (SVR301)AWS re:Invent 2016: Real-time Data Processing Using AWS Lambda (SVR301)
AWS re:Invent 2016: Real-time Data Processing Using AWS Lambda (SVR301)
 
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
 
Getting Started with Amazon Kinesis
Getting Started with Amazon KinesisGetting Started with Amazon Kinesis
Getting Started with Amazon Kinesis
 
AWS re:Invent 2016: Dollars and Sense: Technical Tips for Continual Cost Opti...
AWS re:Invent 2016: Dollars and Sense: Technical Tips for Continual Cost Opti...AWS re:Invent 2016: Dollars and Sense: Technical Tips for Continual Cost Opti...
AWS re:Invent 2016: Dollars and Sense: Technical Tips for Continual Cost Opti...
 
ENT202 Creating Your Virtual Data Center: VPC Fundamentals and Connectivity O...
ENT202 Creating Your Virtual Data Center: VPC Fundamentals and Connectivity O...ENT202 Creating Your Virtual Data Center: VPC Fundamentals and Connectivity O...
ENT202 Creating Your Virtual Data Center: VPC Fundamentals and Connectivity O...
 
Data Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveData Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and Archive
 
AWS re:Invent 2016: Workshop: Migrating Microsoft Applications to AWS (ENT216)
AWS re:Invent 2016: Workshop: Migrating Microsoft Applications to AWS (ENT216)AWS re:Invent 2016: Workshop: Migrating Microsoft Applications to AWS (ENT216)
AWS re:Invent 2016: Workshop: Migrating Microsoft Applications to AWS (ENT216)
 

Destacado

Destacado (20)

AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
AWS re:Invent 2016: Serverless Architectural Patterns and Best Practices (ARC...
 
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
(BAC404) Deploying High Availability and Disaster Recovery Architectures with...
 
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
AWS re:Invent 2016: Enabling Enterprise Migrations: Creating an AWS Landing Z...
 
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
AWS re:Invent 2016: Elastic Load Balancing Deep Dive and Best Practices (NET403)
 
AWS re:Invent 2016: Getting Started with the Hybrid Cloud: Enterprise Backup ...
AWS re:Invent 2016: Getting Started with the Hybrid Cloud: Enterprise Backup ...AWS re:Invent 2016: Getting Started with the Hybrid Cloud: Enterprise Backup ...
AWS re:Invent 2016: Getting Started with the Hybrid Cloud: Enterprise Backup ...
 
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
 
(STG311) AWS Storage Gateway: Secure, Cost-Effective Backup & Archive
(STG311) AWS Storage Gateway: Secure, Cost-Effective Backup & Archive(STG311) AWS Storage Gateway: Secure, Cost-Effective Backup & Archive
(STG311) AWS Storage Gateway: Secure, Cost-Effective Backup & Archive
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
(ISM402) Cost Optimization at Scale
(ISM402) Cost Optimization at Scale(ISM402) Cost Optimization at Scale
(ISM402) Cost Optimization at Scale
 
Amazon Route 53 - Webinar Presentation 9.16.2015
Amazon Route 53 - Webinar Presentation 9.16.2015Amazon Route 53 - Webinar Presentation 9.16.2015
Amazon Route 53 - Webinar Presentation 9.16.2015
 
AWS re:Invent 2016: Store and collaborate on content securely with Amazon Wor...
AWS re:Invent 2016: Store and collaborate on content securely with Amazon Wor...AWS re:Invent 2016: Store and collaborate on content securely with Amazon Wor...
AWS re:Invent 2016: Store and collaborate on content securely with Amazon Wor...
 
(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices(DVO304) AWS CloudFormation Best Practices
(DVO304) AWS CloudFormation Best Practices
 
AWS re:Invent 2016: Saving at Scale with Reserved Instances (ENT307)
AWS re:Invent 2016: Saving at Scale with Reserved Instances (ENT307)AWS re:Invent 2016: Saving at Scale with Reserved Instances (ENT307)
AWS re:Invent 2016: Saving at Scale with Reserved Instances (ENT307)
 
AWS re:Invent 2016: Enterprise IT as a Service: Empowering the Digital Experi...
AWS re:Invent 2016: Enterprise IT as a Service: Empowering the Digital Experi...AWS re:Invent 2016: Enterprise IT as a Service: Empowering the Digital Experi...
AWS re:Invent 2016: Enterprise IT as a Service: Empowering the Digital Experi...
 
AWS re:Invent 2016: Fueling Migration: Shortcutting your Application Portfoli...
AWS re:Invent 2016: Fueling Migration: Shortcutting your Application Portfoli...AWS re:Invent 2016: Fueling Migration: Shortcutting your Application Portfoli...
AWS re:Invent 2016: Fueling Migration: Shortcutting your Application Portfoli...
 
AWS re:Invent 2016: Building a Solid Business Case for Cloud Migration (ENT308)
AWS re:Invent 2016: Building a Solid Business Case for Cloud Migration (ENT308)AWS re:Invent 2016: Building a Solid Business Case for Cloud Migration (ENT308)
AWS re:Invent 2016: Building a Solid Business Case for Cloud Migration (ENT308)
 
AWS re:Invent 2016: Start Your Cost Optimization Program: Learning from Intui...
AWS re:Invent 2016: Start Your Cost Optimization Program: Learning from Intui...AWS re:Invent 2016: Start Your Cost Optimization Program: Learning from Intui...
AWS re:Invent 2016: Start Your Cost Optimization Program: Learning from Intui...
 
Mastering the fundamentals of AWS billing 8-20-15
Mastering the fundamentals of AWS billing 8-20-15Mastering the fundamentals of AWS billing 8-20-15
Mastering the fundamentals of AWS billing 8-20-15
 
AWS April 2016 Webinar Series - Getting Started with Real-Time Data Analytics...
AWS April 2016 Webinar Series - Getting Started with Real-Time Data Analytics...AWS April 2016 Webinar Series - Getting Started with Real-Time Data Analytics...
AWS April 2016 Webinar Series - Getting Started with Real-Time Data Analytics...
 
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
RMG205 Decoding Your AWS Bill - - AWS re: Invent 2012
 

Similar a AWS re:Invent 2016: Running Lean Architectures: How to Optimize for Cost Efficiency (ARC313)

Similar a AWS re:Invent 2016: Running Lean Architectures: How to Optimize for Cost Efficiency (ARC313) (20)

Running Lean Architectures
Running Lean ArchitecturesRunning Lean Architectures
Running Lean Architectures
 
Running Lean Architectures
Running Lean ArchitecturesRunning Lean Architectures
Running Lean Architectures
 
Day 3 - Maintaining Performance & Availability While Lowering Costs with AWS
Day 3 - Maintaining Performance & Availability While Lowering Costs with AWSDay 3 - Maintaining Performance & Availability While Lowering Costs with AWS
Day 3 - Maintaining Performance & Availability While Lowering Costs with AWS
 
AWS Fundamentals @Back2School by CloudZone
AWS Fundamentals @Back2School by CloudZoneAWS Fundamentals @Back2School by CloudZone
AWS Fundamentals @Back2School by CloudZone
 
(ARC302) Running Lean Architectures: Optimizing for Cost Efficiency
(ARC302) Running Lean Architectures: Optimizing for Cost Efficiency(ARC302) Running Lean Architectures: Optimizing for Cost Efficiency
(ARC302) Running Lean Architectures: Optimizing for Cost Efficiency
 
Cloud & Native Cloud for Managers
Cloud & Native Cloud for ManagersCloud & Native Cloud for Managers
Cloud & Native Cloud for Managers
 
AWS re:Invent 2016: Event Handling at Scale: Designing an Auditable Ingestion...
AWS re:Invent 2016: Event Handling at Scale: Designing an Auditable Ingestion...AWS re:Invent 2016: Event Handling at Scale: Designing an Auditable Ingestion...
AWS re:Invent 2016: Event Handling at Scale: Designing an Auditable Ingestion...
 
What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?What is Amazon Web Services & How to Start to deploy your apps ?
What is Amazon Web Services & How to Start to deploy your apps ?
 
Getting Started with AWS Compute Services
Getting Started with AWS Compute ServicesGetting Started with AWS Compute Services
Getting Started with AWS Compute Services
 
Database and Analytics on the AWS Cloud - AWS Innovate Toronto
Database and Analytics on the AWS Cloud - AWS Innovate TorontoDatabase and Analytics on the AWS Cloud - AWS Innovate Toronto
Database and Analytics on the AWS Cloud - AWS Innovate Toronto
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Top 5 Ways to Optimize for Cost Efficiency with the Cloud
Top 5 Ways to Optimize for Cost Efficiency with the CloudTop 5 Ways to Optimize for Cost Efficiency with the Cloud
Top 5 Ways to Optimize for Cost Efficiency with the Cloud
 
Aws tutorial
Aws tutorialAws tutorial
Aws tutorial
 
Scaling up to Your First 10 Million Users
Scaling up to Your First 10 Million UsersScaling up to Your First 10 Million Users
Scaling up to Your First 10 Million Users
 
Why Scale Matters and How the Cloud is Really Different (at scale)
Why Scale Matters and How the Cloud is Really Different (at scale)Why Scale Matters and How the Cloud is Really Different (at scale)
Why Scale Matters and How the Cloud is Really Different (at scale)
 
Raleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshopRaleigh DevDay 2017: Build a serverless web application in one day workshop
Raleigh DevDay 2017: Build a serverless web application in one day workshop
 
Real-time Analytics with Open-Source
Real-time Analytics with Open-SourceReal-time Analytics with Open-Source
Real-time Analytics with Open-Source
 
Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)Being Well Architected in the Cloud (Updated)
Being Well Architected in the Cloud (Updated)
 
Being Well-Architected in the Cloud
Being Well-Architected in the CloudBeing Well-Architected in the Cloud
Being Well-Architected in the Cloud
 

Más 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
 

Más 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
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

AWS re:Invent 2016: Running Lean Architectures: How to Optimize for Cost Efficiency (ARC313)

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Markus Ostertag, Head of Development, Team Internet AG, @osterjour Constantin Gonzalez, Principal Solutions Architect, AWS, @zalez November 30, 2016 Running Lean Architectures How to Optimize for Cost Efficiency ARC313
  • 2. What you’ll get out of this session • Best practices on how to lower your AWS bill • A more scalable, robust, dynamic architecture • More time to innovate • Real-world customer examples • Easy to implement
  • 4. Business Goals “Pay as little as possible for what we use.”
  • 5. AWS pricing philosophy Ecosystem Global Footprint New Features New Services More AWS Usage More Infrastructure Lower Infrastructure Costs Reduced Prices More CustomersInfrastructure Innovation 57 price reductions since 2006 Economies of Scale
  • 7. AWS simple monthly calculator
  • 11. Free Trusted Advisor Trial! • Free trial begins on 12/6/16 • Runs for 30 days • Full suite of checks and best practice recommendations available • For customers not already on business/enterprise support plans • No action required: Just log in and start using! https://console.aws.amazon.com/trustedadvisor
  • 13. Reserved Instances basics 1y RI Break even 3y RI Break even
  • 14. Markus Ostertag Head of Development @ Team Internet
  • 15. Who is Team Internet? Domain monetization business 30 people HQ in Munich, Germany Tech focused
  • 18. Use the regional benefit Change existing Reserved Instances to scope “Region” Capacity reservation decoupled from cost optimization
  • 19. Convertible Reserved Instances Use case: “(Very) Long running, but flexible”
  • 20. Architecture Goals “Avoid waste as much as possible.”
  • 21. Turn off unused instances • Developer, test, training instances • Use simple instance start and stop • Or tear down and build up all together using AWS CloudFormation • Instances are disposable!
  • 22. Customer example Monday Friday End of Vacation Season 35% saved
  • 23. Automate, automate, automate • AWS SDKs • AWS CLI • AWS CloudFormation • AWS OpsWorks • Netflix Janitor Monkey • Cloudlytics EC2 Scheduler • Auto Scaling
  • 25. AWS CloudFormation example launch configuration "LaunchConfig": { "Type" : "AWS::AutoScaling::LaunchConfiguration", "Metadata" : { "AWS::CloudFormation::Init" : { "config" : { … packages, sources, files, services … } } }, "Properties": { "ImageId" : "ami-149f7863", "InstanceType" : "m1.small", "SecurityGroups" : [ {"Ref" : "WebServerSecurityGroup"} ], "KeyName" : "MySSHKey", "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ "#!/bin/bash -vn", … your user data script … ]]}} } }
  • 26. AWS CloudFormation example Auto Scaling group definition "WebServerGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "AvailabilityZones" : [ "us-east-1a", "us-east-1b", "us-east-1c", ], "LaunchConfigurationName" : { "Ref" : "LaunchConfig" }, "MinSize" : “3", "MaxSize" : “6", "DesiredCapacity" : “3", "LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ] } }
  • 28. Use Spot Instances • Price based on supply/demand • You choose your maximum price/hour • Your instance is started if the Spot price is lower • Your instance is terminated if the Spot price is higher, with 2 minutes notice • But: You did plan for fault tolerance, didn’t you?
  • 29. Spot Instance example On-Demand: $0.24 $0.028 (11.7%) $0.026 (10,8%) $3.28 (1367%)
  • 30. Spot Instance use cases • Stateless Web/App server fleets • Amazon EMR • Continuous Integration (CI) • High Performance Computing (HPC) • Grid Computing • Media Rendering/Transcoding aws.amazon.com/ec2/spot
  • 32. Spot Instances recap • Very dynamic pricing • Opportunity to save 80-90% cost • But there are risks • Different prices per AZ • Leverage Auto Scaling! • One group with Spot Instances • One group with On-Demand • Get the best of both worlds • Spot fleets – Manage thousands of Spot Instances with one API call
  • 33. “But my applications are too small for Auto Scaling!”
  • 34. Amazon EC2 Container Service • Easily manage Docker containers • Flexible container placement • Designed for use with other AWS services • Extensible • Performance at Scale • Secure
  • 35. 10% 15% 7% 12% 20% 9% Consolidate with Amazon ECS App 1 App 2 App 3 App 4 App 5 App 6 6 12 34 5 Amazon ECS cluster
  • 36. AWS Lambda Amazon S3 bucket events AWS Lambda Original object Compressed object 1 2 3
  • 37. Get rid of idle time with AWS Lambda • Automatic scaling • Automatic provisioning • No need to manage infrastructure • Just bring your code • $0.20 per million requests, 1M free • 100 ms payment granularity • Never pay for idle Less than 40% utilization? Consider using AWS Lambda instead!
  • 39. Database optimization through caching DynamoDB Amazon RDS DynamoDB Amazon RDS ElastiCache
  • 40. Caching saves money DynamoDB reads Saved 3k reads per second (>20k reads per second in total)
  • 41. Cache really everything! Cache hit ratio 25-30% Cache hit ratio 89-95% Without negative caching With negative caching Hit Miss
  • 42. Cache invalidation “There are only two hard things in Computer Science: cache invalidation and naming things” -- Phil Karlton Two ways to cache: Time to Live (TTL) with invalidation Keep the cache in sync all the time
  • 43. Synchronous writes Sync/check in the app with after-write return values DynamoDB ElastiCache write/update always write/update always
  • 44. Uncoupled writes/invalidation Sync/updates via Lambda (uncoupled) DynamoDB ElastiCache write/update always no update Lambda DynamoDB Stream update
  • 45. Think of strategies for optimizing CU use • Use multiple tables to support varied access patterns • Understand access patterns for time series data • Compress large attribute values Consider read (4K) vs. write (1K) sizes Use Amazon SQS to buffer over-capacity writes Resize capacity units dynamically
  • 46. Amazon SQS can buffer requests
  • 48. Offload popular traffic to Amazon S3 and/or Amazon CloudFront
  • 49. Operational Goals “Focus on what you do best, let AWS do the rest.”
  • 50. Leverage existing services • Use Amazon RDS, DynamoDB, ElastiCache for Redis or Amazon Redshift • Instead of running your own database • Amazon Elasticsearch Service • Instead of running your own cluster • Amazon SQS • Amazon Kinesis, Amazon Kinesis Firehose, Amazon SNS, and more … AWS has experts for each service RDS Amazon Redshift Amazon Elasticsearch Service Amazon Kinesis SQS
  • 51. DynamoDB Pick the right tool for the job Key/Value Scalable throughput Low latency Amazon Aurora More complex data/queries Scalable storage Amazon Redshift Big (complex) data Higher latency ElastiCache for Redis Key/Value In-Memory (Very) low latency
  • 52. There is not one database to rule them all MongoDB Tracking API RTB Engine User&Stats API Tracking API RTB Engine DynamoDB Decoupled Amazon Aurora Amazon Redshift User&Stats API
  • 53. Advantages • No undifferentiated heavy lifting (= cost savings) • AWS operates the DB infrastructure for us • Simple and more granular scale out • No interference between RTB/Tracking and User/Stats
  • 54. Let’s recap 1. Use AWS TCO/cost/billing tools 2. Use Reserved Instances 3. Avoid idle instances through automation 4. Use Spot Instances 5. Optimize database utilization 6. Pick the right tool for the job 7. Offload your architecture
  • 55. But wait! There’s even more! https://youtu.be/SG1DsYgeGEk AWS re:Invent 2015 ARC302 Running Lean Architectures: Optimizing for Cost Efficiency • DynamoDB GSI Tweaking • Using CloudFront to avoid multi-region setups • Amazon S3 storage tiering • … and much more!