Description
We use redis ring client to shard access to redis for our rate limit infrastructure in Kubernetes https://opensource.zalando.com/skipper/tutorials/ratelimit/#redis-based-cluster-ratelimits.
I would like to add and remove shards on demand while Kubernetes is scaling-out redis instances.
I tried to implement it by closing and recreating the redis ring, but I think it would be better (less locks required) to trigger it via a library call.
One idea I had was to have a func() []string
that is called every configurable time.Duration with a time.Ticker to set the Members and propagate these into the library ringShards. Or we could also do the triggering ourselves and the library just provides ReconfigureShards(shards []string)
.
Do you have a better idea how to make this happen?
I am willing to create a PR if it makes sense for you.