Redis › Cluster Sharding & Hash Slots
What is sharding in a Redis Cluster, and why is it necessary for very large datasets?
BeginnerAnswer
Sharding splits your data across multiple Redis nodes instead of storing everything on a single server, letting you scale beyond the memory and processing limits of one machine by distributing both the data and the workload of serving requests across several nodes working together.
-- A Redis Cluster automatically distributes keys
-- across multiple nodes based on hash slots
redis-cli -c -h node1 set user:123 'John'Real-world example A large social media platform shards its user session data across many Redis nodes, since a single server could never hold enough memory to store session data for millions of active users at once.