49
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. Drinking Our Own Champagne: How Woot, an Amazon subsidiary, uses AWS technologies Vivek Sagi, CTO, Woot - [email protected] Dan Pinkard, Systems Manager, Woot [email protected] November 14, 2013

Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Embed Size (px)

DESCRIPTION

Woot, an Amazon subsidiary, specializes in offering great new product deals every day. Woot's deeply discounted deals; and signature events like the 'Woot Off 'and 'Bag of Crap' sales launch at specific times throughout the day, and the resulting spiky traffic patterns are highly correlated to revenue. In this session, we offer an unvarnished perspective into how Woot uses services such as Amazon DynamoDB, EC2, ELB, CloudSearch, CloudFront, and SES. Learn how to architect for security and PCI for a retail website running on AWS. Dig into the technical details of a data-store comparison between DynamoDB, Mongo, Oracle, and SQLServer, to find the right solution for unique workloads. Join us as we share our musings and real-lessons learned from using a cocktail of AWS services. We encourage you to attend even if none of this makes sense or is interesting. Don't miss the opportunity to hang out with Mortimer the Woot monkey and his crew and to walk away with one of our legendary flying monkeys.

Citation preview

Page 1: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

Drinking Our Own Champagne: How Woot, an Amazon subsidiary, uses AWS technologies

Vivek Sagi, CTO, Woot - [email protected]

Dan Pinkard, Systems Manager, Woot – [email protected]

November 14, 2013

Page 2: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Introduction to Woot

Page 3: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot Trivia (Question 1)

11/15/2013 Amazon Confidential 3

Q: What is Woot?

A. A rabid monkey only found in the Amazon jungle

B. A daily deal site, flash site and vibrant deal community

C. The name of a dance performed by hungry SDEs

D. A retail website selling toys

Page 4: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot Trivia (Question 2)

11/15/2013 Amazon Confidential 4

Q: Name the event on the Woot website where we sell a

random collection of leftover inventory and “surprises”?

A. Bunch of Carrots

B. Bitter Old Canadians

C. Baldness on Curly

D. Bag of Crap

No Canadians were

harmed in the

making of this

presentation

Page 5: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot Trivia (Question 3)

11/15/2013 Amazon Confidential 5

Q: When was Woot acquired by Amazon?

A. 2004

B. 2008

C. 2010

D. None of the above because Woot is only a figment of

a six year old’s imagination

Page 6: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Ye Olde Woot

11/15/2013 Amazon Confidential 6

Page 7: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Modern Day Woot

11/15/2013 Amazon Confidential 7 11/15/2013 Amazon Confidential 7

Growth of

new

categories

Introduction

of Woot!

Plus flash

sales

Page 8: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

It’s All About the Benjamins

Page 9: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot’s technology stack

Page 10: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Traditional co-location (since 2003) – 8 servers

– Monolithic application

• Amazon S3 for images from 2006

• Woot Deals launch in 2009 – Amazon EC2 hosted (public)

– SimpleDB MongoDB + SOLR

– Amazon SQS to relay to Woot Retail

S3

EC2

ELB

SQS

Woot (Pre-Acquisition)

Page 11: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Migrated to Amazon VPC (2011) – 2 months to prep VPC

– VPN to colo (for secure data migration)

– P2V for SQL servers

– Migrate MongoDB replicas

– 18 hours to move production services

• Went from 8 servers to 20

S3

EC2

Route 53

CloudFront

SES

VPC

ELB

SQS

RDS

Woot (Post-Acquisition)

Page 12: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Business Goals – Support multiple deal types (Daily, Flash, VIP)

– Changes must be visible quickly

• Technology Goals – Services-oriented architecture

– Improve site reliability

– Optimize for cloud deployments

– Language and platform neutral

Application Rewrite in 2012

Page 13: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Core Technologies – C#, ASP.Net, MVC4, WCF,

– MongoDB (All Content), SQL Server (Transactional), DynamoDB (Shopping Cart)

– Memcached

– RabbitMQ

• Reporting & Operations Technologies – Node.JS, Perl, Python, Ruby, PowerShell

– Durango, Rails

– Oracle, MySQL

– Redis

– Bind9, Postfix

Woot Current Technologies

Page 14: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot’s AWS footprint

Page 15: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

S3 EC2

CloudFront

SES

CloudSearch

ELB

SQS RDS

VPC

Route 53

AWS Footprint

DynamoDB

IAM

Page 16: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Multi-node VPN

• 3 accounts

• 3 environments

Production

Development

Staging

Network Infrastructure

Page 17: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• System Center + AWS Management Pack – .Net aware application monitoring

– Ties to external monitors

– Correlates security and system events

Monitoring

Page 18: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• System Center + AWS Management Pack

• OpenNMS – Service discovery

– SNMP integration

– Multi-AZ perspective

Monitoring

Page 19: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• System Center + AWS Management Pack

• OpenNMS

• StatsD + Graphite + Skyline – Great dashboards – Measure everything

– High resolution

– Flexible graphing options

Monitoring

Page 20: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• System Center + AWS Management Pack

• OpenNMS

• StatsD + Graphite + Skyline

• Amazon CloudWatch – Most direct source of truth

– Systems performance and usage metrics

Monitoring

Page 21: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Monitoring

• System Center + AWS Management Pack

• OpenNMS

• StatsD + Graphite + Skyline

• Amazon CloudWatch

• Secret Sauce(s) – Graphite as graphing platform – Integrate Amazon CloudWatch

– Track AMPQ stats

Page 22: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

SG – Retail

Public

SG – Retail

Private

SG – Content

Public

SG - Content

Private

SG - Catalog

Public

SG - Catalog

Private

SG – Users

Public

SG – Users

Private

CloudFront

Public

Woot SOA Overview

Page 23: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Scalability

• Organizational flexibility

• Security

• Faster time to market

• Improved reliability

SOA Benefits for Woot

Page 24: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

How do we choose a technology?

Page 25: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Don’t make assumptions; all options on the table

• AWS is not the default choice

• Simulate real-world behavior

• Compare as many facets as possible

- Driver support

- Performance

- Scalability

- Resiliency

- Support

- Cost

Woot Throwdown Tenets

Page 26: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Contenders Pros Cons

Varnish Flexibility No SSL

NginX Lightweight and fast No HTTP1/1 to origin

Apache HTTP1/1 in/out

Hard to tune

Elastic Load Balancing Cloud Aware

Limited logging

Throw Down 1: Load Balancers

Page 27: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Woot “Cart Service”

– Simple

– Fast

– Resilient

– Lots of small data facts

– Secure

– Host a bag of crap

– Scalable to follow growth

patterns

Throw Down 2: Cart Persistence Storage

Page 28: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Contenders Document Databases Relational Databases

DynamoDB MongoDB Oracle SQL Server

Client API 4 5 2 5

High availability 5 5 2 5

Performance 5 4 -- --

Ramp-up time 3 5 1 2

Tools 4 4 4 5

Cost 5 1 3 3

Operational management 5 4 3 3

Debugging 4 5 5 5

Ad-hoc queries (analytics) 3 4 5 5

Support 5 5 4 4

Documentation 5 5 5 5

Total 48 47 -- --

Cart Persistent Storage

Page 29: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Criteria Document Databases Relational Databases

DynamoDB MongoDB Oracle SQL Server

Client API 4 5 2 5

High availability 5 5 2 5

Performance 5 4 -- --

Ramp-up time 3 5 1 2

Tools 4 4 4 5

Cost 5 1 3 3

Operational management 5 4 3 3

Debugging 4 5 5 5

Ad-hoc queries (analytics) 3 4 5 5

Support 5 5 4 4

Documentation 5 5 5 5

Total 48 47 -- --

Cart Persistent Storage

Page 30: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Document Databases Relational Databases

DynamoDB MongoDB Oracle SQL Server

Client API 4 5 2 5

High availability 5 5 2 5

Performance 5 4 -- --

Ramp-up time 3 5 1 2

Tools 4 4 4 5

Cost 5 1 3 3

Operational management 5 4 3 3

Debugging 4 5 5 5

Ad-hoc queries (analytics) 3 4 5 5

Support 5 5 4 4

Documentation 5 5 5 5

Total 48 47 -- --

Cart Persistent Storage

Page 31: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

- MongoDB and DynamoDB were our finalists

- DynamoDB outperformed MongoDB in our

performance tests

- We could launch and scale DynamoDB with a

button push

- We could host a bag of crap

Cart Throw Down Results

Page 32: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

0

500

1000

1500

2000

2500

3000

3500

DynamoDB MongoDB Oracle RDS SQL Server

Cost ($/Month)

Cart Persistent Storage: Cost Analysis

Page 33: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

64

2060

107

42

1348

70

1

10

100

1000

10000

Add Items Get Update Items

Operations / second

DynamoDB MongoDB

Cart Persistent Storage: Performance

Page 34: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Only basic index support (primary, secondary) – Use searching technologies such as Amazon CloudSearch to

index data

• Ad-hoc query support not so simple – Export data we want to query into a data warehouse

DynamoDB – Rough Edges

Page 35: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• 20,000,000,000 requests served

• Sub 10ms response times

• 0 errors reported since launch

• No maintenance

• No SLA misses

Cart in Production

Page 36: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Recovering from a cloud outage

Page 37: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Massive Storm + Maintenance Problem =

No Power in an Availability Zone

• Availability Zone hosted Woot’s primary

SQL and AD role masters

• Amazon EBS failures prevented recovery

• AD DNS collapsed

Triage of an outage: July 2, 2012

Page 38: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Data integrity means more Availability Zones – Mirror/replicate to other Availability Zones

– Lots of hosts for MongoDB

– Dedicated hosts for irregular patterns

• Backups

• Long-running queries

• Specialized indexes

Lessons Learnt

Page 39: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Data integrity means more Availability Zones

• Queue everything – Decouple systems

– Save state information

– Inspection of service operation

– Recoverable

Lessons Learnt

Page 40: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Data integrity means more Availability Zones

• Queue everything

• Hosts are disposable – Don’t store unique data

– Push-button launches

– Centralize configuration

– Dynamic role assignment

Lessons Learnt

Page 41: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Data integrity means more Availability Zones

• Queue everything

• Hosts are disposable

• Unique solutions – Different failure modes than traditional data center

– Combine off-the shelf items for resiliency

Lessons Learnt

Page 42: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Final thoughts on the cloud

Page 43: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Same problems as anywhere else – Centralize logging

– Centralize accounts

• Application-level logging – Gain visibility

– Follow state

• Use application tiers – SOA separation

Security

Page 44: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• CloudSearch Best Practices – Don’t make too many “cs-describe-domain” calls

– Perform updates in batches

Best Practices

Page 45: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• CloudSearch Best Practices – Don’t make too many “cs-describe-domain” calls

– Perform updates in batches

• EC2+EBS Best Practices – Deploy EBS-optimized hosts for required bandwidth

– Provisioned IOPs to ensure lower latency for disks

Best Practices

Page 46: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Best Practices

• CloudSearch Best Practices – Don’t make too many “cs-describe-domain” calls.

– Perform updates in batches

• EC2+EBS Best Practices – Deploy EBS Optimized hosts for required bandwidth

– Provisioned IOPs to ensure lower latency for disks

Page 47: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• CloudSearch Best Practices – Don’t make too many “cs-describe-domain” calls

– Perform updates in batches

• EC2+EBS Best Practices – EBS-optimized hosts for more bandwidth

– Provisioned IOPs to ensure lower latency

• Scaling Best Practices – No reward for using too much or too little

Best Practices

Page 48: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

• Tools continue to improve - AWS Dashboard - Expanded CloudWatch

- AWS Trusted Advisor - Premium Support

• AWS advocates for users

• Capacity really is elastic

• The more we see, the better it looks

Woot’s AWS Experience

Page 49: Drinking our own Champagne: How Woot, an Amazon subsidiary, uses AWS (ARC212) | AWS re:Invent 2013

Please give us your feedback on this

presentation

As a thank you, we will select prize

winners daily for completed surveys!

ARC212