...
- 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.
- Follow the single-host instructions for one server in the cluster, but replace "localhost" with that server's external IP.
- Replace the occurrences of "$memcached_port++" with the actual port numbers.
- 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.
- Use the exact same instance list on every host. This ordering is critical to memcached performing proper hashing.
- Expect to get a standard memcached configuration like this, which you should apply to the
settings.php
file on each Apache host:Code Block title settings.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 |
---|