Angrybirds Cloud

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

Tuesday, April 24, 2012

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Tuesday, April 24, 2012
Angry Birds Shop
Cloud Deployment
Presented by
Kian T. Gould and Daniel Pötzinger

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Tuesday, April 24, 2012
Irregular Traffic Behaviour

Tuesday, April 24, 2012


The Angry Birds Magento Universe
Magento Store DRM Server

Storefronts Reporting

Products + Mail Service


Ordermgmt
Warehouse Inventory

Giftcards

Shipwire
Manage Warehouse Fullfillment Braintree

Tuesday, April 24, 2012


Angrybirds Magento Universe
i p w i re
Sh
Magento Store b a l DRM Server

g e s g l o
M a n a
Storefronts Reporting
o u s e s &
w a r e h
Products + Mail Service
Ordermgmt
Warehouse Invetory
e n to r y
inv
w a y fo r
d b e s t
F i n n t
ll f i l l m e Giftcards

Shipwire r d e r F u
o
Manage Warehouse Fullfillment Braintree

Tuesday, April 24, 2012


Why Amazon Cloud ?

Tuesday, April 24, 2012


✓ Scales quickly on demand
✓ Pay only what you need

Tuesday, April 24, 2012


Powerfull AWS Services

EC2 S3 RDS Cloud Elastic ELB R53


Front Cache

Amazon Webservices & Amazon Console

Rightscale Services

Tuesday, April 24, 2012


Cloud Drawbacks?

Complexity Plan for EC2 Failover

Need to adjust
Plan Security
Application

Lack of Service

Tuesday, April 24, 2012


Cloud Drawbacks? ture Req u i re m e n t s
i te c
Arch leiF
pa i love r
y ( M u l t
i l a b i l i t
i g h a v a n g )
H a l a n c i
Complexity
and L o a d b
i n B a c k e nPlan for EC2 Failover
d
te n d
t o A d m p - Fr o n
M a g e n o m S h o
d e n t f r
d e p e n e n t
in d e p e n d
a n d i n e m e n t
i e n t a n a g
Effic s k m
back g r o u n d t a Need to adjust
Plan Security g
In te n s iv e C a c h i n Application
e c lo u d
n t i n th
a g e m e
t m a n
Asse

Lack of Service

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Our Cloud Architecture

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Architecture
ELB R53 Cloud Front
DNS CDN for Skin

Cloud Front S3 Autoscaling


CDN for Assets Assets Storage Varnish Array

Frontend Array Backend Array Worker Array


Autoscaling
FE FE FE

RDS
mySQL
Elastic Cache S3
Cache Backend Deployment

Tuesday, April 24, 2012


Scaling is about finding
the Bottleneck

Tuesday, April 24, 2012


Scaling and Tuning

Bottleneck Varnish Load


Varnish Varnish
Cloud
Array Balancing Front
Bandwidth

Bottleneck Frontend Array FE FE FE FE FE FE


FE FE FE FE FE FE FE
CPU Autoscaling FE FE FE FE FE FE

Bottleneck
Database RDS Elastic Cache
mySQL Cache Backend

Tuesday, April 24, 2012


Image Caching
Frontend Frontend Backend

Image
Cloud Front resized?
CDN for Assets
Read and save
resized images

Upload new original


S3 images to S3
Assets Storage

Tuesday, April 24, 2012


The 6 secrets of caching
1. achieve a high hit rate
2. don‘t flood your cache
3. choose your cache backends wisely
4. never loose all cache at once
5. clean up old cache entries
6. be able to clean/refresh on demand

Tuesday, April 24, 2012


Magento Performance Pointers
1. Asyncronous Cache Clearing Queue (Aoe_AsyncCache)
2. Take care of Cache Cleaning (Aoe_CacheCleaner)
3. Disable Magento Logs
4. Make page cacheable in Varnish (Aoe_Static)
5. Prefix bundeled JS and CSS with timestamp
6. and... Profile, Profile, Profile:
•xdebug + kcachegrind
•Newrelic
•xhprof

Tuesday, April 24, 2012


Magento Cloud-Adjustments
1. Compress Javascript + CSS on deploy time
2. Use Deployment Name as Cache prefix
3. Cache Warmup Script as part of Deployment
4. Health Check for Loadbalancer
5. Automatic Varnish Purging
6. Use E-Mail Service
7. Establish Asset handling

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Lessons learned
1. 404s are too expensive
=> cache or redirect
2. Cloudfront with S3 backend
cannot handle gzip
=> deploy time bundeling/compression

3. Don‘t hit „Reports“ in the backend :-)


4.You cannot forsee everything
=> But you can be prepared to fix things quickly
=> continuous deployment

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Continuous
Deployment

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Don‘t be scared of
releasing to
production

Tuesday, April 24, 2012


Definition of Continuous Deployment

We want on-demand deployment


of tested features and fixes
in a quick and reliable way

Tuesday, April 24, 2012


You can achieve this by

Automating everything
Build
Testing
Deployment

Tuesday, April 24, 2012


..and

doing it frequently

Tuesday, April 24, 2012


Tuesday, April 24, 2012
The Deployment
Pipeline

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Angry Birds Deployment Pipeline
Backup
SVN
Storage

Commit Install on Selenium Performance


Unit Tests
and Build „latest“ Acceptance Tests Tests

Build Downstream and Test Strategy

Feedback to Developers

Tuesday, April 24, 2012


Magento Installation Package
‣ htdocs [Magento Source]
‣ media
‣ Filesystem 1.set maintenance mode
‣ .modman [Custom
2.Delta Packages]
Package prepare
‣ Database ‣ changelog.txt
3.apply Database
‣ Install Binaries 4.sync files
5.run modman deploy-all
‣ settings.php 6.adjust Settings
7.Post install:
fix p. / cache clean / ...

Tuesday, April 24, 2012


Angry Birds Deployment Pipeline

Install on Cloud Integration Cloud


Deployment Copy to S3 Deployment Tests deployment
System Staging AOE + Rovio production

Tuesday, April 24, 2012


Cloud Deployment
R53
Deployment „Version 88“ DNS Deployment „Version 89“

Varnish Array Start new Varnish


releaseArray by
ELB V V V ELB V V V
✓ cloning old deployment
✓ adjusting release number
Autoscaling Backend Worker Autoscaling Backend Worker
Frontend Array Array Array Frontend Array Array Array
FE FE FE BE BE BE W FE FE FE BE BE BE W

RDS
mySQL
S3

Tuesday, April 24, 2012


Tuesday, April 24, 2012
The real life

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Day 1 - Release 1

Tuesday, April 24, 2012


Day 2 - Release 2 - „get ready for Space“

Tuesday, April 24, 2012


Day 3 - „People want it so badly“

USA wakes up
Space game
launched
Array scales up
New release
deployed

Tuesday, April 24, 2012


Day 4 - Release 3 „Performance Improvement“

40% average
CPU usage.

1-2 FE Servers
are enough

Tuesday, April 24, 2012


Tuesday, April 24, 2012
Thank you

Follow us on Twitter:

AOE: @aoemedia
Daniel P: @typo3media

Tuesday, April 24, 2012

You might also like