Highly available and scalable web hosting can be complex and expensive. Learn how Amazon Web Services provides the reliable, scalable, secure, and high performance infrastructure required for web applications while enabling an elastic, scale out and scale down infrastructure to match IT costs in real time as customer traffic fluctuates.
1 of 34
More Related Content
AWS Canberra WWPS Summit 2013 - AWS for Web Applications
1. 2013 AWS WWPS Summit
Canberra, Australia
AWS for Web Applications
Glenn Gore
Sr Manager AWS
2. I am Barack Obama, Ask me anything
Reddit Needed to Scale for a special guest
• 2,987,307 pageviews on the day of the IAmA
• President Obama’s user page received 428,004
pageviews on the day of the IAMA
• Added 60 dedicated instance to handle the
increased load
• At peek transfering 48 MB/s to the internet
3. 2013 AWS WWPS Summit,
Canberra – May 23
While You’re Scaling
• Architect for Failure
– Failures do happen
– Internet is unpredictable
– People are unpredictable
• Architect with Security
– Security must happen
– Security is multi-layered
– Security can be automated while
you scale
4. 2013 AWS WWPS Summit,
Canberra – May 23
Why Is Scale Important?
Self
Hosting
Waste
Customer
Dissatisfaction
Actual demand
Predicted Demand
Rigid Elastic
Actual demand
AWS
6. 2013 AWS WWPS Summit,
Canberra – May 23
Loose coupling sets you free!
• The looser they're coupled, the bigger they scale
– Independent components
– Design everything as a black box
– Decouple interactions
– Load-balance clusters
Controller A Controller B Controller C
Controller A Controller B Controller C
Q Q Q
Tight Coupling
Use Amazon SQS as Buffers
Loose Coupling
7. 2013 AWS WWPS Summit,
Canberra – May 23
Allows for Parallel Processing and Failure
• Fan out
• Use varied instance types
• Use varied billing models
• Protects against failure
• Different workloads can scale independently
8. 2013 AWS WWPS Summit,
Canberra – May 23
Allows for Parallel Processing and Failure
9. 2013 AWS WWPS Summit,
Canberra – May 23
Go wide, not high!
• Build for horizontal scale
– Decrease request contention
– Reduce capacity planning headaches
– Requires a stateless application architecture
– Allows for dynamic scalability
Route 53 ELB Auto Scale EC2 S3 DynamoDBRDSCloudWatch
Cloud
Formation SQS SNS
10. But usually some state has to reside somewhere
Cookies in browser
Memory-resident session manager
Session database
Framework-provided session handler
11. So this store of state needs to be…
Performant
Scalable
Reliable
12. Where should session state reside?
Trigger auto-
scaling policy
Session State
Service
Not Here
Here
State must reside OUTSIDE
the scope of the elements you
wish to scale
13. And what do I build it on?
The state service itself must
be well architected
14. 2013 AWS WWPS Summit,
Canberra – May 23
Data Tier Scaling
The bane of the Architect’s existence
15. 2013 AWS WWPS Summit,
Canberra – May 23
Vertical Scaling
“We’re gonna need a bigger box”
• Simplest approach
• Can now leverage PIOPs
• High I/O instances
• Easy to change instance sizes
• Will hit an endpoint eventually
hi1.4xlarge
m2.4xlarge
m1.small
16. 2013 AWS WWPS Summit,
Canberra – May 23
Master/Slave Horizontal Scaling
• Reasonably simple to adapt to
• Can now leverage PIOPs
• Easy to change instances sizes
• Will hit an endpoint eventually
17. 2013 AWS WWPS Summit,
Canberra – May 23
Sharded Horizontal Scaling
Hash Ring
A
BC
D
• 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
18. 2013 AWS WWPS Summit,
Canberra – May 23
Horizontal Scaling – Fully Managed
DynamoDB
• 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 to CloudWatch.
Secure Integrates with AWS Identity and Access
Management (IAM).
Elastic
MapReduce
Integrates with Elastic MapReduce for
complex analytics on large datasets.
19. 2013 AWS WWPS Summit,
Canberra – May 23
Petabyte-Scale Data Warehousing
Feature Details
Optimized for
Data
Warehousing
Redshift uses a variety of innovations to
obtain very high query performance on
datasets ranging in size from hundreds of
gigabytes to a petabyte or more.
Scalable Easily scale the number of nodes in your
data warehouse up or down as your
performance or capacity needs change
Fault tolerant Data replicated across Availability Zones.
Monitoring Integrated to CloudWatch.
Secure Encrypt data in transit and at rest. Can also
be run in VPC to isolate your data
warehouse cluster.
S3 intergration Loads data in parallel to each node from
S3.
Elastic
MapReduce
Integrates with ERM via Data Pipeline.
20. 2013 AWS WWPS Summit,
Canberra – May 23
AWS Application Management Solutions
Elastic Beanstalk OpsWorks CloudFormation EC2
Convenience Control
Higher-level Services Do it yourself
22. 2013 AWS WWPS Summit,
Canberra – May 23
Summary
• Awareness of the options is the first step to good design
• Scaling is the ability to move the bottlenecks around to the
least expensive part of the architecture
• Loose coupling is good
• AWS makes this easier – so your application is not a victim of
its own success
23. Assessment of research impact
Robyn Owens, DVC-Research
UWA Class2Go and AWS
Associate Professor David Glance
24. What is a MOOC?
• Massive: no restrictions on numbers – from 1 to 160,000
• Open: free and open to anyone – no barriers to entry
• Online: everything is online, special format videos,
automated quizzes, peer assessment
• Course: unit of 6 – 10 weeks in duration but can be self-
paced
25. Background
• First popularised in 2011 when Stanford Artificial
Intelligence Course is put online and attracts 160,000
student enrollments
• MOOC platforms developed Coursera from Stanford, edX
from Harvard/MIT
• Sebastian Thrun forms Udacity
• Coursera now has 323 courses from 62 universities with
2.7m enrollments
28. Class2Go
• Class2Go open source MOOC platform developed by Stanford University
(Office of Vice Provost for Online Learning)
• UWA is collaborating on development:
– Modifying to support different universities
– Updating management tools to support Fabric/Cuisine/Boto
• Class2Go is being used to host UWA courses for UWA students and general
public
– 3 Courses so far
– 2 more in July (licensed content from Stanford for one of them)
– Possibility of Class2Go becoming 2nd Learning Management System at UWA
• UWA is assisting Stanford in promoting Class2Go amongst other universities
29. Class2Go Software Architecture
• Load balanced using ELB
• Python Django Apache Web Application running on Ubuntu
– Hosted on EC2
• MySQL database hosted on RDS
• Uses video hosted on YouTube and downloaded versions transcoded using ffmpeg
– Video and other assets stored on S3
• Communicates with utility servers for reports, transcoding, mail-outs using SQS
• Mail handled using SES
• DNS handled using Route 53
• Handling automated marking with Vagrant VMs
31. Class2Go Management
• Original management via Chef on Opscode
• Moved to simpler interface using Python Fabric/Cuisine/Boto
– Uses SSH to manage machines
– doesn’t require server
– Tailored to roles of servers
• Creating an App Server instance involves:
– Provisioning an EC2 instance with the correct image
– Updating Ubuntu
– Installing Ubuntu/Python/Django packages
– Installing app from github
– Installing Apache and configuring
– Adding instance to ELB
– All run from command line
32. Class2Go Video Transcoding
• Uploaded video is copied to YouTube
• Saved to S3
• Job placed on SQS for utility server to pick up
• Transcoded to smaller size
• JPG images created from the video for thumbnails
• Results stored in S3
33. General Observations
• Generally it is very straightforward and functionality is reliable and
simple to set up
• API is relatively easy to use and makes management of software and
systems environment straightforward
• Use CloudWatch for alarms on services and monitor usage etc
• Much more cost effective and administratively easier to use than
going through IT department at the University