Part 3: Improved Caching and Searching

This section will focus in on two key areas where Drupal can benefit from third party integration, caching and searching. Many of these advanced topics will require patching Drupal's core.

Chapter 14: Reverse Proxies

This chapter explores the usage of reverse proxies, adding additional layers of caching to your web infrastructure. It explains how this improves both performance and scalability. It then looks at several specific reverse proxy options, and their configurations, including Squid, Varnish, and Apache's mod_proxy.

  1. Reverse Proxy Architecture
  2. The Benefits Of Reverse Proxies
    1. Performance
    2. Scalability
    3. Layered Caching
  3. Selecting and Configuring a Reverse Proxy
    1. Squid
    2. Varnish
    3. Apache and mod_proxy

Chapter 15: Integrating Third Party Caches

This chapter introduces the concept of integrating Drupal with a third-party cache. It will examine the use, advantages and limitation of file-based caches. It will also review the use, advantages and limitations of using PHP opcode caches for caching other content. The chapter will detail the many projects helping with this integration, explaining their configuration and use. It will also review the many patches available for improving Drupal's caching, including the advcache project, block caching, and improved taxonomy caching. Finally, the chapter will provide an initial introduction to memcached.

  1. File caches
    1. Boost module
    2. Fastpath_fscache
    3. Cache Coherency
  2. Patching Drupal
    1. Advcache
    2. Caching Blocks
    3. Caching Taxonomy
  3. Memory caches
    1. Opcode Caches
    2. Distributed Memory Cache

Chapter 16: Caching With Memcached

This chapter will offer an in depth look at what memcache is, and how it improves both website performance and scalability. It will look at how memcache achieves its performance, reviewing the difference between hash tables and databases, and explaining how memcache can help websites of all sizes. This chapter will explore Drupal's contributed memcache integration module, and the patches that come with the project. It will look at how to modify Drupal so anonymous pages can be served directly out of RAM, and so pages for logged-in users can be assembled from objects stored in RAM. Finally, it will look at the areas in Drupal that most benefit from memcached integration.

  1. Memcache Background
    1. LiveJournal.com
    2. Hash Table Lookups
  2. Infrastructure Design
    1. Spare RAM
    2. Distributed Caching
    3. Failing Servers
    4. Memcache Clusters
  3. Memache Module
    1. Overview
    2. Base Features
    3. Administration
    4. Advanced Features
  4. Beyond Core
    1. Finding Good Candidates For Caching
    2. Memcache Integration
    3. Common Mistakes
    4. AdvCache project

Chapter 17: Drupal's Search Module

This chapter will explore how Drupal's search module works, explaining limitations introduced by the fact that SQL was not designed as a searching language. It will discuss how to get the best performance out of Drupal's search module, and how to know when it's time to look consider other alternatives. This chapter will mostly look at search in Drupal 6, but will take a brief look at why an improved search API is likely to be one of the killer features in Drupal 7.

  1. Search Module Design
    1. Background
    2. Searching With SQL
  2. Performance Bottlenecks
    1. InnoDB Performance
    2. When To Replace
  3. Searching Drupal's Future
    1. Search API in Drupal 7
    2. Introducing Third Party Search Integration

Chapter 18: Searching With Xapian, Sphinx & Solr

Xapian and Sphinx are two unrelated standalone search technologies written in C++. This chapter will explain how Xapian supports real time indexing and exposes extremely flexible APIs, while Sphinx offers lightening fast search performance. It will also explore using the Java based Solr search engine, discussing the steeper requirements and its flexible, advanced feature set. This chapter will detail how each solution can be integrated into a Drupal website, replacing or enhancing Drupal's core search functionality.

  1. Xapian
    1. Background
    2. Strengths
    3. Weaknesses
    4. Benchmarks
    5. Integration
  2. Sphinx
    1. Background
    2. Strengths
    3. Weaknesses
    4. Benchmarks
    5. Integration
  3. Solr
    1. Background
    2. Strengths
    3. Weaknesses
    4. Benchmarks
    5. Integration