Whether you're a startup getting to profitability or an enterprise optimizing spend, it pays to run cost-efficient architectures on AWS. Dive deep into techniques used by successful customers to reduce waste and fine-tune their AWS spending, often with improved performance and a better end-customer experience. Some techniques covered in this session: Learn how to make the most of Auto Scaling, develop an effective Spot Instance strategy, and optimize for your daily traffic cycles. Learn techniques to tier storage, offload your static content to Amazon S3 and Amazon CloudFront, reduce your database loads with edge caching, spawn part-time databases, pool resources across accounts, and even teach your dev/test instances to sleep. Showcasing easily-applicable methods, this session could be your best invested hour all day.
2. What You’ll Get out of this Session
• A lower AWS bill
• A more scaleable, robust, dynamic architecture
• More time to innovate
• Real-world customer examples
• All in 7 easy to implement sections
Friday, November 15, 13
3. Cloud Computing Benefits
• Pay-as-you-go, no up-front investments
• Low on-going cost
• Flexible capacity
• Speed, agility & innovation
• Focus on your business
• Go global in Minutes
Friday, November 15, 13
4. Cloud Computing Benefits
• Pay-as-you-go, no up-front investments
• Low on-going cost
• Flexible capacity
• Speed, agility & innovation
• Focus on your business
• Go global in Minutes
Friday, November 15, 13
12. Auto Scaling Tips
• Scale up like a rocket
• Scale down like a feather
• Find the right instance type
• Leave headroom for peaks
• Bonus: Better fault-tolerance
• Bonus: Better scalability
Friday, November 15, 13
13. #2: Turn off Unused Instances
Friday, November 15, 13
14. #2: Turn off Unused Instances
• Developer/test/training instances
• Use simple instance start/stop, or
• Tear down/build up altogether
• Instances are disposable
• Automate, automate, automate:
• AWS CloudFormation
• Weekend/off-hours scripts
• Use tags
Friday, November 15, 13
17. #3: Use Reserved Instances
3y RI
Break even
1y RI
Break even
Friday, November 15, 13
18. Reserved Instances Just Got More Flexible
• Can now be moved between AZs
• Can be moved between EC2-Classic
and EC2-VPC platforms
• Size can be modified within the same
instance family
Friday, November 15, 13
20. Poll: Who Uses Spot Instances Already?
Friday, November 15, 13
21. #4: Use Spot Instances
• Price based on supply/demand
• You choose your maximum price/hour
• Your instance is started if Spot Price is lower
• Your instance is terminated if Spot Price is higher
• But: You did plan for fault-tolerance,
didn’t you?
Friday, November 15, 13
22. #4: Use Spot Instances
$3.28
(1367%)
On-demand:
$0.24
$0.028 (11.7%)
Friday, November 15, 13
$0.026 (10,8%)
23. #4: Use Spot Instances
• 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
Friday, November 15, 13
24. Spot Instance Use Cases
• Batch processing
• Amazon Elastic MapReduce
• Web crawlers
• Development/Test
• Video/Image rendering
• HPC
• Monte-Carlo analysis
Friday, November 15, 13
26. Customer Case Study: tadaa.net
• Photo sharing mobile app
• Built-in social network
• >3 Million users
• Moved from on-demand to Spot
• 57% reduction of Amazon EC2 bill
through Spot Instances
Friday, November 15, 13
29. PlanGrid’s
Autoscaling
Based
on
SQS
counts
New
EC2
instances
start
fast
with
AMIs
Configurable
Performance
One
Months
Dev
Time*
Friday, November 15, 13
42. #5: Leverage Amazon S3 Storage Classes
• Reduced Redundancy Storage Class
•
•
•
•
99.99% durability vs. 99.999999999%
Up to 20% savings
Great for everything that is easy to reproduce
Amazon SNS notification for lost objects available
• Amazon Glacier Storage Class
•
•
•
•
Same 99.999999999% durability as S3
3 to 5 hours restore time
Up to 89% savings
Great for archiving, long-term backups and old data
Friday, November 15, 13
44. #6 Optimize Amazon DynamoDB capacity units
• Read/write capacity units (CUs) determine most of
Amazon DynamoDB cost.
• By optimizing CUs, you can save a lot of money
• But:
• Need to provision enough capacity to not run into capacity errors
• Need to prepare for peaks
• Need to constantly monitor/adjust
Friday, November 15, 13
45. #6 Optimize Amazon DynamoDB capacity units
• Use caching to save read capacity units
• Local RAM caches at app server instances
• Check out Amazon ElastiCache
• 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
• Use Amazon SQS to buffer over-capacity
writes
Friday, November 15, 13
52. #7 Offload Your Architecture
• The more you can offload, the less infrastructure you
need to maintain, scale, and pay for.
• Three easy ways to offload:
• Use Amazon CloudFront
• Introduce Caching
• Leverage existing AWS services
Friday, November 15, 13
63. Let’s Recap
1. Use Auto Scaling
2. Turn off unused instances
3. Use Reserved Instances
4. Use Spot Instances
5. Leverage Amazon S3 storage classes
6. Optimize Amazon DynamoDB capacity units
7. Offload your architecture
Friday, November 15, 13
64. Startup
Spotlight
Sessions
with
Dr.
Werner
Vogels
Thurs.
Nov
14,
Marcello
Room
4406
• SPOT 203 - Fireside Chats – Startup Founders, 1:30-2:30pm
• Eliot Horowitz, CTO of MongoDB
• Jeff Lawson, CEO of Twilio
• Valentino Volonghi, Chief Architect of AdRoll
• SPOT 204 - Fireside Chats – Startup Influencers, 3:00-4:00pm
• Albert Wegner, Managing Partner at Union Square Ventures
• David Cohen, Founder and CEO of TechStars
• SPOT 101 - Startup Launches, 4:15-5:15pm
• 5 companies powered by AWS launching at AWS re:Invent 2013
Friday, November 15, 13
65. Please give us your feedback on this
presentation
ARC313
As a thank you, we will select prize
winners daily for completed surveys!
Friday, November 15, 13
Thank You