Title: Replication &amp; Clustering Question
Last modified: September 1, 2016

---

# Replication & Clustering Question

 *  Resolved [swiftc](https://wordpress.org/support/users/swiftc/)
 * (@swiftc)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/replication-clustering-question/)
 * Hello,
 * Sorry for such n00b question..
 * I have 3 web node each with Redis running (as master on each).
 * I have Redis as PHP Session handler in php.ini on each like so:
 * session.save_handler = redis
    session.save_path = “tcp://1.1.1.1:6379?auth=pass?
   database=10,tcp://2.2.2.2:6379?auth=pass?database=10,tcp://3.3.3.3:6379?auth=
   pass?database=10”
 * how do I then get WordPress to use all 3?
 * Currently I have in wp-config.php
 * define(‘WP_REDIS_HOST’, ‘1.1.1.1’);
    define(‘WP_REDIS_PORT’, ‘6379’); define(‘
   WP_REDIS_DATABASE’, ‘1’); define(‘WP_REDIS_PASSWORD’, ‘pass’); define(‘WP_CACHE_KEY_SALT’,‘
   example.com’);
 * would I use Master-Slave or Clustering from [https://wordpress.org/plugins/redis-cache/other_notes/#Replication-&-Clustering](https://wordpress.org/plugins/redis-cache/other_notes/#Replication-&-Clustering)
 * Maybe:
 * define( ‘WP_REDIS_CLUSTER’, [
    ‘tcp://1.1.1.1:6379?database=15&alias=node-01’,‘
   tcp://2.2.2.2:6379?database=15&alias=node-02’, ‘tcp://3.3.3.3:6379?database=15&
   alias=node-02’, ] ); define(‘WP_REDIS_PASSWORD’, ‘pass’); define(‘WP_CACHE_KEY_SALT’,‘
   example.com’);
 * Thanks for any help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Till Krüss](https://wordpress.org/support/users/tillkruess/)
 * (@tillkruess)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/replication-clustering-question/#post-7647524)
 * That looks correct, yes.
 *     ```
       define( 'WP_REDIS_CLUSTER', [
           'tcp://1.1.1.1:6379?database=10&alias=node-01',
           'tcp://2.2.2.2:6379?database=10&alias=node-02',
           'tcp://3.3.3.3:6379?database=10&alias=node-02',
       ] );
       ```
   
 * You might get an authentication error if you Redis servers require a password.
   If that’s the case, please let me know and I fix authentication for replication
   and clustering.
 *  Thread Starter [swiftc](https://wordpress.org/support/users/swiftc/)
 * (@swiftc)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/replication-clustering-question/#post-7647533)
 * Thanks, actually had to disable requirepass as the PHP sessions cannot seem to
   use it. Maybe works in new Redis but not via old one in YUM. Have a good day!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Replication & Clustering Question’ is closed to new replies.

 * ![](https://ps.w.org/redis-cache/assets/icon-256x256.gif?rev=2568513)
 * [Redis Object Cache](https://wordpress.org/plugins/redis-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/redis-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/redis-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redis-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redis-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [swiftc](https://wordpress.org/support/users/swiftc/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/replication-clustering-question/#post-7647533)
 * Status: resolved