Drupaldelphia 2013 was held at the Pennsylvania Convention Center in Philadelphia, PA last Friday, October 11. Here are my notes from the sessions I attended.
Scaling NASA.gov with AWS
– NASA.gov gets more traffic than CNN and the Grammy’s combined during major events e.g. during the Mars Rover NASA.gov amassed – Over 500 million hits in 3 days.
– Drupal was only used for the backend.
– AWS was cheaper than Akamai
– No search engine, no authenticated users.
– Users don’t touch Drupal, they are served content from S3/Cloudfront.
– Created a VBO to mass publish content. Cron jobs check in with SQS to publish content every 15 seconds. This means content isn’t published immediately.
– Cron was used to create static files from feeds.
– Cron is its own beefy EC2 instance.
– Invalidating content is/was hard (read: expensive). Solution? Invalidate content by pushing out cache invalidation headers to S3.
– S3 errors can be cached in Cloudfront, which is a problem. Sometimes 404s were cached. Sometimes content was cached before images were loaded on the page. This lead to pushing images to S3 before publishing the content.
– Why not use varnish instead of all this complexity? The complexity ended up being cheaper.
– This solution would not have been possible if there were authenticated users.
AWS specific notes:
– Utilized EC2, auto scaling, ELB, S3, SQS, RDS, and CloudFront.
– Created a very large custom module that tied all of these services together.
– Everything is a static file (no server side scripting).
– Everything is stored in S3 buckets.
– Anything that needs server side processing (e.g. forms) live in a separate Drupal instance.
– A drush extenstion.
– Works with Acquia.
– Lets you sync site environments with your localhost.
– Becomes pretty useful with the use of the Fetcher Services extension.
– Has an opinionated way of setting up your directory structure.
– Has its own hook system
Are You Testing Me?
Unit testing is good!
Behavioral testing is good, too!
– Behat is a behavior driven development test utility.
– Gherkin is the language you write Behat tests in.
– And the Behat Drupal module allows for Drupal integration.
– Code quality testing tools: PHPLOC, PHP mess detector, PHP Code sniffer.
– A good resource for PHP QA resources: The PHP QA Toolchain
Managing Deployments with Git and Install Profiles
– Development servers are for finding conflicts in code.
– Staging servers are for testing configurations and should replicate production as closely as possible.
– Anything affected by the end user is considered content.
– Use install profiles to package site configurations together.
Proviso: Vagrant based development STANDARDIZED!
– Aims to be an SDK+API to provision platform-independent local VMs for Drupal development.
– Does not really exist yet, more of a vaporware session.
– There is a github repo available.
– But there is also a more useful repo provided by Howard/Zivtech.
– Wants to be the TodoMVC of configuration management.