SlideShare una empresa de Scribd logo
1 de 92
Descargar para leer sin conexión
© 2014 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.
Scaling on AWS for the
First 10 Million Users
Chris Munns, Solutions Architect
July 10, 2014
Scaling on AWS for the First 10 Million Users
• Me:
– Chris Munns – munns@amazon.com
• YOU: Here to learn more about scaling
infrastructure on AWS
• TODAY: about best practices and things to think
about when building for large scale
So how do we scale?
a lot of things to read
a lot of things to read
not where we want to start
us today
Auto-Scaling is a tool
and a destination. It’s
not the single thing that
fixes everything.
What do we need
first?
Some basics…
US-WEST (Oregon)
EU-WEST (Ireland)
ASIA PAC (Tokyo)
US-WEST (N. California)
SOUTH AMERICA (Sao Paulo)
US-EAST (Virginia)
AWS GovCloud (US)
ASIA PAC
(Sydney)
Regions
ASIA PAC
(Singapore)
US-WEST (Oregon)
EU-WEST (Ireland)
ASIA PAC (Tokyo)
US-WEST (N. California)
SOUTH AMERICA (Sao Paulo)
US-EAST (Virginia)
AWS GovCloud (US)
ASIA PAC
(Sydney)
Availability Zones
ASIA PAC
(Singapore)
Edge Locations
• $7B+ retail business
• 8,000+ employees
• A whole lot of servers
Every day, AWS adds enough
server capacity to power that
entire $7B enterprise
2004 2014
Storage & Content
Delivery
AWS Global Infrastructure
Database
App Services
Deployment & Management
Compute & Networking
Analytics
Storage & Content
Delivery
AWS Global Infrastructure
Database
App Services
Deployment & Management
Compute & Networking
Analytics
Amazon
DynamoDB
Amazon
RDS
Amazon
ElastiCache
Amazon
RedShift
AWS Storage
Gateway
Amazon S3
Amazon
Glacier
Amazon
CloudFront
Amazon
CloudWatch
AWS IAM AWS
CloudFormation
Amazon Elastic
Beanstalk
AWS
OpsWorks
AWS
CloudTrail
Amazon
SQS
Amazon
Elastic
Transcoder
Amazon
SNS
Amazon
SES
Amazon
CloudSearch
Amazon SWF
Amazon
AppStream
Amazon
EC2
Amazon
VPC
Amazon
Route 53
AWS
Direct Connect
Amazon
WorkSpaces
Amazon
EMR
Amazon
Kinesis
AWS Data
Pipeline
So let’s start from day
one, user one (you)
Day One, User One:
• A single EC2 Instance
– With full stack on this host
• Web App
• Database
• Management
• Etc.
• A single Elastic IP
• Route53 for DNS
EC2
Instance
Elastic IP
Amazon
Route 53
User
“We’re gonna need a bigger box”
• Simplest approach
• Can now leverage PIOPs
• High I/O instances
• High memory instances
• High CPU instances
• High storage instances
• Easy to change instance sizes
• Will hit an endpoint eventually
c3.8xlarge
m3.2xlarge
t2.micro
“We’re gonna need a bigger box”
• Simplest approach
• Can now leverage PIOPs
• High I/O instances
• High memory instances
• High CPU instances
• High storage instances
• Easy to change instance sizes
• Will hit an endpoint eventually
c3.8xlarge
m3.2xlarge
t2.micro
Day One, User One:
• We could potentially get
to a few hundred to a few
thousand depending on
application complexity
and traffic
• No failover
• No redundancy
• Too many eggs in one
basket
EC2
Instance
Elastic IP
Amazon
Route 53
User
Day One, User One:
• We could potentially get
to a few hundred to a few
thousand depending on
application complexity
and traffic
• No failover
• No redundancy
• Too many eggs in one
basket
EC2
Instance
Elastic IP
Amazon
Route 53
User
Day Two, User >1:
First let’s separate out
our single host into
more than one.
• Web
• Database
– Make use of a database
service?
Web
Instance
Database
Instance
Elastic IP
Amazon
Route 53
User
Self-Managed Fully-Managed
Database Server
on Amazon EC2
Your choice of
database running on
Amazon EC2
Bring Your Own
License (BYOL)
Amazon
DynamoDB
Managed NoSQL
database service
using SSD storage
Seamless scalability
Zero administration
Amazon RDS
Microsoft SQL,
Oracle, MySQL or
PostgreSQL as a
managed service
Flexible licensing
BYOL or License
Included
Amazon
Redshift
Massively parallel,
petabyte-scale, data
warehouse service
Fast, powerful and
easy to scale
Database Options
But how do I choose
what DB technology I
need? SQL? NoSQL?
Some folks won’t like
this. But…
Start with SQL
databases
Why start with SQL?
• Established and well worn technology
• Lots of existing code, communities, books, background,
tools, etc
• You aren’t going to break SQL DBs in your first 10 million
users. No really, you won’t*
• Clear patterns to scalability
*Unless you are doing something SUPER weird with the data or
MASSIVE amounts of it, even then SQL will have a place in your stack
AH HA! You
said “massive
amounts”, I
will have
massive
amounts!
If your usage is such that you will be
generating several TB ( >5 ) of data
in the first year OR have an
incredibly data intensive workload,
then you might need NoSQL
Why else might you need NoSQL?
• Super low latency applications
• Metadata driven datasets
• Highly non-relational data
• Need schema-less data constructs*
• Massive amounts of data (again, in the TB range)
• Rapid ingest of data ( thousands of records/sec )
*Need != “it’s easier to do dev without schemas”
User >100:
First let’s separate out
our single host into
more than one.
• Web
• Database
– Use Amazon RDS to make
your life easier
Web
Instance
Elastic IP
RDS DB
Instance
Amazon
Route 53
User
User > 1000:
Next let’s address our
lack of failover and
redundancy issues:
• Elastic Load Balancer
• Another Web Instance
– In another Availability Zone
• Enable RDS Multi-AZ
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
Web
Instance
RDS DB Instance
Standby (Multi-AZ)
Elastic Load
Balancer
Amazon
Route 53
User
• Create highly scalable applications
• Distribute load across EC2 instances
in multiple availability zones
Feature Details
Available Load balance across instances in multiple
Availability Zones
Health checks Automatically checks health of instances and
takes them in or out of service
Session stickiness Route requests to the same instance
Secure sockets layer Supports SSL offload from web and application
servers with flexible cipher support
Monitoring Publishes metrics to CloudWatch and can get
logs of requests processed
Elastic Load
Balancer
Elastic Load Balancing
Scaling this horizontally
and vertically will get us
pretty far
( 10s-100s of thousands )
User >10ks-100ks:
RDS DB Instance
Active (Multi-AZ)
Availability Zone Availability Zone
RDS DB Instance
Standby (Multi-AZ)
Elastic Load
Balancer
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Amazon
Route 53
User
This will take us pretty far
honestly, but we care about
performance and efficiency,
so let’s improve this further
Shift some load around:
Let’s lighten the load on our
web and database instances:
• Move static content from
the web instance to Amazon
S3 and Amazon CloudFront
• Move session/state and DB
caching to Amazon
ElastiCache or Amazon
DynamoDB
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
Amazon S3
Amazon
Cloudfront
Amazon
Route 53
User
ElastiCache
DynamoDB
Working with Amazon S3
• Object based storage for the web
• 11 9s of durability
• Good for things like:
– Static assets ( css, js, images,
videos )
– Backups
– Logs
– Ingest of files for processing
• “Infinitely scalable”
• Supports fine grained permission control
• Ties in well with CloudFront
• Ties in with EMR
• Acts as a logging endpoint for
S3/CloudFront/Billing
• Supports Encryption at transit and at rest
• Reduced Redundancy 1/3 cheaper
• Amazon Glacier for super long term
storage
CloudFront
Amazon CloudFront is a web service for scalable
content delivery:
• Cache static content at the edge for faster delivery
• Helps lower load on origin infrastructure
• Dynamic and static content
• Streaming video
• Zone apex support
• Custom SSL certificates
• Low TTLs (as short as 0 seconds)
• Lower costs for origin fetches (between Amazon
S3 / Amazon EC2 and CloudFront)
• Optimized to work with Amazon EC2, Amazon S3,
Elastic Load Balancing, and Amazon Route 53
ResponseTime
ServerLoad
ResponseTime
Server
Load
ResponseTime
Server
Load
No CDN CDN for Static
Content
CDN for Static &
Dynamic Content
0
10
20
30
40
50
60
70
80
8:00
AM
9:00
AM
10:00
AM
11:00
AM
12:00
PM
1:00
PM
2:00
PM
3:00
PM
4:00
PM
5:00
PM
6:00
PM
7:00
PM
8:00
PM
9:00
PM
VolumeofData
Delivered(Gbps)
Shift some load around:
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
Amazon S3
Amazon
CloudFront
Amazon
Route 53
User
ElastiCache
DynamoDB
Let’s lighten the load on our
web and database instances:
• Move static content from
the web instance to Amazon
S3 and Amazon CloudFront
• Move session/state and DB
caching to Amazon
ElastiCache or Amazon
DynamoDB
Shift some load around:
Let’s lighten the load on our
web and database instances:
• Move static content from
the web instance to Amazon
S3 and Amazon CloudFront
• Move dynamic content
from the ELB to Amazon
CloudFront
• Move session/state and DB
caching to ElastiCache or
DynamoDB
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
Amazon S3
Amazon
Cloudfront
Amazon
Route 53
User
ElastiCache
DynamoDB
Amazon DynamoDB
• Managed, provisioned throughput
NoSQL database
• Fast, predictable performance
• Fully distributed, fault tolerant
architecture
• Considerations for non-uniform
data
Feature Details
Provisioned
throughput
Dial up or down provisioned
read/write capacity.
Predictable
performance
Average single digit millisecond
latencies from SSD-backed
infrastructure.
Strong
consistency
Be sure you are reading the
most up to date values.
Fault tolerant Data replicated across
Availability Zones.
Monitoring Integrated with Amazon
CloudWatch.
Secure Integrates with AWS Identity
and Access Management (IAM).
Amazon EMR Integrates with Amazon EMR
for complex analytics on large
datasets
Amazon ElastiCache
• Hosted Memcached & Redis
– Speaks same API as traditional open source
Memcached and Redis
• Scale from one to many nodes
• Self healing ( replaces dead instance )
• Very fast ( single digit ms speeds usually (or less) )
• Local to a single AZ for Memcache, with no persistence or
replication
• With Redis can put a replica in a different AZ with
persistence
• Use AWS’s Auto Discovery client to simplify clusters
growing and shrinking without affecting your application
Shift some load around:
Web
Instance
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
Amazon S3
Amazon
Cloudfront
Amazon
Route 53
User
ElastiCache
DynamoDB
Let’s lighten the load on our
web and database instances:
• Move static content from
the web instance to Amazon
S3 and Amazon CloudFront
• Move dynamic content from
the ELB to Amazon
CloudFront
• Move session/state and DB
caching to ElastiCache or
DynamoDB
Now that our Web tier is
much more lightweight, we
can revisit the beginning of
our talk…
Auto-Scaling!
Automatic resizing of compute
clusters based on demand
Feature Details
Control Define minimum and maximum instance pool
sizes and when scaling and cool down occurs.
Integrated to Amazon
CloudWatch
Use metrics gathered by CloudWatch to drive
scaling.
Instance types Run Auto Scaling for On-Demand and Spot
Instances. Compatible with VPC.
aws autoscaling create-auto-scaling-group
--auto-scaling-group-name MyGroup
--launch-configuration-name MyConfig
--min-size 4
--max-size 200
--availability-zones us-west-2c
Auto-Scaling
Trigger auto-scaling policy
Amazon
CloudWatch
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
Provisioned capacity
November traffic to Amazon.com
November
November traffic to Amazon.com
Provisioned capacity
November
November traffic to Amazon.com
76%
24%
Provisioned capacity
November
November traffic to Amazon.com
November
Auto Scaling
lets you do this!
User >500k+:
Availability Zone
Amazon
Route 53
User
Amazon S3
Amazon
Cloudfront
Availability Zone
Elastic Load
Balancer
DynamoDB
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
ElastiCache RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
ElastiCacheRDS DB Instance
Standby (Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
Use Tools:
Managing your infrastructure will become an ever
increasing important part of your time. Use tools to
automate repetitive tasks.
• Tools to manage AWS resources
• Tools to manage software and configuration on your
instances
• Automated data analysis of logs and user actions
AWS Application Management Solutions
Convenience Control
Higher-level Services Do it yourself
AWS
Elastic Beanstalk
AWS
OpsWorks
AWS
CloudFormation
Amazon EC2
Host Based Configuration Management
Two big players:
– Chef
– PuppetLabs Puppet
• Both do more or less the same thing
• Both have syntax that isn’t too dissimilar
• Use HBCM along side one of the tools from the previous
slide
• Spend the time required to learn them
• Can’t scale easily without HBCM
• Growing in popularity: Salt, Ansible
User >500k+:
You’ll potentially start to run into issues with speed and
performance of your applications.
• Make sure you have monitoring/metrics/logging in place
– If you can’t build it internally, outsource it! ( 3rd party SaaS )
• Pay attention to what customers are saying works well vs.
what doesn’t, use this direction
• Try to work on squeezing as much performance out of each
service/component
HOST
LEVEL
METRICS
AGGREGATE
LEVEL
METRICS
LOG
ANALYSIS
EXTERNAL
SITE
PERFORMANCE
Not having proper
monitoring/metrics is like
flying a plane with an eye
mask on in a thunderstorm.
Oh and your wing is on fire.
AWS Marketplace & Partners Can Help
• Customer can find, research,
and buy software
• Simple pricing, aligns with
Amazon EC2 usage model
• Launch in minutes
• AWS Marketplace billing
integrated into your AWS
account
• 1300+ products across 20+
categories
Learn more at: aws.amazon.com/marketplace
There’s further
improvements to be
made in breaking apart
our web/app layer
SOA = Service Oriented Architecture
SOA’ing
Move services into their own
tiers/modules. Treat each of these
as 100% whole-y separate pieces
of your infrastructure and scale
them independently.
Amazon.com and AWS do this
extensively! It offers flexibility and
greater understanding of each
component.
Loose coupling sets you free!
• The looser they're coupled, the bigger they scale
– Independent components
– Design everything as a black box
– Decouple interactions
– Favor services with built in redundancy and scalability than
building your own
Controller A Controller B
Controller A Controller B
Q Q
Tight Coupling
Use Amazon SQS as Buffers
Loose Coupling
Loose coupling + SOA = winning
DON’T REINVENT THE WHEEL
Examples:
• Email
• Queuing
• Transcoding
• Search
• Databases
• Monitoring
• Metrics
• Logging
Amazon
CloudSearch
Amazon SQSAmazon SNS
Amazon Elastic
Transcoder
Amazon SWF
Amazon SES
In the early days, if someone has a service for it already,
opt to use that instead of building it yourself.
On re-inventing the wheel:
If you find yourself writing
your own: queue, DNS
server, database, storage
system, monitoring tool
Take a deep breath and
stop it. Now.
User >1mil+:
Reaching a million and above is going to require some bit
of all the previous things:
• Multi-AZ
• Elastic Load Balancer between tiers
• Auto Scaling
• Service oriented architecture
• Serving content smartly (Amazon S3/CloudFront )
• Caching off DB
• Moving state off tiers that auto-scale
User >1mil+:
RDS DB Instance
Active (Multi-AZ)
Availability Zone
Elastic Load
Balancer
RDS DB Instance
Read Replica
RDS DB Instance
Read Replica
Web
Instance
Web
Instance
Web
Instance
Web
Instance
Amazon
Route 53
User
Amazon S3
Amazon
Cloudfront
DynamoDB
Amazon SQS
ElastiCache
Worker
Instance
Worker
Instance
Amazon
CloudWatch
Internal App
Instance
Internal App
Instance
Amazon SES
The next big steps
User >5mil – 10mil:
You’ll potentially start to run into issues with your database
around contention on the write master.
How can you solve it?
• Federation ~ splitting into multiple DBs based on function
• Sharding ~ splitting one data set up across multiple hosts
• Moving some functionality to other types of DBs ( NoSQL )
Database Federation
• Split up Databases by
function/purpose
• Harder to do cross function
queries
• Essentially delaying the need
for something like
sharding/NoSQL until much
further down the line
• Won’t help with single huge
functions/tables
ForumsDB
UsersDB
ProductsDB
Sharded Horizontal Scaling
• More complex at the
application layer
• ORM support can help
• No practical limit on
scalability
• Operation
complexity/sophistication
• Shard by function or key
space
• RDBMS or NoSQL
User ShardID
002345 A
002346 B
002347 C
002348 B
002349 A
A
B
C
Shifting functionality to NoSQL
• Similar in a sense to federation
• Again, think about the earlier points for when you
need NoSQL vs SQL
• Leverage hosted services like DynamoDB
• Some use cases:
– Leaderboards/scoring
– Rapid ingest of clickstream/log data
– Temporary data needs ( cart data )
– “Hot” tables
– Metadata/lookup tables
DynamoDB
A Quick Review
A Quick Review
• Multi-AZ your infrastructure
• Make use of self scaling services - ELB, Amazon S3,
Amazon SNS, Amazon SQS, Amazon SWF, Amazon SES, etc
• Build in redundancy at every level.
• Start SQL. Seriously.
• Cache data both inside and outside your
infrastructure
• Use automation tools in your infrastructure
A Quick Review
• Make sure you have good
metrics/monitoring/logging tools in place
• Split tiers into individual services ( SOA )
• Use Auto Scaling once you’re ready for it
• Don’t reinvent the wheel
• Move to NoSQL if/when it makes sense
Putting all this together
means we should now
easily be able to handle
10+ million users!
To infinity…..
User >10mil:
Iterating on top of the
patterns seen here will get
you up and over 100 million
users.
User >10mil:
• More fine tuning of your application
• More SOA of features/functionality
• Going from Multi-AZ to Multi-Region
• Needing to start potentially building custom
solutions
• Deep analysis of your whole stack
Next steps?
READ! –
• aws.amazon.com/documentation
• aws.amazon.com/architecture
• aws.amazon.com/start-ups
Next steps?
START USING AWS –
aws.amazon.com/free/
Next steps?
ASK FOR HELP!
• forums.aws.amazon.com
• aws.amazon.com/support
• Your Account Manager
• A Solutions Architect
THANKS
FOR
LISTENING!
Chris Munns - munns@amazon.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

The Enterprise Journey to AWS with Accenture
The Enterprise Journey to AWS with AccentureThe Enterprise Journey to AWS with Accenture
The Enterprise Journey to AWS with Accenture
 
Amazon Connect delivers personalized customer experience for your contact center
Amazon Connect delivers personalized customer experience for your contact centerAmazon Connect delivers personalized customer experience for your contact center
Amazon Connect delivers personalized customer experience for your contact center
 
A Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence AdoptionA Roadmap to Cloud Center of Excellence Adoption
A Roadmap to Cloud Center of Excellence Adoption
 
What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?What is Cloud Computing with Amazon Web Services?
What is Cloud Computing with Amazon Web Services?
 
Atlassian Overview
Atlassian OverviewAtlassian Overview
Atlassian Overview
 
Build a Real-time Streaming Data Visualization System with Amazon Kinesis Ana...
Build a Real-time Streaming Data Visualization System with Amazon Kinesis Ana...Build a Real-time Streaming Data Visualization System with Amazon Kinesis Ana...
Build a Real-time Streaming Data Visualization System with Amazon Kinesis Ana...
 
Amazon Connect Bootcamp
Amazon Connect BootcampAmazon Connect Bootcamp
Amazon Connect Bootcamp
 
AWS 101
AWS 101AWS 101
AWS 101
 
엔터프라이즈를 위한 AWS 지원 및 사례 (서수영) - AWS 웨비나 시리즈
엔터프라이즈를 위한 AWS 지원 및 사례 (서수영) - AWS 웨비나 시리즈엔터프라이즈를 위한 AWS 지원 및 사례 (서수영) - AWS 웨비나 시리즈
엔터프라이즈를 위한 AWS 지원 및 사례 (서수영) - AWS 웨비나 시리즈
 
Search Your DynamoDB Data with Amazon Elasticsearch Service (ANT302) - AWS re...
Search Your DynamoDB Data with Amazon Elasticsearch Service (ANT302) - AWS re...Search Your DynamoDB Data with Amazon Elasticsearch Service (ANT302) - AWS re...
Search Your DynamoDB Data with Amazon Elasticsearch Service (ANT302) - AWS re...
 
IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트)
IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트) IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트)
IDC 서버 몽땅 AWS로 이전하기 위한 5가지 방법 - 윤석찬 (AWS 테크에반젤리스트)
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)
 
Chaos Engineering
Chaos EngineeringChaos Engineering
Chaos Engineering
 
세션 3: IT 담당자를 위한 Cloud 로의 전환
세션 3: IT 담당자를 위한 Cloud 로의 전환세션 3: IT 담당자를 위한 Cloud 로의 전환
세션 3: IT 담당자를 위한 Cloud 로의 전환
 
Best pratices reliability & scalability on Azure
Best pratices reliability & scalability on AzureBest pratices reliability & scalability on Azure
Best pratices reliability & scalability on Azure
 
Cost Optimization on AWS
Cost Optimization on AWSCost Optimization on AWS
Cost Optimization on AWS
 
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
 
Cloud Migration: A How-To Guide
Cloud Migration: A How-To GuideCloud Migration: A How-To Guide
Cloud Migration: A How-To Guide
 
Migration Planning
Migration PlanningMigration Planning
Migration Planning
 

Destacado

Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
Amazon Web Services
 

Destacado (18)

Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
ARC204 AWS Infrastructure Automation - AWS re: Invent 2012
ARC204 AWS Infrastructure Automation - AWS re: Invent 2012ARC204 AWS Infrastructure Automation - AWS re: Invent 2012
ARC204 AWS Infrastructure Automation - AWS re: Invent 2012
 
I Love APIs 2015: Microservices at Amazon
I Love APIs 2015: Microservices at AmazonI Love APIs 2015: Microservices at Amazon
I Love APIs 2015: Microservices at Amazon
 
AWS Webcast - Build high-scale applications with Amazon DynamoDB
AWS Webcast - Build high-scale applications with Amazon DynamoDBAWS Webcast - Build high-scale applications with Amazon DynamoDB
AWS Webcast - Build high-scale applications with Amazon DynamoDB
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
 
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar SeriesImproving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
Improving Infrastructure Governance on AWS - AWS June 2016 Webinar Series
 
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
Chris Munns, DevOps @ Amazon: Microservices, 2 Pizza Teams, & 50 Million Depl...
 
State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016State of Infrastructure as Code - AutomaCon 2016
State of Infrastructure as Code - AutomaCon 2016
 
(SOV204) Scaling Up to Your First 10 Million Users | AWS re:Invent 2014
(SOV204) Scaling Up to Your First 10 Million Users | AWS re:Invent 2014(SOV204) Scaling Up to Your First 10 Million Users | AWS re:Invent 2014
(SOV204) Scaling Up to Your First 10 Million Users | AWS re:Invent 2014
 
AWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the CloudAWS Tips for LAUNCHing Your Infrastructure in the Cloud
AWS Tips for LAUNCHing Your Infrastructure in the Cloud
 
Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...Continuous Deployment Practices, with Production, Test and Development Enviro...
Continuous Deployment Practices, with Production, Test and Development Enviro...
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Scale Your Application while Improving Performance and Lowering Costs (SVC203...
Scale Your Application while Improving Performance and Lowering Costs (SVC203...Scale Your Application while Improving Performance and Lowering Costs (SVC203...
Scale Your Application while Improving Performance and Lowering Costs (SVC203...
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
 
AWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAWS CloudFormation Best Practices
AWS CloudFormation Best Practices
 

Similar a Scaling on AWS for the First 10 Million Users

T1 – Architecting highly available applications on aws
T1 – Architecting highly available applications on awsT1 – Architecting highly available applications on aws
T1 – Architecting highly available applications on aws
Amazon Web Services
 

Similar a Scaling on AWS for the First 10 Million Users (20)

Scaling on AWS to the First 10 Million Users
Scaling on AWS to the First 10 Million Users Scaling on AWS to the First 10 Million Users
Scaling on AWS to the First 10 Million Users
 
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
 
Deep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersDeep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million Users
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
T1 – Architecting highly available applications on aws
T1 – Architecting highly available applications on awsT1 – Architecting highly available applications on aws
T1 – Architecting highly available applications on aws
 
Why Scale Matters and How the Cloud is Really Different (at scale)
Why Scale Matters and How the Cloud is Really Different (at scale)Why Scale Matters and How the Cloud is Really Different (at scale)
Why Scale Matters and How the Cloud is Really Different (at scale)
 
Scaling on AWS for the First 10 Million Users (ARC206) | AWS re:Invent 2013
Scaling on AWS for the First 10 Million Users (ARC206) | AWS re:Invent 2013Scaling on AWS for the First 10 Million Users (ARC206) | AWS re:Invent 2013
Scaling on AWS for the First 10 Million Users (ARC206) | AWS re:Invent 2013
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
AWS Summit Auckland 2014 | Scaling on AWS for the First 10 Million Users
 AWS Summit Auckland 2014 | Scaling on AWS for the First 10 Million Users AWS Summit Auckland 2014 | Scaling on AWS for the First 10 Million Users
AWS Summit Auckland 2014 | Scaling on AWS for the First 10 Million Users
 
AWS Summit Sydney 2014 | Scaling on AWS for the First 10 Million Users
AWS Summit Sydney 2014 | Scaling on AWS for the First 10 Million UsersAWS Summit Sydney 2014 | Scaling on AWS for the First 10 Million Users
AWS Summit Sydney 2014 | Scaling on AWS for the First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
Scale, baby, scale
Scale, baby, scaleScale, baby, scale
Scale, baby, scale
 
"How to optimize the architecture of your platform" by Julien Simon
"How to optimize the architecture of your platform" by Julien Simon"How to optimize the architecture of your platform" by Julien Simon
"How to optimize the architecture of your platform" by Julien Simon
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million users
 
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
AWS Summit Stockholm 2014 – T1 – Architecting highly available applications o...
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit Dublin
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit Dublin
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 

Más de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Scaling on AWS for the First 10 Million Users

  • 1. © 2014 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. Scaling on AWS for the First 10 Million Users Chris Munns, Solutions Architect July 10, 2014
  • 2. Scaling on AWS for the First 10 Million Users • Me: – Chris Munns – munns@amazon.com • YOU: Here to learn more about scaling infrastructure on AWS • TODAY: about best practices and things to think about when building for large scale
  • 3. So how do we scale?
  • 4.
  • 5.
  • 6. a lot of things to read
  • 7. a lot of things to read not where we want to start
  • 9. Auto-Scaling is a tool and a destination. It’s not the single thing that fixes everything.
  • 10. What do we need first?
  • 12. US-WEST (Oregon) EU-WEST (Ireland) ASIA PAC (Tokyo) US-WEST (N. California) SOUTH AMERICA (Sao Paulo) US-EAST (Virginia) AWS GovCloud (US) ASIA PAC (Sydney) Regions ASIA PAC (Singapore)
  • 13. US-WEST (Oregon) EU-WEST (Ireland) ASIA PAC (Tokyo) US-WEST (N. California) SOUTH AMERICA (Sao Paulo) US-EAST (Virginia) AWS GovCloud (US) ASIA PAC (Sydney) Availability Zones ASIA PAC (Singapore)
  • 15. • $7B+ retail business • 8,000+ employees • A whole lot of servers Every day, AWS adds enough server capacity to power that entire $7B enterprise 2004 2014
  • 16. Storage & Content Delivery AWS Global Infrastructure Database App Services Deployment & Management Compute & Networking Analytics
  • 17. Storage & Content Delivery AWS Global Infrastructure Database App Services Deployment & Management Compute & Networking Analytics Amazon DynamoDB Amazon RDS Amazon ElastiCache Amazon RedShift AWS Storage Gateway Amazon S3 Amazon Glacier Amazon CloudFront Amazon CloudWatch AWS IAM AWS CloudFormation Amazon Elastic Beanstalk AWS OpsWorks AWS CloudTrail Amazon SQS Amazon Elastic Transcoder Amazon SNS Amazon SES Amazon CloudSearch Amazon SWF Amazon AppStream Amazon EC2 Amazon VPC Amazon Route 53 AWS Direct Connect Amazon WorkSpaces Amazon EMR Amazon Kinesis AWS Data Pipeline
  • 18. So let’s start from day one, user one (you)
  • 19. Day One, User One: • A single EC2 Instance – With full stack on this host • Web App • Database • Management • Etc. • A single Elastic IP • Route53 for DNS EC2 Instance Elastic IP Amazon Route 53 User
  • 20. “We’re gonna need a bigger box” • Simplest approach • Can now leverage PIOPs • High I/O instances • High memory instances • High CPU instances • High storage instances • Easy to change instance sizes • Will hit an endpoint eventually c3.8xlarge m3.2xlarge t2.micro
  • 21. “We’re gonna need a bigger box” • Simplest approach • Can now leverage PIOPs • High I/O instances • High memory instances • High CPU instances • High storage instances • Easy to change instance sizes • Will hit an endpoint eventually c3.8xlarge m3.2xlarge t2.micro
  • 22. Day One, User One: • We could potentially get to a few hundred to a few thousand depending on application complexity and traffic • No failover • No redundancy • Too many eggs in one basket EC2 Instance Elastic IP Amazon Route 53 User
  • 23. Day One, User One: • We could potentially get to a few hundred to a few thousand depending on application complexity and traffic • No failover • No redundancy • Too many eggs in one basket EC2 Instance Elastic IP Amazon Route 53 User
  • 24. Day Two, User >1: First let’s separate out our single host into more than one. • Web • Database – Make use of a database service? Web Instance Database Instance Elastic IP Amazon Route 53 User
  • 25. Self-Managed Fully-Managed Database Server on Amazon EC2 Your choice of database running on Amazon EC2 Bring Your Own License (BYOL) Amazon DynamoDB Managed NoSQL database service using SSD storage Seamless scalability Zero administration Amazon RDS Microsoft SQL, Oracle, MySQL or PostgreSQL as a managed service Flexible licensing BYOL or License Included Amazon Redshift Massively parallel, petabyte-scale, data warehouse service Fast, powerful and easy to scale Database Options
  • 26. But how do I choose what DB technology I need? SQL? NoSQL?
  • 27. Some folks won’t like this. But…
  • 29. Why start with SQL? • Established and well worn technology • Lots of existing code, communities, books, background, tools, etc • You aren’t going to break SQL DBs in your first 10 million users. No really, you won’t* • Clear patterns to scalability *Unless you are doing something SUPER weird with the data or MASSIVE amounts of it, even then SQL will have a place in your stack
  • 30. AH HA! You said “massive amounts”, I will have massive amounts!
  • 31. If your usage is such that you will be generating several TB ( >5 ) of data in the first year OR have an incredibly data intensive workload, then you might need NoSQL
  • 32. Why else might you need NoSQL? • Super low latency applications • Metadata driven datasets • Highly non-relational data • Need schema-less data constructs* • Massive amounts of data (again, in the TB range) • Rapid ingest of data ( thousands of records/sec ) *Need != “it’s easier to do dev without schemas”
  • 33. User >100: First let’s separate out our single host into more than one. • Web • Database – Use Amazon RDS to make your life easier Web Instance Elastic IP RDS DB Instance Amazon Route 53 User
  • 34. User > 1000: Next let’s address our lack of failover and redundancy issues: • Elastic Load Balancer • Another Web Instance – In another Availability Zone • Enable RDS Multi-AZ Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone Web Instance RDS DB Instance Standby (Multi-AZ) Elastic Load Balancer Amazon Route 53 User
  • 35. • Create highly scalable applications • Distribute load across EC2 instances in multiple availability zones Feature Details Available Load balance across instances in multiple Availability Zones Health checks Automatically checks health of instances and takes them in or out of service Session stickiness Route requests to the same instance Secure sockets layer Supports SSL offload from web and application servers with flexible cipher support Monitoring Publishes metrics to CloudWatch and can get logs of requests processed Elastic Load Balancer Elastic Load Balancing
  • 36. Scaling this horizontally and vertically will get us pretty far ( 10s-100s of thousands )
  • 37. User >10ks-100ks: RDS DB Instance Active (Multi-AZ) Availability Zone Availability Zone RDS DB Instance Standby (Multi-AZ) Elastic Load Balancer RDS DB Instance Read Replica RDS DB Instance Read Replica RDS DB Instance Read Replica RDS DB Instance Read Replica Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Web Instance Amazon Route 53 User
  • 38. This will take us pretty far honestly, but we care about performance and efficiency, so let’s improve this further
  • 39. Shift some load around: Let’s lighten the load on our web and database instances: • Move static content from the web instance to Amazon S3 and Amazon CloudFront • Move session/state and DB caching to Amazon ElastiCache or Amazon DynamoDB Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB
  • 40. Working with Amazon S3 • Object based storage for the web • 11 9s of durability • Good for things like: – Static assets ( css, js, images, videos ) – Backups – Logs – Ingest of files for processing • “Infinitely scalable” • Supports fine grained permission control • Ties in well with CloudFront • Ties in with EMR • Acts as a logging endpoint for S3/CloudFront/Billing • Supports Encryption at transit and at rest • Reduced Redundancy 1/3 cheaper • Amazon Glacier for super long term storage
  • 41. CloudFront Amazon CloudFront is a web service for scalable content delivery: • Cache static content at the edge for faster delivery • Helps lower load on origin infrastructure • Dynamic and static content • Streaming video • Zone apex support • Custom SSL certificates • Low TTLs (as short as 0 seconds) • Lower costs for origin fetches (between Amazon S3 / Amazon EC2 and CloudFront) • Optimized to work with Amazon EC2, Amazon S3, Elastic Load Balancing, and Amazon Route 53 ResponseTime ServerLoad ResponseTime Server Load ResponseTime Server Load No CDN CDN for Static Content CDN for Static & Dynamic Content 0 10 20 30 40 50 60 70 80 8:00 AM 9:00 AM 10:00 AM 11:00 AM 12:00 PM 1:00 PM 2:00 PM 3:00 PM 4:00 PM 5:00 PM 6:00 PM 7:00 PM 8:00 PM 9:00 PM VolumeofData Delivered(Gbps)
  • 42. Shift some load around: Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon CloudFront Amazon Route 53 User ElastiCache DynamoDB Let’s lighten the load on our web and database instances: • Move static content from the web instance to Amazon S3 and Amazon CloudFront • Move session/state and DB caching to Amazon ElastiCache or Amazon DynamoDB
  • 43. Shift some load around: Let’s lighten the load on our web and database instances: • Move static content from the web instance to Amazon S3 and Amazon CloudFront • Move dynamic content from the ELB to Amazon CloudFront • Move session/state and DB caching to ElastiCache or DynamoDB Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB
  • 44. Amazon DynamoDB • Managed, provisioned throughput NoSQL database • Fast, predictable performance • Fully distributed, fault tolerant architecture • Considerations for non-uniform data Feature Details Provisioned throughput Dial up or down provisioned read/write capacity. Predictable performance Average single digit millisecond latencies from SSD-backed infrastructure. Strong consistency Be sure you are reading the most up to date values. Fault tolerant Data replicated across Availability Zones. Monitoring Integrated with Amazon CloudWatch. Secure Integrates with AWS Identity and Access Management (IAM). Amazon EMR Integrates with Amazon EMR for complex analytics on large datasets
  • 45. Amazon ElastiCache • Hosted Memcached & Redis – Speaks same API as traditional open source Memcached and Redis • Scale from one to many nodes • Self healing ( replaces dead instance ) • Very fast ( single digit ms speeds usually (or less) ) • Local to a single AZ for Memcache, with no persistence or replication • With Redis can put a replica in a different AZ with persistence • Use AWS’s Auto Discovery client to simplify clusters growing and shrinking without affecting your application
  • 46. Shift some load around: Web Instance RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer Amazon S3 Amazon Cloudfront Amazon Route 53 User ElastiCache DynamoDB Let’s lighten the load on our web and database instances: • Move static content from the web instance to Amazon S3 and Amazon CloudFront • Move dynamic content from the ELB to Amazon CloudFront • Move session/state and DB caching to ElastiCache or DynamoDB
  • 47. Now that our Web tier is much more lightweight, we can revisit the beginning of our talk…
  • 49. Automatic resizing of compute clusters based on demand Feature Details Control Define minimum and maximum instance pool sizes and when scaling and cool down occurs. Integrated to Amazon CloudWatch Use metrics gathered by CloudWatch to drive scaling. Instance types Run Auto Scaling for On-Demand and Spot Instances. Compatible with VPC. aws autoscaling create-auto-scaling-group --auto-scaling-group-name MyGroup --launch-configuration-name MyConfig --min-size 4 --max-size 200 --availability-zones us-west-2c Auto-Scaling Trigger auto-scaling policy Amazon CloudWatch
  • 50. Sunday Monday Tuesday Wednesday Thursday Friday Saturday Typical weekly traffic to Amazon.com
  • 51. Sunday Monday Tuesday Wednesday Thursday Friday Saturday Typical weekly traffic to Amazon.com Provisioned capacity
  • 52. November traffic to Amazon.com November
  • 53. November traffic to Amazon.com Provisioned capacity November
  • 54. November traffic to Amazon.com 76% 24% Provisioned capacity November
  • 55. November traffic to Amazon.com November
  • 57. User >500k+: Availability Zone Amazon Route 53 User Amazon S3 Amazon Cloudfront Availability Zone Elastic Load Balancer DynamoDB RDS DB Instance Read Replica Web Instance Web Instance Web Instance ElastiCache RDS DB Instance Read Replica Web Instance Web Instance Web Instance ElastiCacheRDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ)
  • 58.
  • 59. Use Tools: Managing your infrastructure will become an ever increasing important part of your time. Use tools to automate repetitive tasks. • Tools to manage AWS resources • Tools to manage software and configuration on your instances • Automated data analysis of logs and user actions
  • 60. AWS Application Management Solutions Convenience Control Higher-level Services Do it yourself AWS Elastic Beanstalk AWS OpsWorks AWS CloudFormation Amazon EC2
  • 61. Host Based Configuration Management Two big players: – Chef – PuppetLabs Puppet • Both do more or less the same thing • Both have syntax that isn’t too dissimilar • Use HBCM along side one of the tools from the previous slide • Spend the time required to learn them • Can’t scale easily without HBCM • Growing in popularity: Salt, Ansible
  • 62. User >500k+: You’ll potentially start to run into issues with speed and performance of your applications. • Make sure you have monitoring/metrics/logging in place – If you can’t build it internally, outsource it! ( 3rd party SaaS ) • Pay attention to what customers are saying works well vs. what doesn’t, use this direction • Try to work on squeezing as much performance out of each service/component
  • 64. Not having proper monitoring/metrics is like flying a plane with an eye mask on in a thunderstorm. Oh and your wing is on fire.
  • 65.
  • 66. AWS Marketplace & Partners Can Help • Customer can find, research, and buy software • Simple pricing, aligns with Amazon EC2 usage model • Launch in minutes • AWS Marketplace billing integrated into your AWS account • 1300+ products across 20+ categories Learn more at: aws.amazon.com/marketplace
  • 67. There’s further improvements to be made in breaking apart our web/app layer
  • 68.
  • 69. SOA = Service Oriented Architecture
  • 70. SOA’ing Move services into their own tiers/modules. Treat each of these as 100% whole-y separate pieces of your infrastructure and scale them independently. Amazon.com and AWS do this extensively! It offers flexibility and greater understanding of each component.
  • 71. Loose coupling sets you free! • The looser they're coupled, the bigger they scale – Independent components – Design everything as a black box – Decouple interactions – Favor services with built in redundancy and scalability than building your own Controller A Controller B Controller A Controller B Q Q Tight Coupling Use Amazon SQS as Buffers Loose Coupling
  • 72. Loose coupling + SOA = winning DON’T REINVENT THE WHEEL Examples: • Email • Queuing • Transcoding • Search • Databases • Monitoring • Metrics • Logging Amazon CloudSearch Amazon SQSAmazon SNS Amazon Elastic Transcoder Amazon SWF Amazon SES In the early days, if someone has a service for it already, opt to use that instead of building it yourself.
  • 73. On re-inventing the wheel: If you find yourself writing your own: queue, DNS server, database, storage system, monitoring tool
  • 74. Take a deep breath and stop it. Now.
  • 75. User >1mil+: Reaching a million and above is going to require some bit of all the previous things: • Multi-AZ • Elastic Load Balancer between tiers • Auto Scaling • Service oriented architecture • Serving content smartly (Amazon S3/CloudFront ) • Caching off DB • Moving state off tiers that auto-scale
  • 76. User >1mil+: RDS DB Instance Active (Multi-AZ) Availability Zone Elastic Load Balancer RDS DB Instance Read Replica RDS DB Instance Read Replica Web Instance Web Instance Web Instance Web Instance Amazon Route 53 User Amazon S3 Amazon Cloudfront DynamoDB Amazon SQS ElastiCache Worker Instance Worker Instance Amazon CloudWatch Internal App Instance Internal App Instance Amazon SES
  • 77. The next big steps
  • 78. User >5mil – 10mil: You’ll potentially start to run into issues with your database around contention on the write master. How can you solve it? • Federation ~ splitting into multiple DBs based on function • Sharding ~ splitting one data set up across multiple hosts • Moving some functionality to other types of DBs ( NoSQL )
  • 79. Database Federation • Split up Databases by function/purpose • Harder to do cross function queries • Essentially delaying the need for something like sharding/NoSQL until much further down the line • Won’t help with single huge functions/tables ForumsDB UsersDB ProductsDB
  • 80. Sharded Horizontal Scaling • More complex at the application layer • ORM support can help • No practical limit on scalability • Operation complexity/sophistication • Shard by function or key space • RDBMS or NoSQL User ShardID 002345 A 002346 B 002347 C 002348 B 002349 A A B C
  • 81. Shifting functionality to NoSQL • Similar in a sense to federation • Again, think about the earlier points for when you need NoSQL vs SQL • Leverage hosted services like DynamoDB • Some use cases: – Leaderboards/scoring – Rapid ingest of clickstream/log data – Temporary data needs ( cart data ) – “Hot” tables – Metadata/lookup tables DynamoDB
  • 83. A Quick Review • Multi-AZ your infrastructure • Make use of self scaling services - ELB, Amazon S3, Amazon SNS, Amazon SQS, Amazon SWF, Amazon SES, etc • Build in redundancy at every level. • Start SQL. Seriously. • Cache data both inside and outside your infrastructure • Use automation tools in your infrastructure
  • 84. A Quick Review • Make sure you have good metrics/monitoring/logging tools in place • Split tiers into individual services ( SOA ) • Use Auto Scaling once you’re ready for it • Don’t reinvent the wheel • Move to NoSQL if/when it makes sense
  • 85. Putting all this together means we should now easily be able to handle 10+ million users!
  • 87. User >10mil: Iterating on top of the patterns seen here will get you up and over 100 million users.
  • 88. User >10mil: • More fine tuning of your application • More SOA of features/functionality • Going from Multi-AZ to Multi-Region • Needing to start potentially building custom solutions • Deep analysis of your whole stack
  • 89. Next steps? READ! – • aws.amazon.com/documentation • aws.amazon.com/architecture • aws.amazon.com/start-ups
  • 90. Next steps? START USING AWS – aws.amazon.com/free/
  • 91. Next steps? ASK FOR HELP! • forums.aws.amazon.com • aws.amazon.com/support • Your Account Manager • A Solutions Architect