new feature: Redis client should support reader endpoints/replicas
Feature Description
To help optimize throughput, the Redis client should support reading from dedicated reader endpoints (or replicas in cluster mode), and only write to primary endpoints.
Problem and Solution
RedisBuilder should support an additional reader_endpoints() option, and RedisClient would need a separate reader_client/reader_cluster_client fields, then use those clients for get() operations.
Additional Context
No response
Are you willing to contribute to the development of this feature?
- [x] Yes, I am willing to contribute to the development of this feature.
That’s an nice feature request. There are many things we could consider, like how to handle round-trip decisions, or how to manage fallbacks when errors occur, such as not found or connection failed. Have we discussed this with the upstream yet? I think it could be a good addition to the redis crate directly.