Running Drupal 7 sites (under Aegir) and I'm investigating a method to scale out the web boxes horizontally, so that any Apache server can process a request for any Drupal site. We're currently at ~50 Drupal sites on our platform. All sites also run through Varnish.
At the moment with our single-server setup I have memcached installed locally on the Apache box.
If we add further Apache boxes and each has their own memcached instance, it's likely that cached content in memcached will be different on each different host.
The way around this is to run memcached on our Varnish or database instance, though on our Varnish box makes most sense.
settings.php config I can presumably specify multiple memcached servers in the
// make MemCacheDrupal the default cache class $conf['cache_default_class'] = 'MemCacheDrupal'; // Key Prefix: edit this for multisite use. $conf['memcache_key_prefix'] = $databases['default']['default']['username']; $conf['memcache_servers'] = array( '127.0.0.1:11211' => 'default', );
How does Drupal choose which memcached server to use from this array?
What I'm looking for is the ability to specify a failover memcached server. So if the primary "shared" memcached instance is down, say we take our Varnish VM down for maintenance, then it starts using another cold memcached instance.
Or as an alternative is there a way for Drupal to failover to using the database cache instead of memcached?