Part 2: Front End Performance

This second section of the book begins to look at the underlying LAMP stack, discussing how it can be optimized specifically to get the most out of Drupal. Most of the information will be presented so it is accessible to people without a background in system administration, though advanced topics will also be discussed.

Chapter 8: Optimizing PHP

This chapter will look at tuning PHP with php.ini. It will explain how to read phpinfo(), and discuss PHP's memory footprint. It will explain how PHP is compiled for each page, unless you enable an opcode cache. It will then review some of the most popular opcode caches, how they work with Drupal, and known issues and fixes.

  1. Configuring PHP
    1. What is php.ini
    2. Finding php.ini
    3. phpinfo()
  2. Tuning PHP
    1. Modifying php.ini
    2. PHP's memory footprint
    3. Disabling Unnecessary Features
  3. Writing Good Code
    1. Common Pitfalls
    2. Investment vs. Return
  4. Opcode Caches
    1. Scripting Languages
    2. APC
    3. Xcache
    4. eAccelerator
    5. The White Screen Of Death

Chapter 9: Optimizing Apache

This chapter will review how Apache can be optimized to achieve better Drupal performance. It will discuss performance oriented Apache configuration options. It will look at Apache modules, and will explore the importance of minimizing Apache's memory footprint. Finally, it will look at the various web server architectures, exploring the use of load balancers to scale out this layer.

  1. Configuring Apache
    1. httpd.conf
    2. vhosts
    3. Compression
  2. Apache Modules
    1. Performance Features
    2. Memory Considerations
    3. Load Testing
  3. Infrastructure Choices
    1. Basement Startups: All On One Server
    2. Stand Alone Web Servers
    3. Multiple Servers With Load Balancers
    4. Multiple Datacenters

Chapter 10: Alternatives To Apache

While Apache is the most popular open source web server, it's not the only open source web server. This chapter will review the advantages and disadvantages of serving pages with the most popular alternative, lighttpd. It will detail how to get Drupal up and running with lighttpd, and explore configuration options for improving performance. It will also look at using lighttpd to compliment Apache in an infrastructure, instead of replacing it. Later, the chapter will take a brief look at running Drupal on a newer and lesser known alternative, Nginx. Finally, it will also briefly explore WAMP based Drupal installs, tuning IIS on Windows.

  1. Lighttpd
    1. Feature Comparison
    2. Benchmarks
    3. Limitations
    4. Configuration
  2. Other Alternatives
    1. Nginx
    2. IIS (WAMP versus LAMP)

Chapter 11: Optimizing Your Theme

Drupal themes are what give websites their own unique look. This chapter explores the impact of creating overly complex designs with many images, CSS files, and external JavaScripts. It will take a fresh look at CSS and JavaScript aggregation, previously discussed in Chapter 2. It will also review best practices for using images, and how the size of images affects page load times. Finally, it will look at how to get a complex looking design without negatively slowing down the time it takes for each page to load.

  1. Images
    1. Multiple HTTP Requests
    2. File size
  2. CSS
    1. Inline Styles
    2. External CSS files
    3. Caching
    4. Aggregation
    5. Compression
  3. JavaScript
    1. Inline
    2. External
    3. Caching
    4. Aggregation
    5. Compression
  4. Optimizations
    1. Multiple sub-domains
    2. Browser Cookies
    3. Far-Future Expiration
    4. JQuery

Chapter 12: Content Delivery Networks

This chapter will provide background on Content Delivery Networks, or CDNs, explaining how they speed up page load times by bringing the contents of a web page physically closer to the visitor. It will examine contributed modules for quickly integrating Drupal websites with CDNs. It will also offer some insight into the pros and cons of some of the more powerful CDN services currently being offered.

  1. Background
    1. Concepts
    2. Building a mini-CDN
  2. Integration
    1. Modules
    2. Themes
  3. CDN Lineup
    1. Panther Express
    2. Akamai
    3. EdgeCast
    4. Limelight

Chapter 13: Front-end Performance Tools

There are several useful tools freely available for the open source FireFox web browser. This chapter will explore how to use FireBug to take apart and understand the elements that combine to form a web page. It will also explore the Yslow extension, detailing how to use its extremely useful performance reports. (I will research to see if similar tools are available for other browsers, and if so will also cover them in this chapter.)

  1. FireFox
    1. FireBug
    2. YSlow