Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

STP204 Pinterest Pins AWS! Running Lean on AWS Once You've Made It - AWS re: Invent 2012

2,377 views

Published on

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.

  • Be the first to comment

STP204 Pinterest Pins AWS! Running Lean on AWS Once You've Made It - AWS re: Invent 2012

  1. 1. Running Lean on AWS Once You’ve Made ItRyan Park, Pinterest Operations
  2. 2. QuickTime™ and a Planar RGB decompressor are needed to see this picture. Web Application Servers Internal Web ServicesMemcache MySQL Redis
  3. 3. Architectural Principles QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  4. 4. Architectural Principles QuickTime™ and a Planar RGB decompressor are needed to see this picture.• Simplicity
  5. 5. Architectural Principles QuickTime™ and a Planar RGB decompressor are needed to see this picture.• Simplicity• Flexibility
  6. 6. Architectural Principles QuickTime™ and a Planar RGB decompressor are needed to see this picture.• Simplicity• Flexibility• Scalability
  7. 7. Architectural Principles QuickTime™ and a Planar RGB decompressor are needed to see this picture.• Simplicity• Flexibility• Scalability• Measurability
  8. 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 2012Amazon S3 Storage $3,880 $4,121 $4,903Amazon EC2 Compute $6,505 $7,519 $10,709Amazon RDS Compute $565 $913 $1461Amazon data transfer Network $2,860 $3,025 $3,287SendGrid Email $399 $399 $399Total expense $14,209 $15,977 $20,759Per 1000 users $245 $227 $280
  9. 9. Measuring and Understanding Your Costs QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  10. 10. Optimizing Amazon EC2 QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  11. 11. Optimizing Amazon EC2 QuickTime™ and a Planar RGB decompressor are needed to see this picture.• Reserved Instances• Auto Scaling• Spot Instances
  12. 12. EC2 Reserved Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  13. 13. EC2 Reserved Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  14. 14. EC2 Reserved Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  15. 15. EC2 Reserved Instance Types QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  16. 16. EC2 Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  17. 17. EC2 Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  18. 18. EC2 Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  19. 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. 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. 21. EC2 Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture. [ryan@macbook:~]$
  22. 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. 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. 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. 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. 26. EC2 Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture. [ryan@macbook:~]$
  27. 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. 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. 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. 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. 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. 32. No Optimizations QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  33. 33. Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  34. 34. Auto Scaling and Reserved Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  35. 35. Auto Scaling, Reserved, and Spot Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  36. 36. No Optimizations QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  37. 37. Auto Scaling QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  38. 38. Auto Scaling and Reserved Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  39. 39. Auto Scaling, Reserved, and Spot Instances QuickTime™ and a Planar RGB decompressor are needed to see this picture.
  40. 40. We’re Hiring!http://pinterest.com/about/careers
  41. 41. Contact QuickTime™ and a Planar RGB decompressor are needed to see this picture. rpark@pinterest.com ryanpark StanfordRyan
  42. 42. We are sincerely eager to hear your feedback on thispresentation and on re:Invent. Please fill out an evaluation form when you have a chance.

×