Support using Goolge Memory store for Redis
Problem to solve
Support using Google Memorystore for Redis
Further details
Google Memorystore blocks CLIENT
commands: https://cloud.google.com/memorystore/docs/reference/redis-configs#blocked. The Redis ruby gem uses CLIENT
commands: https://github.com/redis/redis-rb/blob/v3.3.5/lib/redis/client.rb. We see the following error when integrating with Google Memorystore for Redis.
2019-03-01_19:08:36.37280 ERR unknown command 'client'
2019-03-01_19:08:36.37290 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:121:in `call'
2019-03-01_19:08:36.37290 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/peek-redis-1.2.0/lib/peek/views/redis.rb:9:in `call'
2019-03-01_19:08:36.37290 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:104:in `block in connect'
2019-03-01_19:08:36.37292 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:293:in `with_reconnect'
2019-03-01_19:08:36.37293 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:100:in `connect'
2019-03-01_19:08:36.37293 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:364:in `ensure_connected'
2019-03-01_19:08:36.37293 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:221:in `block in process'
2019-03-01_19:08:36.37293 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:306:in `logging'
2019-03-01_19:08:36.37293 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:220:in `process'
2019-03-01_19:08:36.37294 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis/client.rb:120:in `call'
2019-03-01_19:08:36.37294 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/peek-redis-1.2.0/lib/peek/views/redis.rb:9:in `call'
2019-03-01_19:08:36.37295 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis.rb:1398:in `block in smembers'
2019-03-01_19:08:36.37295 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis.rb:58:in `block in synchronize'
2019-03-01_19:08:36.37295 /opt/gitlab/embedded/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
2019-03-01_19:08:36.37295 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis.rb:58:in `synchronize'
2019-03-01_19:08:36.37296 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-3.3.5/lib/redis.rb:1397:in `smembers'
2019-03-01_19:08:36.37296 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-namespace-1.6.0/lib/redis/namespace.rb:442:in `call_with_namespace'
2019-03-01_19:08:36.37296 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/redis-namespace-1.6.0/lib/redis/namespace.rb:328:in `method_missing'
2019-03-01_19:08:36.37296 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-cron-1.0.4/lib/sidekiq/cron/job.rb:208:in `block in all'
2019-03-01_19:08:36.37297 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.5/lib/sidekiq.rb:97:in `block in redis'
2019-03-01_19:08:36.37297 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:65:in `block (2 levels) in with'
2019-03-01_19:08:36.37298 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `handle_interrupt'
2019-03-01_19:08:36.37298 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `block in with'
2019-03-01_19:08:36.37298 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `handle_interrupt'
2019-03-01_19:08:36.37298 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `with'
2019-03-01_19:08:36.37298 /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/sidekiq-5.2.5/lib/sidekiq.rb:94:in `redis'
What does success look like, and how can we measure that?
We are able to successfully support Google Memorystore for Redis.
Links / references
Customer ticket: https://gitlab.zendesk.com/agent/tickets/114673
/cc @joshlambert
Edited by Stan Hu