SlideShare a Scribd company logo
Magento
High Performance
…in the cloud
php[world] 2014 – Washington D.C.
Fabrizio Branca
fbrnc
fbrnc
High-Performance Magento in the Cloud
E-Commerce:
Magento
CMS:
TYPO3
Portals:
ZF, FLOW,…
Mobile Searchperience:
SOLR
>120 people
world-wide
High
Performance
/Scale
Global
Enterprise
Projects
San Francisco, CA
Janine
Fiona
that’s me
Leo
High-Performance Magento in the Cloud
Who’s runs a shop with
10 orders/hour?
Who’s runs a shop with
10 orders/min?
Who’s runs a shop with
10 orders/sec?
YOU...?
High-Performance Magento in the Cloud
PC games (download)
Plush toys, shirts, ...
> 24.000.000 likes > 500.000 followers
Social Media
Impact
your application
one process of…
execution time
memory
High-Performance Magento in the Cloud
that’s your server
…running your
application
𝑡𝑜𝑡𝑎𝑙 𝑚𝑒𝑚𝑜𝑟𝑦 = 𝑐𝑜𝑛𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑢𝑠𝑒𝑟𝑠 ∗ 𝑚𝑒𝑚𝑜𝑟𝑦/𝑝𝑟𝑜𝑐𝑒𝑠𝑠
256 MB
/process
100 users
25 GB RAM
1000 users250 GB RAM
Option 1
Make your app “smaller”
make it
faster!make it
consume less
memory!
Option 2
Make your box “bigger”
a.k.a.
“vertical scaling”
Option 3
Add more boxes
a.k.a.
“horizontal scaling”
Vertical
Scaling
Optimization
Horizontal
Scaling
bigger
box
more
boxes
smaller “app”
Scaling
Single Server
Multi-Server
vs.
Single server
vs. Multi server
What’s the big deal?
Shared nothing?
Session
Storage
Cache
Code
JS/CSS
bundles
DatabaseAssets
Multi Server
Deployment
“Hello World!
Free Shipping
for everyone!”
High-Performance Magento in the Cloud
“Hello World!
Free Shipping
for everyone!”
“Check out
our new
product!”
“Holiday
Season!”
Slow response
times, server
crashes,…
Waste of
money
Waste of
money
Slow response
times, server
crashes,…
Auto Scaling!
Pay per hour
Actually, it
looks more
like this
Cloud
(in case you haven’t
noticed…:)
High-Performance Magento in the Cloud
Amazon EC2 Amazon S3 Amazon RDS
CloudFront
Route 53ElastiCache Elastic Load
Balancing
Cloud Services
AWS Management
ConsoleRightScale Amazon SWFOpsWorks
AWS
CloudFormation
EC2 instance
EC2 instance
Server Array
(or “auto-scaling group”)
Based on
various metrics
Server Array
(or “auto-scaling group”)
EC2 instance
Server Array
(or “auto-scaling group”)
EC2 instance
Elastic
Architecture
Booting new
instances
fully automatic
Auto-healing
Infrastructure
as Code
Loose
Coupling
No hardcoding!
“RightScale API, give
me all frontend
servers”
“ELB, here I am”
S3
Deployment X
Backend
Array
Frontend
Array
Worker
Array
Varnish
Array
S3 RDSElastiCache
CloudFront CloudFrontRoute 53
shop.angrybirds.com
Braintree
MailDRM
Giftcards
ELB
ELB
Backend
Array
Frontend
Array
Worker
Array
Varnish
Array
Deployment X
Route 53
Deployment X+1
Worker
Array
nt X
Route 53
ELB
Backend
Array
Frontend
Array
W
Varnish
Array
Worker
Array
nt X
Route 53
Backend
Array
Frontend
Array
W
Varnish
Array
Deployment X+1
ELB
Route 53
Backend
Array
Deployment X+1
Frontend
Array
Worker
Array
Varnish
Array
Deployment X
ELB ELB
Downtime
Number of
lost carts
Number of
lost sessions
and logins
1.000.000unique visitors. per day.
concurrent users.
Orders.
10
5 6
7
8
9
per second.
Yes, per second!
AWS
OpsWorks
“DevOps Application Management Service”
Stacks, Layers
Instances and Apps
e.g. “production”
Varnish
PHP
DB Instances
Lifecycle
Events
Build InstallationDeploymentProvisioning
Chef
deploy
cookbook
before_
migrate.rb
Jenkins
Setup Conf Deploy
High-Performance Magento in the Cloud
High-Performance Magento in the Cloud
Route 53
ELB
CloudFront:
Theme (JS/CSS,…)
CloudFront:
media files
Internet
S3:
media
files
S3: build
packages
Continuous
Integration
Pipeline (Jenkins)
OpsWorks
Availability Zone
AWS
CloudFormation
CloudWatch
✓
✓inherently fault tolerant
✓
✓ ✓ ✓
✓
Redis:
Sessions
Redis:
Cache Backend
RDS DB
instance
RDS DB
instance standby
(Multi-AZ)
✓ ✓
Auto Scaling Group
Frontend Layer Backend Layer
Worker Layer
Varnish Layer
Data Layer
RDS DB Read
replica (for
reports)
Redis:
Full page cache
backend
✓
Production
Stack
External Services
(Fulfillment, DRM,
Giftcards,…)
SES:
Transactional
emails
✓
SQS:
Queue
✓
OpsWorks
Setup
“Stack”
(= Environment)
“Layers”
App Instances
VarnishCustom Layer
Redis Cache
Redis Sessions
Custom Layer
Magento Production,
Magento Staging,
Wordpress,…
PHP App Layer
MySQL
DB Layer
Minimal
Setup
Route 53
ELB
CloudFront:
Theme
(JS/CSS,…)
✓
✓ ✓
S3: build
packages
Continuous
Integration
Pipeline
(Jenkins)
✓
reuse instance for
multiple layers
Not recommended!
Just a thought
experiment…
< $120/month
for a c3.2xlarge
AppVarnish
Reverse Proxy
Protecting
the application
Only a few
requests hit your app!
90%
Varnish
Tweaking
Cache Hitrate
80%
Varnish
Tweaking
Cache Hitrate
98.6%
Varnish
Tweaking
Cache Hitrate
Reduce
Number of Requests
… hitting your application
Use a
CDN
Offload
dynamic
parts
Do
Ajax
High-Performance Magento in the Cloud
High-Performance Magento in the Cloud
Request a page (HTTP Request)
deliver static page
Request
Delivering static content
Placeholders for dynamic parts.
Cache-Control headers
Ajax call request dynamic parts
and transfers the id of the currently visited product
JSON response with dynamic content
Replace placeholder
Write session id to cookie
Render the page
Browser Varnish Application
use cookies or
localStorage
Don’t
Ajax
Request a page (HTTP Request)
deliver static page
Request
Delivering static content
Placeholders for dynamic parts.
Cache-Control headers
Ajax call request dynamic parts
and transfers the id of the currently visited product
JSON response with dynamic content
Replace placeholder
Write session id to cookie
Render the page
Browser Varnish Application
3xx
4xx
5xx
Redirects
Client errors
Cache other
status codes
Server errors
http://example.com/
?utm_source=phpworld14
&utm_medium=slides
…and many more.
Normalize
URLs
Filter these!
Reduce
Number of Requests
… hitting your application
Don’t AjaxDo Ajax
3xx
4xx
5xx
Cache other
status codes
http://example.com/
?utm_source=pw14
&utm_medium=slides
Normalize URLsUse a CDN
Bottleneck
Candidates
Dynamic requests
are still too slow?
How do you know?
StackDriver New Relic Aoe_Profiler Xdebug
Server
App
Profile!
minimal
overhead
Knows about
Magento… Very
detailed!
RAM
& CPU
That’s easy…
DatabaseThat’s not so easy…
offload the
database
less queries
(caching!)
more efficient
queries
(indexes,…)
scaling
sharding
master/slave
Percona Toolkit
(slow) query log
Growing
Data
Trimming
the fat!
Orders
Promotions
cms / banners
Aoe_CacheCleaner
Aoe_QuoteCleaner
File I/O
especially on
virtual machines!
lib
community
core
local
Number of *.php files by location
Less file
operations
Aoe_ClassPathCache
Magento
Compiler
Solution
File I/O
…also check
Magento 2!
External
Components Frontend?
Cache
Backend?
Web Services?
Webserver?
Bottleneck
Candidates
Memory CPU File I/ODatabase
External
Components
Launch!
Deployment
Space game
launch!
USA wakes up
http://joind.in/talk/view/11889
Thank you!
Any questions?
{firstname}.{lastname}@aoe.com
http://www.aoe.com
http://www.fabrizio-branca.de
@fbrnc
Follow me on twitter!
My blog

More Related Content

What's hot (18)

PDF
Realtime with-websockets-2015
ColdFusionConference
 
PDF
Windows Attacks AT is the new black
Rob Fuller
 
PDF
CFML Sessions For Dummies
ColdFusionConference
 
PDF
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
PDF
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
PPTX
PHP on Windows
guest60c7659
 
PDF
Seravo.com: WordPress Security 101
Seravo
 
PDF
Less and faster – Cache tips for WordPress developers
Seravo
 
PDF
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
PPTX
High performance WordPress
Mikel King
 
PDF
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen
 
PDF
4.2. Web analyst fiddler
defconmoscow
 
PDF
Single page apps with drupal 7
Chris Tankersley
 
PPTX
Anthony Somerset - Site Speed = Success!
WordCamp Cape Town
 
PDF
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller
 
PPTX
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
PDF
Realtime with websockets
ColdFusionConference
 
Realtime with-websockets-2015
ColdFusionConference
 
Windows Attacks AT is the new black
Rob Fuller
 
CFML Sessions For Dummies
ColdFusionConference
 
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
PHP on Windows
guest60c7659
 
Seravo.com: WordPress Security 101
Seravo
 
Less and faster – Cache tips for WordPress developers
Seravo
 
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
High performance WordPress
Mikel King
 
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen
 
4.2. Web analyst fiddler
defconmoscow
 
Single page apps with drupal 7
Chris Tankersley
 
Anthony Somerset - Site Speed = Success!
WordCamp Cape Town
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
Realtime with websockets
ColdFusionConference
 

Viewers also liked (7)

PDF
Rock-solid Magento Deployments (and Development)
AOE
 
PDF
Rock-solid Magento Development and Deployment Workflows
AOE
 
PDF
Immutable Deployments with AWS CloudFormation and AWS Lambda
AOE
 
PDF
Angrybirds Magento Cloud Deployment
AOE
 
PDF
Magento Product Types Demystified
AOE
 
PDF
How to Build a Pure Evil Magento Module
AOE
 
PDF
Redundancy Rocks. Redundancy Rocks.
AOE
 
Rock-solid Magento Deployments (and Development)
AOE
 
Rock-solid Magento Development and Deployment Workflows
AOE
 
Immutable Deployments with AWS CloudFormation and AWS Lambda
AOE
 
Angrybirds Magento Cloud Deployment
AOE
 
Magento Product Types Demystified
AOE
 
How to Build a Pure Evil Magento Module
AOE
 
Redundancy Rocks. Redundancy Rocks.
AOE
 
Ad

Similar to High-Performance Magento in the Cloud (20)

PDF
High Performance Web Applications in the Cloud
AOE
 
PDF
Learning to Fly: How Angry Birds Reached the Heights of Store Performance |…
Atwix
 
PDF
Magento Imagine 2013: Fabrizio Branca - Learning To Fly: How Angry Birds Reac...
AOE
 
PPT
No More Hops Towards A Linearly Scalable Application Infrastructure
ConSanFrancisco123
 
PDF
Building collaborative HTML5 apps using a backend-as-a-service (HTML5DevConf ...
João Parreira
 
PPTX
Building Social Enterprise with Ruby and Salesforce
Raymond Gao
 
PPT
Livebase: a database for the web 2.0
Antonio Leonforte
 
PPTX
Introduction to Azure DocumentDB
Denny Lee
 
PPT
Scaling 101
Chris Finne
 
PPT
Scaling 101 test
Rashmi Sinha
 
PPTX
Code first in the cloud: going serverless with Azure
Jeremy Likness
 
PPTX
Microsoft Windows Azure - Cloud Platforms Today A Comparison Presentation
Microsoft Private Cloud
 
PPT
StackOverflow Architectural Overview
Folio3 Software
 
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
PPTX
Opalis - Infrastructure Optimization for the Future
Dave Kawula
 
PPTX
Cloud discussion
David Giard
 
PPTX
Microsoft Cloud Services Presentation
kamutef
 
PPTX
RavenDB overview
Igor Moochnick
 
PPTX
Launch Your Social Game or App in the Cloud in Record Time
RightScale
 
PPT
Webmaster
webhostingguy
 
High Performance Web Applications in the Cloud
AOE
 
Learning to Fly: How Angry Birds Reached the Heights of Store Performance |…
Atwix
 
Magento Imagine 2013: Fabrizio Branca - Learning To Fly: How Angry Birds Reac...
AOE
 
No More Hops Towards A Linearly Scalable Application Infrastructure
ConSanFrancisco123
 
Building collaborative HTML5 apps using a backend-as-a-service (HTML5DevConf ...
João Parreira
 
Building Social Enterprise with Ruby and Salesforce
Raymond Gao
 
Livebase: a database for the web 2.0
Antonio Leonforte
 
Introduction to Azure DocumentDB
Denny Lee
 
Scaling 101
Chris Finne
 
Scaling 101 test
Rashmi Sinha
 
Code first in the cloud: going serverless with Azure
Jeremy Likness
 
Microsoft Windows Azure - Cloud Platforms Today A Comparison Presentation
Microsoft Private Cloud
 
StackOverflow Architectural Overview
Folio3 Software
 
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
Opalis - Infrastructure Optimization for the Future
Dave Kawula
 
Cloud discussion
David Giard
 
Microsoft Cloud Services Presentation
kamutef
 
RavenDB overview
Igor Moochnick
 
Launch Your Social Game or App in the Cloud in Record Time
RightScale
 
Webmaster
webhostingguy
 
Ad

More from AOE (20)

PDF
Re-inventing airport non-aeronautical revenue generation post COVID-19
AOE
 
PDF
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
AOE
 
PPTX
Flamingo presentation at code.talks commerce by Daniel Pötzinger
AOE
 
PDF
A bag full of trust - Christof Braun at AOE Conference 2018
AOE
 
PDF
Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...
AOE
 
PDF
Frankfurt Airport Digitalization Case Study
AOE
 
PDF
This is what has to change for Travel Retail to survive - Manuel Heidler, AOE
AOE
 
PDF
AOEconf17: Application Security
AOE
 
PPTX
AOEconf17: AOE Tech Radar Insights
AOE
 
PDF
AOEconf17: A flight through our OM³ Systems
AOE
 
PDF
AOEconf17: AOE Tech Radar Insights
AOE
 
PDF
AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...
AOE
 
PPTX
AOEconf17: Agile scaling concepts
AOE
 
PDF
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOE
 
PDF
AOEconf17: UI challenges in a microservice world
AOE
 
PDF
AOEconf17: Application Security - Bastian Ike
AOE
 
PPTX
AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...
AOE
 
PDF
AOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan Rotsch
AOE
 
PDF
Joern Bock: The basic concept of an agile organisation
AOE
 
PPTX
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
AOE
 
Re-inventing airport non-aeronautical revenue generation post COVID-19
AOE
 
Flamingo - Inspiring Commerce Frontend made in Go - Meet Magento 2019
AOE
 
Flamingo presentation at code.talks commerce by Daniel Pötzinger
AOE
 
A bag full of trust - Christof Braun at AOE Conference 2018
AOE
 
Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...
AOE
 
Frankfurt Airport Digitalization Case Study
AOE
 
This is what has to change for Travel Retail to survive - Manuel Heidler, AOE
AOE
 
AOEconf17: Application Security
AOE
 
AOEconf17: AOE Tech Radar Insights
AOE
 
AOEconf17: A flight through our OM³ Systems
AOE
 
AOEconf17: AOE Tech Radar Insights
AOE
 
AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...
AOE
 
AOEconf17: Agile scaling concepts
AOE
 
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOE
 
AOEconf17: UI challenges in a microservice world
AOE
 
AOEconf17: Application Security - Bastian Ike
AOE
 
AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...
AOE
 
AOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan Rotsch
AOE
 
Joern Bock: The basic concept of an agile organisation
AOE
 
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
AOE
 

Recently uploaded (20)

PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 

High-Performance Magento in the Cloud