Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Determine the non-localhost IP addresses for your servers. These are the IPs you would use to ping from one server to another within the cluster or behind your firewall.
  2. Follow the single-host instructions for one server in the cluster, but replace "localhost" with that server's external IP.
  3. Replace the occurrences of "$memcached_port++" with the actual port numbers.
  4. Duplicate the list of instances from "memcache_servers" once for each server in your cluster, replacing the IP address in each duplicate with the corresponding IP address of the memcached instance host.
  5. Use the exact same instance list on every host. This ordering is critical to memcached performing proper hashing.
  6. Expect to get a standard memcached configuration like this, which you should apply to the settings.php file on each Apache host:
    Code Block
    titlesettings.php (excerpt)
    $conf = array(
      'cache_inc' => './sites/all/modules/memcache/memcache.inc',
    
      'memcache_servers' => array(
        '10.0.0.1:11211' => 'default',
        '10.0.0.1:11212' => 'block',
        '10.0.0.1:11213' => 'content',
        '10.0.0.1:11214' => 'filter',
        '10.0.0.1:11215' => 'form',
        '10.0.0.1:11216' => 'menu',
        '10.0.0.1:11217' => 'page',
        '10.0.0.1:11218' => 'update',
        '10.0.0.1:11219' => 'views',
    
        '10.0.0.2:11211' => 'default',
        '10.0.0.2:11212' => 'block',
        '10.0.0.2:11213' => 'content',
        '10.0.0.2:11214' => 'filter',
        '10.0.0.2:11215' => 'form',
        '10.0.0.2:11216' => 'menu',
        '10.0.0.2:11217' => 'page',
        '10.0.0.2:11218' => 'update',
        '10.0.0.2:11219' => 'views',
      ),
    
      'memcache_bins' => array(
        'cache' => 'default',
        'cache_block' => 'block',
        'cache_content' => 'content',
        'cache_filter' => 'filter',
        'cache_form' => 'form',
        'cache_menu' => 'menu',
        'cache_page' => 'page',
        'cache_update' => 'update',
        'cache_views' => 'views',
      ),
    );
    
Attachments