Redis mget vs get
caching, redis
Solution
Running multiple redis instances on the same machine can be useful. Redis is single threaded so if your machine has multiple cores, you can get more CPU power by using multiple instances. Craigslist runs in this configuration as documented here: http://blog.zawodny.com/2011/02/26/redis-sharding-at-craigslist/.
mget versus get should help since you are only making 4 round trips to the redis server as opposed to 60, increasing throughput - running multiple instances on the same machine shouldn't change that.
Problem
Setup: We have a setup of redis in which we have a master and 4 slaves of redis running on same machine. Reason to use the multiple instances were - - To avoid hot keys - Memory was not a constraint as number of keys were small ~10k ( We have a extra large EC2 machine) Requests: We approximately make 60 get request from redis per client request. We consolidate 60 gets in 4 mgets. We make a single connection for all the request ( to one of the slave picked up randomly ). Questions - Does it make sense to run multiple instances of redis with replicated data in the slaves? - Does making mgets instead of gets in our case help us where we have all the instances on the same machine?