Suppose I have data that easily fits in memory in a redis database. The redis server runs as a single service on a single process on a single machine. Let's say I have a 100 different machines connect to it often for various reasons. What benefits would I get by having "a cluster of redis nodes" as opposed to just the one? And what is the mental model I should have for a cluster: does each of my 100 other machines need to know in advance which redis node of the redis cluster that they want to connect to, with the redis nodes making sure they replicate the data between each other? Or do the 100 machines all connect to a single node that handles which of the other redis nodes are going to help service whatever the connecting machine wants? Thank you.
Redis clustering splits the cluster on two axis sharding, and replicas. Each shard is made up of one primary, and n secondary replicas.
Multiple shards provide better aggregate write performance by splitting the keyspace so each shard is responsible for part of the keyspace. However more shards can decrease overall availability as if a shard is unavailable that part of the keyspace is unavailable. If your write load is concentrated on a single or small number of keys, this may not help.
Multiple replicas provide better read performance as read queries are spread across all replicas in the shard. Write queries happen on the primary and are then copied to the secondaries. Multiple replicas can also improve availability as if any secondary goes down any other secondary in the shard can be queried, whilst if the primary goes down a secondary can be elected to replace it.