0
Drupal for the Enterprise




Seminar by DPCI featuring Dries Buytaert
Michael Mainiero, and Jeff Rigby
Thursday, October ...
Drupal for the Enterprise




Presented by Jeff Rigby
Web Application Architect, DPCI
Thursday, October 29th, 2009




   ...
Goals of this Presentation
          Describe how to scale Drupal from an out-of-box
          build to an enterprise leve...
Scaling Drupal
          Anonymous is easy to scale
            — Mirror servers
            — Reverse-Proxy caches
      ...
Built In Options
          Configuration
            — Drupal page/block cache
            — Page compression
            ...
Built In Options Results
                      4.8
      Auth
                      4.8



                               ...
Quick Optimizations
          Boost
          Memcached
          Opcode Cache




©2009 DPCI. All Rights Reserved.
Boost
          Amazing performance gain
          Anonymous users only
          Serves static files
          No additio...
Memcached
          Easy to install on the server
          Minor module configuration
          Removes the cache from th...
Opcode Cache
    — A few out there (APC, Zend Optimizer, XCache,
      eAccelerator)
    — Easy to install
    — Pre-compi...
Combined Results
                   15.1
     Auth
                  4.8



                                              ...
MySQL Tweaks
          Tune your MySQL configuration to your server.
          MySQL Tuner is very useful:
          http:...
Apache SOLR
          Module provides drop-in replacement for search
          Gets search out of Drupal
          Avoids ...
Reverse-Proxy Cache
          Squid or Varnish
          Run on the same server or clustered on multiple
          externa...
Reverse-Proxy Cache




©2009 DPCI. All Rights Reserved.
Use a CDN
          Many options out there: Akamai, Amazon, CacheFly
          Generally easy to setup
          Off-load ...
Static Page Tips
          Javascript!
          Store dynamic values in a cookie
          Use AJAX to load small portion...
Load Balanced Web Servers
          Use rsync to keep Web servers synched or NFS web
          root
          Advanced loa...
Multiple MySQL Databases
          Master / Slave Setup
            — Minimum of 2 servers
            — Drupal 5 and 6 re...
Sample Large Scale Site




©2009 DPCI. All Rights Reserved.
Scaling Drupal


  Questions?
                   Jeff’ s Blog:
        www.databasepublish.com/blog/jrigby




©2009 DPCI....
Upcoming SlideShare
Loading in...5
×

Jeff Rigby on Scaling Drupal in the Enterprise

1,668

Published on

Presentation by Jeff Rigby held Thursday, October 29th, 2009 at DPCI Seminar on Drupal in the Enterprise

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,668
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
35
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Jeff Rigby on Scaling Drupal in the Enterprise"

  1. 1. Drupal for the Enterprise Seminar by DPCI featuring Dries Buytaert Michael Mainiero, and Jeff Rigby Thursday, October 29, 2009 © 2009 DPCI. All Rights Reserved.
  2. 2. Drupal for the Enterprise Presented by Jeff Rigby Web Application Architect, DPCI Thursday, October 29th, 2009 © 2009 DPCI. All Rights Reserved.
  3. 3. Goals of this Presentation Describe how to scale Drupal from an out-of-box build to an enterprise level solution Explain some of the approaches DPCI has used with our clients to meet their scaling needs ©2009 DPCI. All Rights Reserved.
  4. 4. Scaling Drupal Anonymous is easy to scale — Mirror servers — Reverse-Proxy caches — Drupal only manages the content Authenticated traffic is more difficult — Each dynamic page must be processed by PHP — Requires more horsepower ©2009 DPCI. All Rights Reserved.
  5. 5. Built In Options Configuration — Drupal page/block cache — Page compression — Aggregate JS/CSS Coding — Drupal cache (use it!) — Use static variables when possible Immediately usable with no additional modules ©2009 DPCI. All Rights Reserved.
  6. 6. Built In Options Results 4.8 Auth 4.8 Optimized 96.5 OOB Anon 5.8 0 20 40 60 80 100 120 Requests Per Second ©2009 DPCI. All Rights Reserved.
  7. 7. Quick Optimizations Boost Memcached Opcode Cache ©2009 DPCI. All Rights Reserved.
  8. 8. Boost Amazing performance gain Anonymous users only Serves static files No additional software or hardware needed ©2009 DPCI. All Rights Reserved.
  9. 9. Memcached Easy to install on the server Minor module configuration Removes the cache from the database Optionally removes session tracking from the database Significantly reduces MySQL statements ©2009 DPCI. All Rights Reserved.
  10. 10. Opcode Cache — A few out there (APC, Zend Optimizer, XCache, eAccelerator) — Easy to install — Pre-compiles PHP in memory — Reduces server load ©2009 DPCI. All Rights Reserved.
  11. 11. Combined Results 15.1 Auth 4.8 Optimized 427 OOB Anon 5.8 0 100 200 300 400 500 Request Per Second ©2009 DPCI. All Rights Reserved.
  12. 12. MySQL Tweaks Tune your MySQL configuration to your server. MySQL Tuner is very useful: http://blog.mysqltuner.com Enable the query cache! Enable the slow query log to spot problem queries ©2009 DPCI. All Rights Reserved.
  13. 13. Apache SOLR Module provides drop-in replacement for search Gets search out of Drupal Avoids expensive node_load() calls Available as a hosted solution from Acquia ©2009 DPCI. All Rights Reserved.
  14. 14. Reverse-Proxy Cache Squid or Varnish Run on the same server or clustered on multiple external servers Can reduce web server traffic by 90%+ if serving the entire site (anonymous traffic) For dynamic sites, offload all static files (JS, CSS, images, etc.) and let Apache focus on PHP Low overhead Tip: Override the expires header ( — Expires: Sun, 19 Nov 1978 05:00:00 GMT ©2009 DPCI. All Rights Reserved.
  15. 15. Reverse-Proxy Cache ©2009 DPCI. All Rights Reserved.
  16. 16. Use a CDN Many options out there: Akamai, Amazon, CacheFly Generally easy to setup Off-load entire site or only static files (JS, CSS, images, etc.) Can be expensive ©2009 DPCI. All Rights Reserved.
  17. 17. Static Page Tips Javascript! Store dynamic values in a cookie Use AJAX to load small portions of dynamic content Use Javascript to replace dates with natural language “About 4 Minutes Ago” ©2009 DPCI. All Rights Reserved.
  18. 18. Load Balanced Web Servers Use rsync to keep Web servers synched or NFS web root Advanced load balancers can handle server failures Easy to add or remove servers with no site downtime Run server intensive tasks (cron, data import, etc.) on an internal server to avoid site slow downs ©2009 DPCI. All Rights Reserved.
  19. 19. Multiple MySQL Databases Master / Slave Setup — Minimum of 2 servers — Drupal 5 and 6 require minor core hacks — Built into Drupal 7! — Be mindful of database lag — Reliant on master database Use Memcached to share the query cache across all servers Clustering and distributed configurations ©2009 DPCI. All Rights Reserved.
  20. 20. Sample Large Scale Site ©2009 DPCI. All Rights Reserved.
  21. 21. Scaling Drupal Questions? Jeff’ s Blog: www.databasepublish.com/blog/jrigby ©2009 DPCI. All Rights Reserved.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×