I have a redis setup with 1 master and 2 slaves on ElastiCache. Master failover is already handled, but I want to make sure:
- Reads are load-balanced across the three servers
- Writes only go to the master
- Should a read fail, we try again at another node
I'm having a tough time making this happen with redis-py:
1) It has support for connection pooling (and suggests we can support client-side sharding this way) but the documentation doesn't specify whether or not it'll retry on an error.
2) It doesn't provide a clear way to specify whether one type of connection is for reads and another is for writes... I suppose I could make two StrictRedis instances?
Any ideas on the best way to handle this? Looks like there are a few projects tackling this, but none of them have had commits in the past two years: