+ All Categories
Home > Technology > DrupalCon 2014: A Perfect Launch, Every Time

DrupalCon 2014: A Perfect Launch, Every Time

Date post: 15-Jan-2015
Category:
Upload: pantheon
View: 404 times
Download: 0 times
Share this document with a friend
Description:
Launching websites is hard. In the rush of last-minute changes, something always breaks. How could you have known the caching settings were mis-configured? Or maybe it’s the database. Your team is working overtime, but it’s already too late. Don’t let your site be one of the 60% of Drupal sites that launch late. Take steps now to lock in a perfect launch, every time. The Pantheon Launch Team launches several enterprise sites everyday, and supports hundreds of self-serve customers daily. In this platform-agnostic session, you’ll learn best practices and tools for rooting out problems and doubling site performance by launch day (whether you use PaaS, shared hosting, or your own hardware). You’ll learn: How to lead an agile, coordinated launch with project managers, stakeholders, developers, sysadmins—without spending months herding cats What causes 80% of website slowdowns and other problems—and how to obliterate surprises Top tools for benchmarking your performance and capacity Why you need a cache strategy if you care about performance—and specific things to think about before you configure your settings When to automate the launch prep—and when to call on an expert pair of eyes
Popular Tags:
43
A Perfect Launch, Every Time DrupalCon Austin 2014
Transcript
Page 1: DrupalCon 2014: A Perfect Launch, Every Time

A Perfect Launch,

Every Time

DrupalCon Austin 2014

Page 2: DrupalCon 2014: A Perfect Launch, Every Time

What is a perfect launch?

● Schedule - On Time

● Cost - On Budget

● Scope - On Plan

Page 3: DrupalCon 2014: A Perfect Launch, Every Time

Why should you care?

Page 4: DrupalCon 2014: A Perfect Launch, Every Time

A Perfect Launch Recipe

● Launch Team - Onboarding

● Launch Check - Best Practices

● Load Test - Performance Tuning

Page 5: DrupalCon 2014: A Perfect Launch, Every Time

Launch Team

Onboarding

Page 6: DrupalCon 2014: A Perfect Launch, Every Time

How we prepare for launch

● Goal: Get rid of all the “uh-oh” moments

● Method: Launch Team

● Stakeholders:

o Project Manager - scheduling, best practices

o Developer - platform knowledge, integration

o Sys Admin - responsibilities, delegation

o Business owner - flawless launch

Page 7: DrupalCon 2014: A Perfect Launch, Every Time

Have a system and tools

● Specify common workflow requirements

o Repeatable tasks, delegatable

● Project management - Wrike, JIRA, Redmine

● Orientation logistics

o Scheduling - calendar, deadlines

o Real-time communication

Phone, Video Conference, GoToMeeting, IRC

o Training - documentation, Slides, Videos

Page 8: DrupalCon 2014: A Perfect Launch, Every Time

Mapping the terrain

● Scoping of responsibilities

o Reduce confusion, set stage

● Channels of communication

o Define emergency procedures

o Issue tracking as primary inbox

● Staying in touch

o Available, open, and regular

o Proactive

Page 9: DrupalCon 2014: A Perfect Launch, Every Time
Page 10: DrupalCon 2014: A Perfect Launch, Every Time

Launch Check

Best Practices

Page 11: DrupalCon 2014: A Perfect Launch, Every Time

What is Site Audit?

● Drupal 7 static analysis

o https://drupal.org/project/site_audit

● Best practices

● Actionable report

● Vendor agnostic

o Optional Pantheon specific recommendations

Page 12: DrupalCon 2014: A Perfect Launch, Every Time

What can an audit analyze?

● Drupal caching settings

● Codebase and file size

● Database structure

● Modules, including duplicate / missing

● Non-standard code structures

● Views caching

● Watchdog logs

Page 13: DrupalCon 2014: A Perfect Launch, Every Time
Page 14: DrupalCon 2014: A Perfect Launch, Every Time

Drupal caching settings

Page 15: DrupalCon 2014: A Perfect Launch, Every Time

Drupal cron

Page 16: DrupalCon 2014: A Perfect Launch, Every Time

Drupal’s database

Page 17: DrupalCon 2014: A Perfect Launch, Every Time

Extensions (modules & themes)

Page 18: DrupalCon 2014: A Perfect Launch, Every Time

Views

Page 19: DrupalCon 2014: A Perfect Launch, Every Time

Watchdog

Page 20: DrupalCon 2014: A Perfect Launch, Every Time

● Simple Drupal 7 site

● Apache Bench

○ 10,000 requests to home page (5 concurrent)

● Warmed cache, cleared watchdog

● Comparison

○ Bad config, 1 PHP notice and warning in theme

○ Good config, no PHP notices or warnings

Test Configuration

Page 21: DrupalCon 2014: A Perfect Launch, Every Time

Result? Doubled performance.

Bad config, errors

● 20 min, 52 sec

● Requests per second: 7.98

● Time per request: 626.192 ms

Good config, no errors

● 10 min, 25 sec

● Requests per second: 15.99

● Time per request: 312.780 ms

Page 22: DrupalCon 2014: A Perfect Launch, Every Time

Good configuration matters.

Page 23: DrupalCon 2014: A Perfect Launch, Every Time

Load Testing

Performance Tuning

Page 24: DrupalCon 2014: A Perfect Launch, Every Time

Why load test?

● Validate response times under peak load

● Smoke - operations under normal load

● Stress - behavior past peak load

o Spike - short bursts

● Capacity - plan for growth

Page 25: DrupalCon 2014: A Perfect Launch, Every Time

Who should execute load tests?

● Developers execute

● Involve stakeholders

Page 26: DrupalCon 2014: A Perfect Launch, Every Time

Tools for load testing

● DIY and simple

o Apache Bench

● Complex / dynamic

o Apache JMeter

o Load Impact

o Load Storm

Page 27: DrupalCon 2014: A Perfect Launch, Every Time

When should I load test?

● Baseline

● Tools

o Xdebug, Webgrind, Devel, Syslog, Watchdog, New Relic

● Incrementally during development

● Prior to launch

Page 28: DrupalCon 2014: A Perfect Launch, Every Time

Where do I perform load tests?

● Live environment

o Bandwidth

● Resource limitations

● SaaS load testing solutions

Page 29: DrupalCon 2014: A Perfect Launch, Every Time

What to expect during & after

● Benchmark often (datapoints vs aggregate)

● Be reasonable

● Numbers should dictate expectations (back-end not just Google analytics)

Page 30: DrupalCon 2014: A Perfect Launch, Every Time

Caching

● Opcode Cache

o APC, Zend Opcache, eAccelerator

● Backends

o Memcached, Redis, MongoDB, file system, APC

● Front-end caching

o Varnish, Squid, reverse-proxy CDNs

Page 31: DrupalCon 2014: A Perfect Launch, Every Time

Back-end caching

Redis: Engage!

Page 32: DrupalCon 2014: A Perfect Launch, Every Time

Front-end caching

Anonymous page caching: Disabled!

Page 33: DrupalCon 2014: A Perfect Launch, Every Time

Testing Varnish with cURL

Page 34: DrupalCon 2014: A Perfect Launch, Every Time
Page 35: DrupalCon 2014: A Perfect Launch, Every Time

PHP Slow Log

Page 36: DrupalCon 2014: A Perfect Launch, Every Time

Nginx error log

Page 37: DrupalCon 2014: A Perfect Launch, Every Time

MySQL slow log

# Tim e: 130320 7:30:26

# User@ Host: db_user[db_database] @ localhost []

# Q uery_tim e: 4.545309 Lock_tim e: 0.000069 Row s_sent: 219 Row s_exam ined: 254

SET tim estam p= 1363779026;

SELECT option_nam e, option_value FRO M w p_options

W HERE autoload = 'yes';

Page 38: DrupalCon 2014: A Perfect Launch, Every Time

Pay attention to watchdog

6652 11/O ct 15:05 w arning php W arning: Cannot m odify header inform ation - headers already sent by (output started

at /srv/w w w /code/includes/com m on.inc:2700) in drupal_goto() (line

6643 11/O ct 14:21 notice php Notice: Trying to get property of non-object in cap_ui_preprocess_page() (line 27 of

/srv/w w w /code/sites/all/them es/cap_ui/tem plate.php).

6595 11/O ct 13:00 notice php Notice: Unknow n: Can not authenticate to IM AP server: [AUTHENTICATIONFAILED] Invalid

credentials (Failure) (errflg= 2) in m ain() (line of ).

Page 39: DrupalCon 2014: A Perfect Launch, Every Time

Good load test

Page 40: DrupalCon 2014: A Perfect Launch, Every Time

Bad load test

Page 41: DrupalCon 2014: A Perfect Launch, Every Time

Interpreting results

● Hard numbers

● Business impact

Page 42: DrupalCon 2014: A Perfect Launch, Every Time

A Perfect Launch, Every Time

Page 43: DrupalCon 2014: A Perfect Launch, Every Time

@ getpantheon

irc.freenode.net # pantheon

getpantheon.com

Thank you! Questions?


Recommended