Setup redis cluster in sentry

Does anyone have experience on how to setup a Redis cluster in Sentry,I want to replace the redis service with redis cluster, but if I turn on the cluster mode of redis, [- - cluster enable yes] report [sentry.errors: unable to incr internal metric]

I wouldn’t use this on prod probably but here’s a hacky solution we have to test our Snuba service:

thank you for your reply,I made the corresponding changes,but have the same problem.
[ERROR] sentry.errors: Unable to incr internal metric

Some information for docker-compose logs

web_1 | raise response
web_1 | redis.exceptions.ResponseError: MOVED 6319
web_1 | 09:56:57 [ERROR] sentry.errors: Unable to incr internal metric
web_1 | Traceback (most recent call last):
web_1 | File “/usr/local/lib/python3.6/site-packages/sentry/utils/”, line 98, in worker
web_1 | tsdb.incr(tsdb.models.internal, full_key, count=amount)
web_1 | File “/usr/local/lib/python3.6/site-packages/sentry/utils/”, line 105, in
web_1 | context[key] = (lambda f: lambda *a, **k: getattr(self, f)(*a, **k))(key)
web_1 | File “/usr/local/lib/python3.6/site-packages/sentry/tsdb/”, line 87, in method
web_1 | return getattr(self.backends[backend], key)(*a, **kw)
web_1 | File “/usr/local/lib/python3.6/site-packages/sentry/tsdb/”, line 215, in incr
web_1 | self.incr_multi([(model, key)], timestamp, count, environment_id)
web_1 | File “/usr/local/lib/python3.6/site-packages/sentry/tsdb/”, line 276, in incr_multi
web_1 | client.expireat(hash_key, key_expiries.pop(hash_key))
web_1 | File “/usr/local/lib/python3.6/site-packages/rb/”, line 637, in exit
web_1 | self.mapping_client.join(timeout=timeout)
web_1 | File “/usr/local/lib/python3.6/site-packages/rb/”, line 418, in join
web_1 | command_buffer.wait_for_responses(self)
web_1 | File “/usr/local/lib/python3.6/site-packages/rb/”, line 229, in wait_for_responses
web_1 | value = client.parse_response(self.connection, command_name, **options)
web_1 | File “/usr/local/lib/python3.6/site-packages/redis/”, line 853, in parse_response
web_1 | response = connection.read_response()
web_1 | File “/usr/local/lib/python3.6/site-packages/redis/”, line 718, in read_response
web_1 | raise response
web_1 | redis.exceptions.ResponseError: MOVED 291
web_1 | 09:56:57 [ERROR] sentry.errors: Unable to incr internal

I’d check redis logs instead of this. You don’t need a cluster to fix this error so I’d revert the changes first and start over with clean Redis state.

My English is very poor. I hope you can understand. My purpose is to use redis cluster instead of redis service. With the normal redis service, I can install sentry,I hope there is a way to use redis cluster

There is but I’m not familiar with the details. Pinging @evanpurkhiser and @joshuarli as they are more knowledgeable on this matter.

@deku08 Hi! Here’s the relevant tracking issue.

We use this thing called Redis Blaster (RB), and can’t fully use redis cluster until RB usage is ported over. Unfortunately, it’s a difficult task and the costs are greater than the benefits right now. It will eventually be done, but I’m not currently aware of any initiative.

1 Like

I really appreciate your help!

1 Like

I really appreciate your help !

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.