Slide 1

Slide 1 text

Pinterest Engineering Pinterest on AWS Yash Nelapati Ascii Artist

Slide 2

Slide 2 text

Pinterest Engineering How AWS?

Slide 3

Slide 3 text

Pinterest Engineering Pinterest on AWS web m1.small DB m1.small Humble Beginnings

Slide 4

Slide 4 text

Pinterest Engineering Growth 1.7G m1.small 7.5G m1.large 15G m1.xlarge 34G m2.2xlarge 68G m2.4xlarge Pinterest on AWS STOP

Slide 5

Slide 5 text

Pinterest Engineering Pinterest on AWS Workload Write heavy workload Need more IOPS Slave lag Logical Partitioning 68G m2.4xlarge pins 15G m1.xlarge 15G m1.xlarge followers

Slide 6

Slide 6 text

Pinterest Engineering Pinterest on AWS EBS and lessons Storage on demand Snapshotting Durability Variability Failures One slow disk kills entire RAID

Slide 7

Slide 7 text

Pinterest Engineering Pinterest on AWS Network

Slide 8

Slide 8 text

Pinterest Engineering Pinterest on AWS Noisy neighbors memcache RabbitMQ MySQL App

Slide 9

Slide 9 text

Pinterest Engineering Pinterest on AWS An Era of Sharding

Slide 10

Slide 10 text

Pinterest Engineering Scaling Pinterest How? Type Shard Local id As traffic grew split shards Excessive splitting on m1.xlarge More machines = more failures Failover's Hurts availability 64 bit IDS

Slide 11

Slide 11 text

Pinterest Engineering Pinterest on AWS Then came the light

Slide 12

Slide 12 text

Pinterest Engineering

Slide 13

Slide 13 text

Pinterest Engineering Disaster Recovery Forced to think early on Prioritized much earlier Multi AZ / Region Pinterest on AWS

Slide 14

Slide 14 text

Pinterest Engineering Amazon Chaos Monkey Effect Pinterest on AWS

Slide 15

Slide 15 text

Pinterest Engineering Limitations S3 bucket size issues API stops responding after some magic number Need to shard objects in directories Packets/sec limitations High memory boxes dont work for all workloads Shard early and often Hard to get boot up failures Kernel panic System log of Amazon is 4K and its a buffer Pinterest on AWS

Slide 16

Slide 16 text

Pinterest Engineering Limitations (contd..) Only 100 rules in a security group Firewall Issues. New instances cant talk to others S3 upload multi-part MIME upload results in no e- tag support. S3 read after write Data move between regions is painful. Protocols like tsunami on top of UDP Everything is EPHEMERAL Pinterest on AWS

Slide 17

Slide 17 text

Pinterest Engineering Puppet v/s AMI Pinterest on AWS

Slide 18

Slide 18 text

Pinterest Engineering Tips Underperforming CPU architectures EBS is convenient for root But AMI’s are more reliable Regions may not be completely isolated Shared network peering Don’t rely on AWS services too much Keep datacenter move as part of your architecture VPC - Get in early Pinterest on AWS

Slide 19

Slide 19 text

Pinterest Engineering Scaling Pinterest Gist AWS is raw power Write your tools to make it work Build your platform

Slide 20

Slide 20 text

Pinterest Engineering Scaling Pinterest •Looking Forward • Continually improve Pinner experience • Better uptime and lower latency • Careful evaluation of datacenter move • Continually collaborate and build bigger, better, faster products • 140 Pinployees and beyond • MySQL 5.6 What’s next?

Slide 21

Slide 21 text

[email protected] pinterest.com/yashh Thank for support Jeremy Carroll Danilo Stefanovic