SlideShare a Scribd company logo
Scaling Drupal on
Amazon Web Services
Tristan Roddis
DrupalCamp Brighton, January 2015
What we created: www.qdl.qa
2
3
4
5
• Several hundred thousand pages
• Tens of terabytes of data
• Requirement for high throughput
• Requirement for high resilience
6
What is Drupal?
7
Let’s scale it!
8
Let’s not scale it like this!
9
Centralised database
10
Centralised filesystem
11
Avoid single point of failure
12
AWS TLAs
• EC2 – Elastic Compute Cloud = virtual servers
• RDS – Relational Database Service = database
• ELB – Elastic Load Balancer = distribute requests
13
Therefore…
14
RDS has easy redundancy
15
So now we have
16
Clustered filesystem: GlusterFS
17
GlusterFS components
• EBS – Elastic Block Storage
= file storage up to 1Tb
• LVM – Logical Volume Manager
= grow and shrink volumes
• Gluster has storage ‘bricks’
• Cluster appears as single mount point
(NFS, Gluster protocol etc.)
18
Distribute servers
• Amazon has different Regions and
Availability Zones
19
Use different Availability Zones
20
I lied…
21
Adding Solr and IIPImage…
22
Additional security
• VPC – Virtual Private Cloud = can create your
own network architecture
• Security Groups = firewall rules
• IAM = Identity and Access Management =
restrict AWS roles
23
Final setup
24
Woah – that’s complicated
25
Server provisioning
• Automate everything!
• Use Ansible (or Chef, Puppet, etc.)
26
“If you have to SSH into your servers,
then your automation has failed.”
— Rich Adams
27
Pets vs cattle
28
“When one of them gets sick, you shoot
'em in the head and replace 'em with a
new one.”
—Randy Bias, CEO of Cloudscaling
Deployment I: Drupal tools
• Drush
• Drush master
• Features
• Strongarm
29
Deployment II
• Use Fabric (or Ansible, Capistrano, etc.)
• @runs_once decorator for e.g. drush commands.
30
Load Test
• Jmeter
• Blitz.io or similar
31
Tune performance
• Tools: Apache Benchmark (ab), Yslow, Google
PageSpeed
• xhprof – remove bottlenecks
• Fix warnings and notices
• Disable database logging
• OpCode cache (Zend Optimizer, APC)
• Minify CSS/JS
• Lazy Loading via AJAX
32
33
Add caching
• Varnish
• Redis/memcached for cache tables (can use
Amazon Elasticache)
• CDN (e.g. Amazon Cloudfront)
• Re-run load tests
34
[auto]scaling
• AMIs = Amazon Machine Image
• Autoscaling policies
• “pets versus cattle” again
• Problem: servers must have latest Drupal code
• Conflict with Fabric 'push‘ technique
• Interim solution: create an AMI after
each deployment
35
Backup
• AMIs - Amazon Machine Image = snapshot
server images
• ELB snapshots
• S3 – Simple Storage Service = REST storage
• Glacier = long-term storage
• We used:
– Snapshots with RDS
– S3 with versioning, plus Glacier for Drupal
assets and image assets
36
Monitoring I: Cloudwatch alerts
37
Monitoring II: log analysis
• SumoLogic to aggregate logs (or Loggly,
Papertrail, etc.)
38
Monitoring III: notifications
• OpsGenie (or PagerDuty or similar)
39
Gotchas
• GlusterFS for PHP files – don’t!
• Custom Drupal cache – careful of
uncontrolled growth!
40
Tips
• Use “termination protection”
• Enable ELB logging
• “Maintenance 200” module
• Create a “down for maintenance” server
41
Conclusion
• 21 instances
• 6 load balancers
• 67 ELB volumes
• Lot of work to set up, but quick to alter
• Easily coped with launch traffic:
– 21k sessions/day
– peak of 350 concurrent users
42
Further Reading
• Justin Slattery, "Multiple Region Autoscaling
Drupal in Amazon Web Services"
http://dev.mlsdigital.net/posts/Cloud-Native-
Drupal/
• Rich Adams, "AWS Tips I Wish I'd Known Before
I Started" https://wblinks.com/notes/aws-tips-i-
wish-id-known-before-i-started/
• Laura Hamilton, "Are your servers pets or
cattle?" http://www.lauradhamilton.com/servers-
pets-versus-cattle
43
www.cogapp.com/careers
Questions?
• tristanr@cogapp.com
45

More Related Content

ODP
Hosting Drupal on Amazon EC2
PDF
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
PPT
Scaling drupal horizontally and in cloud
PDF
Amazon Web Services Building Blocks for Drupal Applications and Hosting
PDF
Scaling Drupal in AWS Using AutoScaling, Cloudformation, RDS and more
PPTX
Scaling Drupal & Deployment in AWS
ODP
AutoScaling and Drupal
PDF
Webapp on AWS
Hosting Drupal on Amazon EC2
Rich storytelling with Drupal, Paragraphs and Islandora DAMS
Scaling drupal horizontally and in cloud
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Scaling Drupal in AWS Using AutoScaling, Cloudformation, RDS and more
Scaling Drupal & Deployment in AWS
AutoScaling and Drupal
Webapp on AWS

What's hot (15)

PPTX
Migrate Oracle database to Amazon RDS
PDF
Scaling drupal on amazon web services dr
ODP
Puppetpreso
PPTX
Kubernetes at Spreadshirt - First steps to production
PDF
Running Cassandra in AWS
PDF
Cloud hosting survey
PPTX
Utah Codecamp Cloud Computing
PDF
Deep Learning with AWS (November 2016)
PPTX
Windows Azure Virtual Machines
PDF
Cloud Computing: AWS for Lean Startups
PPTX
storage on windows azure
PPTX
Scalable On-Demand Hadoop Clusters with Docker and Mesos
PPTX
Windows Azure Caching
PPTX
Cloud Storage in Azure, AWS and Google Cloud
PPTX
Microsoft Azure Media Services
Migrate Oracle database to Amazon RDS
Scaling drupal on amazon web services dr
Puppetpreso
Kubernetes at Spreadshirt - First steps to production
Running Cassandra in AWS
Cloud hosting survey
Utah Codecamp Cloud Computing
Deep Learning with AWS (November 2016)
Windows Azure Virtual Machines
Cloud Computing: AWS for Lean Startups
storage on windows azure
Scalable On-Demand Hadoop Clusters with Docker and Mesos
Windows Azure Caching
Cloud Storage in Azure, AWS and Google Cloud
Microsoft Azure Media Services
Ad

Viewers also liked (16)

PPTX
Improving Drupal Performances
PDF
Drupal for Higher Education and Virtual Learning
PPTX
Designing enterprise drupal
PPTX
Large Scale Drupal - Behind the Scenes
PPTX
Better editorial experience in Drupal 7
PDF
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
PPTX
Drupal 8 Development at the Speed of Lightning (& BLT)
PPTX
Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...
PDF
Open Y: One Digital Platform for all YMCAs
PDF
A Future-Focused Digital Platform with Drupal 8
PDF
Deploying and managing Solr at scale
PDF
How to Optimize Your Drupal Site with Structured Content
PPTX
Drupal Continuous Integration with Jenkins - The Basics
PPTX
Benchmarking Solr Performance at Scale
PDF
High Performance Drupal
PDF
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Improving Drupal Performances
Drupal for Higher Education and Virtual Learning
Designing enterprise drupal
Large Scale Drupal - Behind the Scenes
Better editorial experience in Drupal 7
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Drupal 8 Development at the Speed of Lightning (& BLT)
Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...
Open Y: One Digital Platform for all YMCAs
A Future-Focused Digital Platform with Drupal 8
Deploying and managing Solr at scale
How to Optimize Your Drupal Site with Structured Content
Drupal Continuous Integration with Jenkins - The Basics
Benchmarking Solr Performance at Scale
High Performance Drupal
Hack Into Drupal Sites (or, How to Secure Your Drupal Site)
Ad

Similar to Scaling Drupal on Amazon Web Services (DrupalCamp Brighton) (20)

PDF
[Jun AWS 201] Technical Workshop
PPTX
REDSHIFT - Amazon
PDF
Training AWS: Module 8 - RDS, Aurora, ElastiCache
PDF
AWS Lambda at JUST EAT
PDF
Big data on aws
PPTX
Migrating enterprise workloads to AWS
PDF
MySQL in the Hosted Cloud
PPTX
Oracle Solutions on AWS : May 2014
PDF
Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)
PPTX
Cloud Architecture: Patterns and Best Practices
PPTX
Riga dev day: Lambda architecture at AWS
PPTX
Aws best practices
PDF
Swift at Scale: The IBM SoftLayer Story
PPTX
Scaling horizontally on AWS
PPTX
Data Analysis on AWS
PDF
Introduction to AWS
PDF
MySQL in the Cloud
PDF
데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
Docker clusters on AWS with Amazon ECS and Kubernetes
PPTX
Auto scaling websites in the cloud
[Jun AWS 201] Technical Workshop
REDSHIFT - Amazon
Training AWS: Module 8 - RDS, Aurora, ElastiCache
AWS Lambda at JUST EAT
Big data on aws
Migrating enterprise workloads to AWS
MySQL in the Hosted Cloud
Oracle Solutions on AWS : May 2014
Study Notes - Architecting for the cloud (AWS Best Practices, Feb 2016)
Cloud Architecture: Patterns and Best Practices
Riga dev day: Lambda architecture at AWS
Aws best practices
Swift at Scale: The IBM SoftLayer Story
Scaling horizontally on AWS
Data Analysis on AWS
Introduction to AWS
MySQL in the Cloud
데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Docker clusters on AWS with Amazon ECS and Kubernetes
Auto scaling websites in the cloud

More from Cogapp (20)

PPTX
When automated analysis goes wrong
PPTX
Thinking Through Digital: Top tips for designing projects and working with te...
PDF
Digital Strategy for Museums 2016
PPT
Challenges and opportunities for presenting Arabic manuscripts online
PPTX
Creating compelling user interfaces
PPTX
Everything you ever wanted to know about IIIF but were too afraid to ask
PDF
MW16 IIIF: Unshackle Your Images
PDF
Transform your museum with Agile
PDF
Digital: from Idea to Audience - Opportunities for Digital Excellence with a ...
PDF
IIIF The International Image Interoperability Framework at MCN2015
PDF
Making Meaning with Online Collections: Ten Top Tips
PDF
Agile for Beginners and Thrillseekers - MuseumNext 2015 Geneva
PDF
Building Multilingual Websites with Drupal (DrupalCamp Brighton)
PDF
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
PDF
Rich storytelling with Drupal, Paragraphs and Islandora DAMS (DrupalCamp Brig...
PDF
Leading Digital Transformation in the Cultural Sector: A resource for managers
PDF
MuseumNext 2014: Masterclass. Opportunities for digital excellence with a lit...
KEY
Cogapp's World Usability Day Slides
KEY
Cogapp Open Studios 2012 - Rethinking Interfaces
PPTX
Cogapp Open Studios 2012 - Adventures with Linked Data
When automated analysis goes wrong
Thinking Through Digital: Top tips for designing projects and working with te...
Digital Strategy for Museums 2016
Challenges and opportunities for presenting Arabic manuscripts online
Creating compelling user interfaces
Everything you ever wanted to know about IIIF but were too afraid to ask
MW16 IIIF: Unshackle Your Images
Transform your museum with Agile
Digital: from Idea to Audience - Opportunities for Digital Excellence with a ...
IIIF The International Image Interoperability Framework at MCN2015
Making Meaning with Online Collections: Ten Top Tips
Agile for Beginners and Thrillseekers - MuseumNext 2015 Geneva
Building Multilingual Websites with Drupal (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Rich storytelling with Drupal, Paragraphs and Islandora DAMS (DrupalCamp Brig...
Leading Digital Transformation in the Cultural Sector: A resource for managers
MuseumNext 2014: Masterclass. Opportunities for digital excellence with a lit...
Cogapp's World Usability Day Slides
Cogapp Open Studios 2012 - Rethinking Interfaces
Cogapp Open Studios 2012 - Adventures with Linked Data

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
Empathic Computing: Creating Shared Understanding
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Review of recent advances in non-invasive hemoglobin estimation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Weekly Chronicles - August'25 Week I
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)