Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobin McCorkell <robin@mccorkell.me.uk>2016-03-14 01:41:04 +0300
committerMorris Jobke <hey@morrisjobke.de>2017-03-26 06:25:27 +0300
commitef57c03dd22115ddee75c14c3c5073d924cca23a (patch)
tree4a22243968dd6fedc6640948d50489dbaced38fe /config
parent0981f9a18a7253f7a5e7f44359c3bfc5ffe0f650 (diff)
Add Redis Cluster support
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'config')
-rw-r--r--config/config.sample.php30
1 files changed, 27 insertions, 3 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 0fbd3ffce07..84b98550fb0 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -1042,19 +1042,43 @@ $CONFIG = array(
'memcache.distributed' => '\OC\Memcache\Memcached',
/**
- * Connection details for redis to use for memory caching.
+ * Connection details for redis to use for memory caching in a single server configuration.
*
* For enhanced security it is recommended to configure Redis
* to require a password. See http://redis.io/topics/security
* for more information.
*/
-'redis' => array(
+'redis' => [
'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock'
'port' => 6379,
'timeout' => 0.0,
'password' => '', // Optional, if not defined no password will be used.
'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index.
-),
+],
+
+/**
+ * Connection details for a Redis Cluster
+ *
+ * Only for use with Redis Clustering, for Sentinel-based setups use the single
+ * server configuration above, and perform HA on the hostname.
+ *
+ * Redis Cluster support requires the php module phpredis in version 3.0.0 or higher.
+ *
+ * Available failover modes:
+ * - \RedisCluster::FAILOVER_NONE - only send commands to master nodes (default)
+ * - \RedisCluster::FAILOVER_ERROR - failover to slaves for read commands if master is unavailable
+ * - \RedisCluster::FAILOVER_DISTRIBUTE - randomly distribute read commands across master and slaves
+ */
+'redis.cluster' => [
+ 'seeds' => [ // provide some/all of the cluster servers to bootstrap discovery, port required
+ 'localhost:7000',
+ 'localhost:7001'
+ ],
+ 'timeout' => 0.0,
+ 'read_timeout' => 0.0,
+ 'failover_mode' => \RedisCluster::FAILOVER_DISTRIBUTE
+],
+
/**
* Server details for one or more memcached servers to use for memory caching.