SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
STP204 Pinterest Pins AWS! Running Lean on AWS Once You've Made It - AWS re: Invent 2012
When you’re starting out, it’s not worth putting a lot of effort into optimizing your costs; you should put your time into growing your business. But as your infrastructure grows, it becomes worthwhile to optimize your use of AWS resources. Ryan Park from Pinterest’s technical operations team presents how they have optimized their infrastructure costs as their site has exploded in popularity.
When you’re starting out, it’s not worth putting a lot of effort into optimizing your costs; you should put your time into growing your business. But as your infrastructure grows, it becomes worthwhile to optimize your use of AWS resources. Ryan Park from Pinterest’s technical operations team presents how they have optimized their infrastructure costs as their site has exploded in popularity.
STP204 Pinterest Pins AWS! Running Lean on AWS Once You've Made It - AWS re: Invent 2012
1.
Running Lean on AWS Once You’ve Made It
Ryan Park, Pinterest Operations
2.
QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
Web Application
Servers
Internal
Web Services
Memcache MySQL Redis
3.
Architectural Principles QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
4.
Architectural Principles QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Simplicity
5.
Architectural Principles QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Simplicity
• Flexibility
6.
Architectural Principles QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Simplicity
• Flexibility
• Scalability
7.
Architectural Principles QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Simplicity
• Flexibility
• Scalability
• Measurability
8.
Measuring and Understanding Your Costs QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
Service Category July 2012 Aug 2012 Sep 2012
Amazon S3 Storage $3,880 $4,121 $4,903
Amazon EC2 Compute $6,505 $7,519 $10,709
Amazon RDS Compute $565 $913 $1461
Amazon data transfer Network $2,860 $3,025 $3,287
SendGrid Email $399 $399 $399
Total expense $14,209 $15,977 $20,759
Per 1000 users $245 $227 $280
9.
Measuring and Understanding Your Costs QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
10.
Optimizing Amazon EC2 QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
11.
Optimizing Amazon EC2 QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Reserved Instances
• Auto Scaling
• Spot Instances
12.
EC2 Reserved Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
13.
EC2 Reserved Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
14.
EC2 Reserved Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
15.
EC2 Reserved Instance Types QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
16.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
17.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
18.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
19.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Prerequisite: Cloud-compatible architecture
• Automatic service discovery
• Automatic instance configuration
20.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
• Prerequisite: Cloud-compatible architecture
• Automatic service discovery
• Automatic instance configuration
• Scaling criteria
• Scale dynamically based on CloudWatch metrics
• Scale predictably according to a schedule that you define
21.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$
22.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-create-launch-config WebConfig
--image-id ami-3c994355 --instance-type m1.large
23.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-create-launch-config WebConfig
--image-id ami-3c994355 --instance-type m1.large
OK-Created launch config
[ryan@macbook:~]$
24.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-create-launch-config WebConfig
--image-id ami-3c994355 --instance-type m1.large
OK-Created launch config
[ryan@macbook:~]$ as-create-auto-scaling-group WebGroup
--launch-configuration WebConfig
--availability-zones us-east-1a
--min-size 2 --max-size 5
25.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-create-launch-config WebConfig
--image-id ami-3c994355 --instance-type m1.large
OK-Created launch config
[ryan@macbook:~]$ as-create-auto-scaling-group WebGroup
--launch-configuration WebConfig
--availability-zones us-east-1a
--min-size 2 --max-size 5
OK-Created AutoScalingGroup
26.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$
27.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMinNighttime --auto-scaling-group WebGroup
--recurrence "0 6 * * *" --desired-capacity 2
28.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMinNighttime --auto-scaling-group WebGroup
--recurrence "0 6 * * *" --desired-capacity 2
OK-Put Scheduled Update Group Action
[ryan@macbook:~]$
29.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMinNighttime --auto-scaling-group WebGroup
--recurrence "0 6 * * *" --desired-capacity 2
OK-Put Scheduled Update Group Action
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMaxDaytime --auto-scaling-group WebGroup
--recurrence "0 14 * * *" --desired-capacity 5
30.
EC2 Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMinNighttime --auto-scaling-group WebGroup
--recurrence "0 6 * * *" --desired-capacity 2
OK-Put Scheduled Update Group Action
[ryan@macbook:~]$ as-put-scheduled-update-group-action
WebMaxDaytime --auto-scaling-group WebGroup
--recurrence "0 14 * * *" --desired-capacity 5
OK-Put Scheduled Update Group Action
31.
EC2 Spot Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
Instance Size On-Demand Price Spot Price Savings
(Nov. 20)
Standard Small $0.065 / hr $0.007 / hr 89%
Standard Large $0.260 / hr $0.026 / hr 90%
High-Memory Extra Large $0.450 / hr $0.035 / hr 92%
High-CPU Extra Large $0.660 / hr $0.070 / hr 89%
Cluster Compute
$1.300 / hr $0.260 / hr 80%
Quadruple Extra Large
32.
No Optimizations QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
33.
Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
34.
Auto Scaling and Reserved Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
35.
Auto Scaling, Reserved, and Spot Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
36.
No Optimizations QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
37.
Auto Scaling QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
38.
Auto Scaling and Reserved Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.
39.
Auto Scaling, Reserved, and Spot Instances QuickTime™ and a
Planar RGB decompressor
are needed to see this picture.