Search code examples
djangoredisconsistent-hashing

how to implement consistent hashing in django using redis database?


I want to implement consistent hashing in django with redis as my cache DB. Firstly I tried utilising uhashing(https://pypi.org/project/uhashring/) package to implement consistent hashing with redis but I am unable to provide link between django and the package. The second thing I did is searching for Configuring Redis with consistent hashing in django itself but I am unable to find anything related. I can only find configuring redis with memcached.

Is there any way to get solution for my problem. Any small hint will also be helpful, Thank you.


Solution

  • I just found some solution to my question.

    The external package which I want to use is need to be added to the installed apps in the seetings.py file so the there is no need to especially connect django to the script in which the package is used. This package is imported and utilised in the views.py.

    Thanks for the help, cheers..!