This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import binascii | |
| # Define nodes with precise slot ranges based on Redis cluster configuration | |
| nodes = [ | |
| {"name": "node-0001", "ranges": [range(2730, 8192)]}, | |
| {"name": "node-0002", "ranges": [range(8192, 9767), range(12498, 16384)]}, | |
| {"name": "node-0003", "ranges": [range(0, 2730), range(9767, 12498)]} | |
| ] | |
| # Define the keys to calculate hash slots |
OlderNewer