Opened 14 months ago

Last modified 14 months ago

#34764 closed New feature

Add support for Clusterized Redis deployments — at Version 2

Reported by: Vsevolod Timchenko Owned by: nobody
Component: Core (Cache system) Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Vsevolod Timchenko)

The RedisCacheClient is explicitly initialized with the standard Redis client from the redis-py library:

        import redis

        self._lib = redis
        ...
        self._client = self._lib.Redis

To work with clusterized deployments another class, RedisCluster, has to be used. It offers support for cluster features and peculiarities, i.e. smart retries and refreshes on MOVED errors as well as node discovery.

Relevant piece of code:
https://github.com/django/django/blob/main/django/core/cache/backends/redis.py#L39

Redis class that I propose to support:
https://github.com/redis/redis-py/blob/master/redis/cluster.py#L431

Change History (2)

comment:1 by Vsevolod Timchenko, 14 months ago

Description: modified (diff)

comment:2 by Vsevolod Timchenko, 14 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top