Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/271258

Change subject: role::memcached: add a second redis instance on mc20{01,16}
......................................................................

role::memcached: add a second redis instance on mc20{01,16}

Since we want to replicate redis session data so that we're able to
switch datacenter without loss of sessions for our users, we need to map
1:1 the redises in codfw and eqiad, so we need to have 18 shards in both
DCs. Given the small amount of resources used by the sessions redises,
we create two additional instances on those nodes.

Bug: T126470, T124879
Change-Id: Ia85aee424a28614a1f3f9b2cb159689224a17544
---
M manifests/role/memcached.pp
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/271258/1

diff --git a/manifests/role/memcached.pp b/manifests/role/memcached.pp
index d0babe9..bd71df1 100644
--- a/manifests/role/memcached.pp
+++ b/manifests/role/memcached.pp
@@ -90,6 +90,26 @@
         },
     }
 
+    # Add a second redis instance on selected hosts
+    if ($::hostname == 'mc2001' or $::hostname == 'mc2016') {
+        redis::instance { 6380:
+            bind                        => '0.0.0.0',
+            auto_aof_rewrite_min_size   => '512mb',
+            client_output_buffer_limit  => 'slave 512mb 200mb 60',
+            dir                         => '/srv/redis',
+            dbfilename                  => "${::hostname}-6380.rdb",
+            masterauth                  => $passwords::redis::main_password,
+            maxmemory                   => '500Mb',
+            maxmemory_policy            => 'volatile-lru',
+            maxmemory_samples           => 5,
+            no_appendfsync_on_rewrite   => true,
+            requirepass                 => $passwords::redis::main_password,
+            save                        => '300 100',
+            slave_read_only             => false,
+            stop_writes_on_bgsave_error => false,
+        }
+    }
+
     ferm::service { 'redis_memcached_role':
         proto    => 'tcp',
         port     => '6379',

-- 
To view, visit https://gerrit.wikimedia.org/r/271258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia85aee424a28614a1f3f9b2cb159689224a17544
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to