Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1995 - 2010
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
+
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
First real data center
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Distribution Center Isolation
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
What could we do with just S3?
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
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
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
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
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
What about a more complex case?
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
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
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
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
What about amazon.com web servers?
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
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
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%
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
November Traffic for amazon.com
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
November Traffic for amazon.com
24%
76%
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
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
November 10, 2010
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
What about a DB use case?
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
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
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
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Web Servers Ordering Service
OrderDatabase
S3
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Lessons learned
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!
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
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
Q&A