TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

DisRedis: Python Redis client with Automated Sharding and Failover

14 pointsby mladeralmost 12 years ago

2 comments

siliconc0walmost 12 years ago
It looks like you&#x27;re using SHA1 as your hash algorithm which isn&#x27;t a great choice for sharding. Look into using a consistent hashring algorithm. Basically you want to minimize the number of keys you need to redistribute if you add&#x2F;remove nodes. <a href="https://pypi.python.org/pypi/hash_ring/" rel="nofollow">https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;hash_ring&#x2F;</a><p>What would be cooler than this would be to port the CRUSH algorithm to python. CRUSH is what Ceph (distributed file system) uses to map data to storage servers. This allows you to define a &#x27;map&#x27; of how you want data distributed - i.e by rack, row, or datacenter and it can handle replicas, failures, and overloaded systems as well. Whitepaper: <a href="http://ceph.com/papers/weil-crush-sc06.pdf" rel="nofollow">http:&#x2F;&#x2F;ceph.com&#x2F;papers&#x2F;weil-crush-sc06.pdf</a>
mrchildsalmost 12 years ago
I&#x27;m one of the developers of DisRedis and the devops engineer running the servers. Let me know if you have any questions.