Title: ElastiCache redis cluster & cluster mode enabled
Tags: redis;amazon-elasticache;aws-elasticache
Question: I'm learning Redis and one thing I'm not certain about is when multiple redis clusters are present, if data partition will be done so that each cluster stores part of the data, my understanding is as below.
When multiple ElastiCache redis clusters are present, a key will be hashed using consistent hashing or similar algorithm and the request will be routed to any of the cluster in equal chances. Once the request is routed to a cluster then it will be hashed again to determine which of the 16364 slot it will be in and based on where the slot is allocated, the request will be on a particular shard of that cluster.
To summarize, when multiple clusters are present and cluster mode is enabled, there are two rounds of request level load balancing are done, one is to determine which cluster is to be used and the other is to determine which shard the request to be routed to.
In terms of data partition, each cluster will have a partition of the entire data and within each cluster, the data will be further split into multiple shards.
Please let me know if my understanding is correct, thanks!



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:09/11/22', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<redis><amazon-elasticache><aws-elasticache>', 'Title': 'ElastiCache redis cluster & cluster mode enabled', 'ViewCount': 24, 'id': 73682906, 'user_AboutMe': '', 'user_AccountId': 1689160.0, 'user_DisplayName': 'photosynthesis', 'user_Reputation': 2460.0, 'user_Views': 286.0, 'user_id': 1551870.0}}