SlideShare uma empresa Scribd logo
1 de 54
AWS 
Speed & Scaling with Magento 
Florian Aschenbrenner
About me 
• 2 years Java dev – ATM/Host comms 
• 6 years of sysadmin and security admin 
• 3 years of Head of Tech/CTO for Wedo 
• freelance projects 
• musician
Structure 
• Concepts 
• Example for local environment 
• Proposal for AWS buildout 
• Highlight on individual technologies 
• Example for infrastructure buildout
Let‘s go 
to the cloud (1)
TCO – Traditional 
9 
8 
7 
6 
5 
4 
3 
2 
1 
0 
Cost 
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
TCO – AWS (if done right) 
9 
8 
7 
6 
5 
4 
3 
2 
1 
0 
Cost 
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
High Availability 
• Cost of downtime? 
• DNS availability? 
• Server replacement time? 
• Disaster recovery?
Scalability / Automation 
• Adding additional hardware? 
• Identical systems? 
• More hardware than needed? 
• Dev machines = live environment? 
• 2x the load? 3x? 4x?
What to consider before moving 
• Is your application ready? 
– do you store information locally? 
– can you handle turning off one node? 
– how high is your IO usage? 
• Are your current app components ready? 
– look for cloud service alternatives
Magento and the Cloud (1) 
• Magento (per default) 
– uses lots of resources and IO requests 
– saves information locally 
– can get really heavy with lots of SKUs 
– uses a combined frontend / backend system
Magento and the Cloud (2) 
• Ideal scenario 
– separate backend / frontend / cron jobs 
– don’t save any important data locally 
– centralized session storage 
– centralized cache storage 
– lower IO usage (1.7+) 
– use a proper search engine 
– use full(!) page caches = no hits to AWS 
– completely automated
Traditional Magento Infrastructure 
App 
(Magento) 
Database
Traditional Magento Infrastructure 
Load 
Balancer 
App 
App 
Database
Step 1 – A test environment 
• Automation is key! 
– test system = production system 
– all devs have same system setups 
• Technologies used 
– Packer (http://www.packer.io/) 
– Vagrant (http://www.vagrantup.com/) 
– VMWare (recommended), VirtualBox 
– Puppet (recommended), Chef
Traditional Magento Infrastructure 
Load 
Balancer 
App 
App 
Database
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech – EC2 
• ephemeral vs. EBS-backed storage 
• compute vs. memory heavy instances 
• EBS vs. network optimized instances 
• SSD vs. non-SSD storage
Tech – EC2 Frontend 
• test with expected traffic + more 
– capture and replay 
– simulate crawling 
– test with real people (!) 
• 2 large instances vs. 4 smaller instances
Tech – EC2 Backend / EC2 Job 
• split out to not take away processing 
power for customers 
• Backend roles 
– admin work 
– API connections 
• Job roles 
– periodical jobs 
– usually 1 instance
Autoscaling 
• min, max and desired amounts of 
EC2 instances 
• rule-based system 
• Launch Groups for launching AMIs
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech – ELBs (1) 
• will distribute traffic based on latency, 
origin etc. 
• “Cross-Zone balancing” 
• “Connection Draining” (new)
Tech – ELBs (2) 
• check idle timeout settings 
• make sure security groups and availability 
zones match with AS group 
• consider cron jobs / shell jobs instead of 
long running queries
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech - RDS (1) 
• Reserved IOPS vs. Standard Storage 
• Reserved IOPS 
– start at 1000 IOPS 
– have to be paid in full 
• watch CloudWatch metric „Disk Queue 
Depth“
Tech - RDS (2) 
• go for Multi-AZ 
– High Availability 
– DB changes don‘t need downtime 
• check your Configuration Sets (!) 
– Query Cache might be disabled 
– further optimizations need to be done
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech - Route 53 
• „Delegation Set“ 
• needs registrar with support for 
4 name servers (new: register via AWS) 
• Routing policies 
– Simple 
– Latency
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech – Fastly / Varnish (1) 
Internet Varnish Backend 
Server
Tech – Fastly / Varnish (2) 
• hosted Varnish solution 
• „distributed“ Varnish 
• complete purge support 
• complete VCL support 
• Magento implementation 
– Phoenix PageCache for Magento 
– implement Fastly API
Tech – Fastly / Varnish (3) 
• pages HAVE to be fully cacheable 
• hole-punching: negative performance 
impact 
• go for AJAX 
• store information locally 
(HTML5 local storage, cookies)
Tech – Fastly / Varnish (4) 
• Examples: 
– recently viewed products 
– amount of products in basket 
• might need layout changes 
• use some form of pre-caching 
• normalize user agents (!)
Proposed Infrastructure 
Route 
53 
Fastly 
BE 
ELB 
FE 
ELB 
BE 
Array 
FE 
Array 
Job 
Array 
RDS 
Additional 
Services 
ELBs EC2s
Tech - S3 / CloudFront (1) 
• do not use local storage for persistent data 
• do not use EBS for persistent data 
• S3 is available to all instances 
• will host 
– CMS uploaded files (static pages) 
– product images 
– image caches
Tech - S3 / CloudFront (2) 
• great for write-heavy operations (save) 
• slow for read-heavy operations 
– use CloudFront 
• Magento implementation: 
– OnePica ImageCDN 
– custom code for backend data storage
Tech - S3 / CloudFront (3) 
• Magento provides 2 data storages 
– file based storage 
– database based storage 
• rewrite database storage to use 
aws-php-sdk 
• combine with OnePica extension
Tech - S3 / CloudFront (4) 
Internet 
Instance 
Backend 
Fetch image / Storage 
generate cache 
http://…/cache/test.jpg
Tech - S3 / CloudFront (5) 
Cloud 
Front 
S3 
Save cache to S3 
Internet 
Instance 
Backend 
Fetch image / Storage 
generate cache 
http://…/cache/test.jpg
Tech – Elasticache 
• will be used for 
– Session storage 
http://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git 
– Block Level Cache 
http://github.com/colinmollenhour/Cm_RedisSession.git 
• we will use Redis 
– > memcache 
– distributable by default 
– true key-value store
Tech – Search 
• slow on large catalogues 
• Elasticsearch (Bubblesearch) / Solar 
• offload search traffic to dedicated service 
/server
Security 
• use VPCs (now per default) 
• don’t assign public IPs to your servers 
• don’t use public RDS distributions 
• set strict security groups 
• use VPN to connect to your infrastructure 
– AWS Direct Connect 
– small EC2 instance that runs VPN service 
– only VPN servers should have external IPs
Tech – Rollouts (1) 
• previously: 
– Capistrano 
– rpm packages 
– git pull 
– svn up 
• now: server names might be unknown
Tech – Rollouts (2) 
• Options 
– bake an AMI for every change 
– use messaging systems to roll out 
releases across servers (ActiveMQ etc.) 
• use a Capistrano-like system to ensure 
fast rollbacks if needed
Tech – Rollouts (3) 
• always aim for a 1-click deployment 
• use Jenkins etc. to build/verify your project 
• OS Packages 
– bake AMIs every time you want to install 
something 
– use puppet master/client architecture
Step 2 - Infrastructure (1) 
• go a step further: 
automate your infrastructure 
• quickly build new test environments 
• quickly move to another provider if needed 
• automatically document your infrastructure 
• “check in” your infrastructure
Step 2 - Infrastructure (2) 
• build your base AMI with packer 
• use same CM tools and classes as for test 
environment 
• use tech such as 
– Fog (http://fog.io) 
– build-cloud 
(https://github.com/scalefactory/build-cloud)
Thanks! 
• Check out the demos on 
– https://github.com/Fireflake/tech4africa 
• Get in touch 
– http://www.linkedin.com/pub/florian-aschenbrenner/ 
79/368/566

Mais conteúdo relacionado

Mais procurados

Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
Axel Quack
 

Mais procurados (20)

Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with Heat
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
 
Orchestration across multiple cloud platforms using Heat
Orchestration across multiple cloud platforms using HeatOrchestration across multiple cloud platforms using Heat
Orchestration across multiple cloud platforms using Heat
 
Jim Dowling - Multi-tenant Flink-as-a-Service on YARN
Jim Dowling - Multi-tenant Flink-as-a-Service on YARN Jim Dowling - Multi-tenant Flink-as-a-Service on YARN
Jim Dowling - Multi-tenant Flink-as-a-Service on YARN
 
Distributed automation sel_conf_2015
Distributed automation sel_conf_2015Distributed automation sel_conf_2015
Distributed automation sel_conf_2015
 
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUpAutoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
 
Apache Curator: Past, Present and Future
Apache Curator: Past, Present and FutureApache Curator: Past, Present and Future
Apache Curator: Past, Present and Future
 
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)Kubernetes at NU.nl   (Kubernetes meetup 2019-09-05)
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Autoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know HowAutoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know How
 
Gobblin on-aws
Gobblin on-awsGobblin on-aws
Gobblin on-aws
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
 
Java Application Servers Are Dead!
Java Application Servers Are Dead!Java Application Servers Are Dead!
Java Application Servers Are Dead!
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 
Atlanta Hadoop Users Meetup 09 21 2016
Atlanta Hadoop Users Meetup 09 21 2016Atlanta Hadoop Users Meetup 09 21 2016
Atlanta Hadoop Users Meetup 09 21 2016
 
Configuration primer
Configuration primerConfiguration primer
Configuration primer
 
Terraform
TerraformTerraform
Terraform
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138
 
Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
 

Destaque

Pengetahuan dasar kuhap
Pengetahuan dasar kuhapPengetahuan dasar kuhap
Pengetahuan dasar kuhap
Paris Manalu
 
Animal research project_template (1)
Animal research project_template (1)Animal research project_template (1)
Animal research project_template (1)
403Anissa
 

Destaque (11)

Magento Optimization Whitepaper
Magento Optimization WhitepaperMagento Optimization Whitepaper
Magento Optimization Whitepaper
 
Magento community edition 1.7 & enterprise edition 1.12
Magento community edition  1.7 & enterprise edition 1.12Magento community edition  1.7 & enterprise edition 1.12
Magento community edition 1.7 & enterprise edition 1.12
 
вепольное моделирование Игра Решалка
вепольное моделирование Игра Решалкавепольное моделирование Игра Решалка
вепольное моделирование Игра Решалка
 
3 opp 4 2-12 - slide package
3 opp 4 2-12 - slide  package3 opp 4 2-12 - slide  package
3 opp 4 2-12 - slide package
 
4 opp 4 2-12 - slide marketing plan
4 opp 4 2-12 - slide  marketing plan4 opp 4 2-12 - slide  marketing plan
4 opp 4 2-12 - slide marketing plan
 
Confident Zaniah
Confident ZaniahConfident Zaniah
Confident Zaniah
 
Capa pcc certo
Capa pcc certoCapa pcc certo
Capa pcc certo
 
Starcore International Mines (TSX:SAM) August 2014
Starcore International Mines (TSX:SAM) August 2014Starcore International Mines (TSX:SAM) August 2014
Starcore International Mines (TSX:SAM) August 2014
 
Pengetahuan dasar kuhap
Pengetahuan dasar kuhapPengetahuan dasar kuhap
Pengetahuan dasar kuhap
 
Animal research project_template (1)
Animal research project_template (1)Animal research project_template (1)
Animal research project_template (1)
 
Health Capital Consultants (HCC) Curriculum Vitae
Health Capital Consultants (HCC) Curriculum VitaeHealth Capital Consultants (HCC) Curriculum Vitae
Health Capital Consultants (HCC) Curriculum Vitae
 

Semelhante a Tech4Africa 2014

Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski
 

Semelhante a Tech4Africa 2014 (20)

Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS Migrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
 
Building a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for AnalystsBuilding a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for Analysts
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
Migrating to aws
Migrating to awsMigrating to aws
Migrating to aws
 
AWS Best Practices
AWS Best PracticesAWS Best Practices
AWS Best Practices
 
Modernizing your AWS Deployment
Modernizing your AWS DeploymentModernizing your AWS Deployment
Modernizing your AWS Deployment
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018
 
Biomatters and Amazon Web Services
Biomatters and Amazon Web Services Biomatters and Amazon Web Services
Biomatters and Amazon Web Services
 
NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
 
AWS Best Practices Version 2
AWS Best Practices Version 2AWS Best Practices Version 2
AWS Best Practices Version 2
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloud
 
Meetup #3: Migrate a fast scale system to AWS
Meetup #3: Migrate a fast scale system to AWSMeetup #3: Migrate a fast scale system to AWS
Meetup #3: Migrate a fast scale system to AWS
 
20170831 - Greg Palmier: Terraform & AWS at Tempus
20170831 - Greg Palmier: Terraform & AWS at Tempus20170831 - Greg Palmier: Terraform & AWS at Tempus
20170831 - Greg Palmier: Terraform & AWS at Tempus
 
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
Infrastructure at Scale: Apache Kafka, Twitter Storm & Elastic Search (ARC303...
 

Último

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
Asmae Rabhi
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 

Último (20)

20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 

Tech4Africa 2014

  • 1. AWS Speed & Scaling with Magento Florian Aschenbrenner
  • 2. About me • 2 years Java dev – ATM/Host comms • 6 years of sysadmin and security admin • 3 years of Head of Tech/CTO for Wedo • freelance projects • musician
  • 3. Structure • Concepts • Example for local environment • Proposal for AWS buildout • Highlight on individual technologies • Example for infrastructure buildout
  • 4. Let‘s go to the cloud (1)
  • 5.
  • 6. TCO – Traditional 9 8 7 6 5 4 3 2 1 0 Cost Sunday Monday Tuesday Wednesday Thursday Friday Saturday
  • 7. TCO – AWS (if done right) 9 8 7 6 5 4 3 2 1 0 Cost Sunday Monday Tuesday Wednesday Thursday Friday Saturday
  • 8. High Availability • Cost of downtime? • DNS availability? • Server replacement time? • Disaster recovery?
  • 9. Scalability / Automation • Adding additional hardware? • Identical systems? • More hardware than needed? • Dev machines = live environment? • 2x the load? 3x? 4x?
  • 10.
  • 11. What to consider before moving • Is your application ready? – do you store information locally? – can you handle turning off one node? – how high is your IO usage? • Are your current app components ready? – look for cloud service alternatives
  • 12. Magento and the Cloud (1) • Magento (per default) – uses lots of resources and IO requests – saves information locally – can get really heavy with lots of SKUs – uses a combined frontend / backend system
  • 13. Magento and the Cloud (2) • Ideal scenario – separate backend / frontend / cron jobs – don’t save any important data locally – centralized session storage – centralized cache storage – lower IO usage (1.7+) – use a proper search engine – use full(!) page caches = no hits to AWS – completely automated
  • 14. Traditional Magento Infrastructure App (Magento) Database
  • 15. Traditional Magento Infrastructure Load Balancer App App Database
  • 16. Step 1 – A test environment • Automation is key! – test system = production system – all devs have same system setups • Technologies used – Packer (http://www.packer.io/) – Vagrant (http://www.vagrantup.com/) – VMWare (recommended), VirtualBox – Puppet (recommended), Chef
  • 17. Traditional Magento Infrastructure Load Balancer App App Database
  • 18. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 19. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 20. Tech – EC2 • ephemeral vs. EBS-backed storage • compute vs. memory heavy instances • EBS vs. network optimized instances • SSD vs. non-SSD storage
  • 21. Tech – EC2 Frontend • test with expected traffic + more – capture and replay – simulate crawling – test with real people (!) • 2 large instances vs. 4 smaller instances
  • 22. Tech – EC2 Backend / EC2 Job • split out to not take away processing power for customers • Backend roles – admin work – API connections • Job roles – periodical jobs – usually 1 instance
  • 23. Autoscaling • min, max and desired amounts of EC2 instances • rule-based system • Launch Groups for launching AMIs
  • 24. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 25. Tech – ELBs (1) • will distribute traffic based on latency, origin etc. • “Cross-Zone balancing” • “Connection Draining” (new)
  • 26. Tech – ELBs (2) • check idle timeout settings • make sure security groups and availability zones match with AS group • consider cron jobs / shell jobs instead of long running queries
  • 27. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 28. Tech - RDS (1) • Reserved IOPS vs. Standard Storage • Reserved IOPS – start at 1000 IOPS – have to be paid in full • watch CloudWatch metric „Disk Queue Depth“
  • 29. Tech - RDS (2) • go for Multi-AZ – High Availability – DB changes don‘t need downtime • check your Configuration Sets (!) – Query Cache might be disabled – further optimizations need to be done
  • 30.
  • 31. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 32. Tech - Route 53 • „Delegation Set“ • needs registrar with support for 4 name servers (new: register via AWS) • Routing policies – Simple – Latency
  • 33.
  • 34. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 35. Tech – Fastly / Varnish (1) Internet Varnish Backend Server
  • 36. Tech – Fastly / Varnish (2) • hosted Varnish solution • „distributed“ Varnish • complete purge support • complete VCL support • Magento implementation – Phoenix PageCache for Magento – implement Fastly API
  • 37. Tech – Fastly / Varnish (3) • pages HAVE to be fully cacheable • hole-punching: negative performance impact • go for AJAX • store information locally (HTML5 local storage, cookies)
  • 38. Tech – Fastly / Varnish (4) • Examples: – recently viewed products – amount of products in basket • might need layout changes • use some form of pre-caching • normalize user agents (!)
  • 39. Proposed Infrastructure Route 53 Fastly BE ELB FE ELB BE Array FE Array Job Array RDS Additional Services ELBs EC2s
  • 40. Tech - S3 / CloudFront (1) • do not use local storage for persistent data • do not use EBS for persistent data • S3 is available to all instances • will host – CMS uploaded files (static pages) – product images – image caches
  • 41. Tech - S3 / CloudFront (2) • great for write-heavy operations (save) • slow for read-heavy operations – use CloudFront • Magento implementation: – OnePica ImageCDN – custom code for backend data storage
  • 42. Tech - S3 / CloudFront (3) • Magento provides 2 data storages – file based storage – database based storage • rewrite database storage to use aws-php-sdk • combine with OnePica extension
  • 43. Tech - S3 / CloudFront (4) Internet Instance Backend Fetch image / Storage generate cache http://…/cache/test.jpg
  • 44. Tech - S3 / CloudFront (5) Cloud Front S3 Save cache to S3 Internet Instance Backend Fetch image / Storage generate cache http://…/cache/test.jpg
  • 45. Tech – Elasticache • will be used for – Session storage http://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git – Block Level Cache http://github.com/colinmollenhour/Cm_RedisSession.git • we will use Redis – > memcache – distributable by default – true key-value store
  • 46. Tech – Search • slow on large catalogues • Elasticsearch (Bubblesearch) / Solar • offload search traffic to dedicated service /server
  • 47.
  • 48. Security • use VPCs (now per default) • don’t assign public IPs to your servers • don’t use public RDS distributions • set strict security groups • use VPN to connect to your infrastructure – AWS Direct Connect – small EC2 instance that runs VPN service – only VPN servers should have external IPs
  • 49. Tech – Rollouts (1) • previously: – Capistrano – rpm packages – git pull – svn up • now: server names might be unknown
  • 50. Tech – Rollouts (2) • Options – bake an AMI for every change – use messaging systems to roll out releases across servers (ActiveMQ etc.) • use a Capistrano-like system to ensure fast rollbacks if needed
  • 51. Tech – Rollouts (3) • always aim for a 1-click deployment • use Jenkins etc. to build/verify your project • OS Packages – bake AMIs every time you want to install something – use puppet master/client architecture
  • 52. Step 2 - Infrastructure (1) • go a step further: automate your infrastructure • quickly build new test environments • quickly move to another provider if needed • automatically document your infrastructure • “check in” your infrastructure
  • 53. Step 2 - Infrastructure (2) • build your base AMI with packer • use same CM tools and classes as for test environment • use tech such as – Fog (http://fog.io) – build-cloud (https://github.com/scalefactory/build-cloud)
  • 54. Thanks! • Check out the demos on – https://github.com/Fireflake/tech4africa • Get in touch – http://www.linkedin.com/pub/florian-aschenbrenner/ 79/368/566

Notas do Editor

  1. you just managed to get a rented VM space Lowering TCO High Availability Scalability Automation Reproducibility
  2. in my experience C3 > M3 for frontend server M1 as a cheap alternative for backend server
  3. Reserved IOPS vs. Standard Storage (±100 IOPS with spikes) Reserved IOPS start at 1000 IOPS (no spikes, each page read/write 1 IOP, > 16KB = multiple IO requests) Queue Depth of 5 per 1000 IOPS is good Queue Depth of 1-2 IOPS for standard storage
  4. further optimizations need to be done table_cache etc. be wary about changes from mysql 5.5 to 5.6 (query execution plans)
  5. 4 redundant DNS servers („Delegation Set“)
  6. Crawlers/Bots will pre-cache your store
  7. do not use local storage for persistent data turning off an instance will loose you data! do not use EBS for persistent data same as introducing NFS -> slow!
  8. CloudFront s3 meta data needs to be correct
  9. configure „origin-pull“ from s3 buckets
  10. Memcache: not persistent! Redis: very easy garbage collection circumvents core_cache_tags table