A presentation discussing how to run a large-scale Drupal installation using Amazon Web Services (AWS). The final system is capable of serving millions of unique pages, and storing tens of terabytes of data.
First presented at DrupalCamp Brighton in January 2015. There is an hour long recording of this presentation at https://www.youtube.com/watch?v=Rh_yBzRpOnk
26. 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
35. [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
36. 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
40. Gotchas
• GlusterFS for PHP files – don’t!
• Custom Drupal cache – careful of
uncontrolled growth!
40
41. Tips
• Use “termination protection”
• Enable ELB logging
• “Maintenance 200” module
• Create a “down for maintenance” server
41
42. 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
43. 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