Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
High Performance Web Applications
Search
Matt Wood
October 29, 2012
Technology
6
580
High Performance Web Applications
Building high performance web applications on AWS.
Matt Wood
October 29, 2012
Tweet
Share
More Decks by Matt Wood
See All by Matt Wood
Field Notes from Expeditions in the Cloud
mza
2
340
A Platform for Big Data
mza
6
700
The Data Lifecycle
mza
5
460
Provision Throughput Like a Boss
mza
0
400
Impact of Cloud Computing: Life Sciences
mza
2
810
Latency's Worst Nightmare: Performance Tuning Tips and Tricks
mza
4
1k
Under the Covers of DynamoDB
mza
4
950
From Analytics to Intelligence: Amazon Redshift
mza
9
950
Scaling Science
mza
3
450
Other Decks in Technology
See All in Technology
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
190
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
260
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
290
Storage Browser for Amazon S3
miu_crescent
1
240
Wantedly での Datadog 活用事例
bgpat
1
530
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
生成AIのガバナンスの全体像と現実解
fnifni
1
190
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
500
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Docker and Python
trallard
42
3.1k
RailsConf 2023
tenderlove
29
940
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Site-Speed That Sticks
csswizardry
2
190
Into the Great Unknown - MozCon
thekraken
33
1.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Cult of Friendly URLs
andyhume
78
6.1k
Transcript
High Performance Web Applications
[email protected]
Dr. Matt Wood @mza
Hello
Building blocks for wonderful applications Storage, compute, databases, managed services
None
Retail Merchant services Web services
Retail Merchant services Web services
Getting started with Amazon Web Services quick review H
Utility computing Available at the end of an API call.
Metered billing. H
Family of 20 services Adding new services and refinement weekly.
Rapid rate of innovation. H
Undi!erentiated heavy lifting Focus on your app, customers and business
H
H
aws.amazon.com H Free account. Free tier.
Building High Performance Web Applications r
Deliver a great experience to your customers. Responsive, fast web
applications. r
g DECOUPLED SCALE OUT S OPTIMIZE COST FOR C AUTOMATE
v CALIBRATED FOR: CPU performance v CALIBRATED FOR: IO performance 5patterns for performance
g DECOUPLED
Monolithic Mega System v2
Application Assets Analytics
Application Assets Analytics
Images, javascript, stylesheets, HTML pages Deliver as fast as possible
to customers r
Websites without the servers Highly durable: 99.999999999% Zero config: fire
and forget r
None
Low latency delivery of assets Local caching for fast downloads
Amazon CloudFront r
P P
Create content distributions From objects in S3 Any custom origin
Dynamic, streaming and static content r
P P P
CNAME? Map to any custom URL assets.domain.com, www.domain.com r
Application Assets Analytics
Application Assets Analytics
Application architecture Small things, loosely coupled r
Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Shared responsibility Infrastructure by AWS OS, application and data by
customers Tools to help meet best practices r
Security groups Customer controlled firewalls All ports are closed by
default r
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
x
Decoupling provides an architectural framework for performance Easier to separate
concerns: assets, streaming, etc. Easier to manage and scale. r
SCALE OUT
Elasticity is a tenet of the cloud Scale up when
you need to Scale down when you don’t r
Predictable peaks r Time Demand Capacity
Predictable peaks r Time Demand Capacity
Variable usage r Time Demand Capacity
Variable usage r Time Demand Capacity
Variable usage r Time Demand
Horizontal scaling drives performance up ...and costs down r
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Amazon Machine Images encapsulate your app Customize your virtual machines
AMI can be the unit of deployment r
1. Spin up a new instance using your AMI Configured
to bootstrap the app. r
2. Pull down latest code base From S3 or code
repository r
3. Start up the app on the instance Ready to
receive requests r
4. Register with the load balancer Job done. r
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Horizontal scaling allows for fault tolerance r
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing :( Application Assets
Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Deploying and scaling a datastore r Follow the same patterns:
horizontal scale, availability, automation.
One question: r Does your application require a strict, controlled
schema for query flexibility?
Amazon Relational Database Service r Management systems: CRM, ERP, finance
Does your application require a strict, controlled schema for query flexibility? Yes
Focus on your app r Handles tedious database admin tasks
Designed for availability
Multi-engine r MySQL, Oracle, Microsoft SQL Server Up and running
in six clicks
Point in time snapshots r Automatic. Easy recovery.
High availability r Deployed across multiple availability zones. Synchronous writes.
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Read replicas r Perfect for read heavy applications. Asynchronous writes.
Replication metrics available.
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Amazon DynamoDB r Web apps, social apps, mobile apps, user
generated content, unstructured data integration, lots of data. Does your application require a strict, controlled schema for query flexibility? No
Focus on your app r Managed NoSQL database service. No
schema.
Unlimited scale r Unlimited storage Pay as you go
High performance r Single digit millisecond latencies
Zero admin r No instances to manage Tiny API, perfectly
formed
Load balancer App servers Database Asynchronous processing Application Assets Analytics
Asynchronous processing r Resize images. Transcode movies. Resample media.
Follow the same best practices r Decouple. Stateless. Horizontal scale.
Load balancer App servers Database Asynchronous processing Application Assets Analytics
CloudFront for dynamic content r Edge caching for dynamic content
Cache by query string parameters Multiple origin servers Persistent connections to origin servers
C AUTOMATE
Automate everything The tedious. The time consuming. The error prone.
r
For example: when increasing capacity Launch instance. Update application code.
Register with load balancer. r
Auto-scaling CloudWatch Auto-scaling service Elastic Load Balancer r
Set operational thresholds Network capacity > 80% Memory utilization >
75% CPU < 50% r
Automatically respond to operational alarms r Network capacity > 80%:
add instances Memory utilization > 75%: add instances CPU < 50%: remove instances
Set bounds Step change configured by number or percentage of
instances r
Custom metrics Respond to custom metrics Page load time Database
query time r
Automatic load balancer configuration Instances added/removed automatically Health check for
running application before routing tra"c r
Stateless operations are important Decoupled, but stateless Instances are naive
to other instances r
Treat your data as a royal garden Backup to S3:
high durability Compute is a disposable resource r
v CALIBRATED FOR: CPU performance
Range of resources Choose the best instance type for performance
r
r t1.micro m1.small cc2.8xlarge
r t1.micro m1.small cc2.8xlarge High memory High CPU High CPU
+ memory
Load balancer App servers Database Asynchronous processing Application Assets Analytics
1 instance for 100 hours = 100 instances for 1
hour
Balance cost/performance Mix instance types for application servers, databases, ancillary
services, analytics etc. r
Migrate to large instance types As your application grows Use
64 bit from the outset, if possible r
v CALIBRATED FOR: IO performance
IO bound web applications are more common Application requires predictable,
consistent IO r
Provisioned throughput with DynamoDB No need to provision storage Provision
IO requirements: reads and writes per second r
None
None
None
None
Scale up, and carry on DynamoDB will manage resources to
achieve and maintain throughput r
Low latency, unlimited scale Writes acknowledged when saved to disk
in multiple data centres. Backed on SSDs. r
...and SSDs for all
hi1.4xlarge instances High capacity, high performance storage 2 x 1Tb
SSD drives r
Perfect match for databases Relational and NoSQL storage r
Perfect match for databases Relational and NoSQL storage 90k to
120k IOPS r
High performance network 10 gigabit ethernet Placement groups Perfect for
distributed stores r
S OPTIMIZE COST FOR
Economies of scale Drive down prices for customers 20 price
drops in past 6 years r
Maximize utilization Greater utilization drives down cost r
Reserved capacity Time Utilization
Reserved instances Small upfront payment Guaranteed capacity for 1 or
3 years Lower hourly rate r
Reserved instance resale Sell your reservations on the resale market
Sellers set your own price Buyers select and check out r
Reserved capacity Time Utilization
Reserved capacity On-demand Time Utilization
Reserved capacity On-demand Time Utilization
Spot instances Name your price computing r
Spot instances Lower costs ‘Overclock’ your app: more bang for
your buck r
Load balancer App servers Database on SSDs Asynchronous processing Application
Assets Analytics
Load balancer App servers Database on SSDs Asynchronous processing Application
Assets Analytics
Load balancer App servers Database on SSDs Asynchronous processing Application
Assets Analytics
Become price aware Price is a driver of your architecture
r
Automated bidding Automate bids based on on-demand price Run on
spot only when cost e!ective r
Continuous cost optimization Evaluate your reserved instance/on-demand/ spot mix regularly
as app requirements change r
5patterns for performance g DECOUPLED
5patterns for performance g DECOUPLED SCALE OUT
5patterns for performance g DECOUPLED SCALE OUT S OPTIMIZE COST
FOR
5patterns for performance g DECOUPLED SCALE OUT S OPTIMIZE COST
FOR v CALIBRATED FOR: CPU performance v CALIBRATED FOR: IO performance
5patterns for performance g DECOUPLED SCALE OUT S OPTIMIZE COST
FOR v CALIBRATED FOR: CPU performance v CALIBRATED FOR: IO performance C AUTOMATE
Thank you aws.amazon.com @mza
[email protected]