Closing keynote migrating amazon.com to aws

43
amazon.com’s Journey to the Cloud Jon Jenkins [email protected] AWS Summit June 13, 2011

Transcript of Closing keynote migrating amazon.com to aws

Page 1: Closing keynote migrating amazon.com to aws

amazon.com’sJourney to the Cloud

Jon [email protected]

AWS SummitJune 13, 2011

Page 2: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

1995 - 2010

Page 3: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 4: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 5: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

+

Page 6: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

First real data center

Page 7: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 8: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Distribution Center Isolation

Page 9: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 10: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Decouple

Service Oriented Architecture

Scale Horizontally

Increase Speed of Execution

Develop Iteratively

Seek Simplicity

Page 11: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 12: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

What could we do with just S3?

Page 13: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 14: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

IMDB Widget Architecture

IMDB

IMDB Database

Amazon

Amazon Web Server

Service Call

Customer IMDB Service

Render Process

Page 15: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

The Problem

• Release process is coupled

• Runtime latency & scale requirements

• Service integration issues

The Solution

• Use S3 as a service

• Store raw HTML for the feature in S3

Page 16: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Before

IMDB

IMDB Database

Amazon

Amazon Web Server

Service Call

Customer IMDB Service

Render Process

IMDB

S3HTML Store

Amazon

Amazon Web Server

Generic S3 HTML Puller

Customer

After

Page 17: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Results

• Reduced page latency

• IMDB doesn’t worry about scaling

• Reduced web server CPU utilization

• Improved availability through reduced dependencies

• Simplified release model

• AJAX readiness

Page 18: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

What about a more complex case?

Page 19: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 20: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

The Problem

• The system has lots of moving parts

• It must run in an external data center

• It must scale up quickly

• Development team is two people

The Solution

• Use as many AWS services as possible

Page 21: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Agents

EC2

EC2

...

EC2

Scheduler(primary/

secondary)Configuration

Config Store

Alarm RuleEngines

CloudWatch(latency, test case

results, status codes)

SQS

RDS

SDB

S3

Web Service

Web PortalNotificationNotification

Page 22: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Results

• Very few dev resources required

• Launched without having to negotiate any new datacenter co-lo presence

• True external performance metrics

• We can test site features in development that have not yet launched

• The system scales horizontally to large amounts of traffic

Page 23: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

What about amazon.com web servers?

Page 24: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Typical Weekly Traffic to amazon.com

Page 25: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Typical Weekly Traffic to amazon.com

Page 26: Closing keynote migrating amazon.com to aws

Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Typical Weekly Traffic to amazon.com

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

61%

39%

Page 27: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

November Traffic for amazon.com

Page 28: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

November Traffic for amazon.com

24%

76%

Page 29: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

The Problem

• Retail web site hardware is underutilized

• Traffic spikes require heroic effort

• Scaling is non-linear

The Solution

• Migrate the entire www.amazon.com web server fleet to AWS

Page 30: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

amazon.com

Services

AWSAvailability Zone 1

EC2 www 1 EC2 www N

Availability Zone N

...

...

Databases EC2 www 1 EC2 www N...

CustomerLoad Balancer

VPC

Page 31: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

November 10, 2010

Page 32: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Results

• All traffic for www.amazon.com is now served from AWS

• We can dynamically scale the fleet in increments as small as a single host

• Traffic spikes can be handled with ease

Page 33: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

What about a DB use case?

Page 34: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Page 35: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Web Servers Ordering Service

OrderDatabase

Basic Order Storage Architecture

Page 36: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Web Servers Ordering Service

OrderDatabase

Web Servers Ordering Service

OrderDatabase

Web Servers Ordering Service

OrderDatabase

Basic Order Storage Architecture

Scaling Pattern 1 Scaling Pattern 2

Page 37: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

The Problem

• Cumulative data impacts scale

• No database scaling pattern is ideal

• Databases infrastructure is expensive

The Solution

• Create a tiered storage system with AWS

Page 38: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Web Servers Ordering Service

OrderDatabase

S3

Page 39: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Results

• 670 million (4TB) orders now stored in S3

• We are spending way less on DB hosts

• Sets us up for migration to RDS / SDB

Page 40: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Lessons learned

Page 41: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Business Lessons• Less time spent on capacity planning

• Fewer conversations with finance

• More innovation

• Happier developers

• I get credit for AWS price reductions

• Be sure to consider compliance issues

• No more lease returns!

Page 42: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Technical Lessons• Start with simple applications

• Iterate toward your desired end-state

• Identify reusable components

• Engage security early and treat them as partners

• Migrate to the cloud in concert with your other architectural objectives

• The cloud can’t cover up sloppy engineering

Page 43: Closing keynote migrating amazon.com to aws

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Q&A