13
Scaling Drupal “UnDrupaling Drupal” Michael T. Smith Thrillist October 4, 2011

Making Startups Work: Scaling Drupal for Thrillist.com

Embed Size (px)

DESCRIPTION

My presentation from the "Making Startups Work" panel on October 4, 2011 in NYC. I presented about how we scaled Drupal to work for our traffic and our requirements.

Citation preview

Page 1: Making Startups Work: Scaling Drupal for Thrillist.com

Scaling Drupal“UnDrupaling Drupal”

Michael T. SmithThrillist

October 4, 2011

Page 2: Making Startups Work: Scaling Drupal for Thrillist.com

Drupal 5 to 6• Two month rebuild;

October to December 2010• Converted >50 modules to D6;

20+ new modules• 8gb+ database:

2.3m nodes, 3m+ user records

Page 3: Making Startups Work: Scaling Drupal for Thrillist.com

Our Mindset:“UnDrupaling Drupal”• Ethan Kaplan, former VP Emerging Tech

@ Warner Bros. Entertainment Group• 120 artist sites

• Out of the box: Not able to scale• Huge issues with loading node objects

from DB• Hooks are nice, but can allow too much to

load

Page 4: Making Startups Work: Scaling Drupal for Thrillist.com

MongoDB• MySQL & node_load

• Every module potentially called• Huge overhead• Mongo:

• Fast lookup, fast results• Not for user records

Page 5: Making Startups Work: Scaling Drupal for Thrillist.com

MongoDB

Page 6: Making Startups Work: Scaling Drupal for Thrillist.com

MongoDB

Page 7: Making Startups Work: Scaling Drupal for Thrillist.com

Memcached• Cache All The Things!• Memcached with bins set up for page,

content, mobile data and blocks

• Default page and block cache, kinda• Edition and Logged In states

• Special keys for edition content• Case:

Viewing NY article from ATL “edition”

Page 8: Making Startups Work: Scaling Drupal for Thrillist.com

SCSS &Clean Theming

• Holy disgusting code, Batman• Old jQuery version—updated• Custom theme functions

• Preprocessors to clean• Compass:

• Auto-generated sprites• Auto-minimized code• UberTags

Page 9: Making Startups Work: Scaling Drupal for Thrillist.com

Users & Stats• Huge data, huge concern, huge codebase• Extremely custom marketing and promo

system for signups

• No default signups• Customized modules for mixing

forms/surveys• Reporting is a challenge—separate

systems for reporting and data dumps, all based “around” Drupal

Page 10: Making Startups Work: Scaling Drupal for Thrillist.com

API• Two servers:• One for people• One for machines

• Services module for JS requests• Future? DB as datastore, Drupal only for

serving content to people

Page 11: Making Startups Work: Scaling Drupal for Thrillist.com

Idempotence• Make as much as possible repeatable

without harm• Not perfectly idempotent, but close

enough• Mainly user systems

• Thrillist/JackThreads/Rewards subscriptions updates are queued

Page 12: Making Startups Work: Scaling Drupal for Thrillist.com

People• Team• RackSpace• MongoHQ

Page 13: Making Startups Work: Scaling Drupal for Thrillist.com

Thanks!(questions?)