Replies: 2 comments 2 replies
-
Hi @proost, thank you for the proposal. I think it is great, but I would like it to be more simplified:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
close due to #638 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Adding Cluster Topology Awareness to Cluster Client. Cluster Topology Awareness makes usage of “Elasticache Auto Scaling With Replicas” more efficient
Problem Definition
Background
Elasticache Redis supports Auto Scaling With Replicas. Depending on target util or schedule, cluster can scale out or scale in automatically.
Currently ruedis can handle scale-in situation. When nodes disappear, client refresh cluster cache and connections.
But when scale-out situation, especially replicas added, rueidis can’t notice that cluster is changed. It is blocker to use Elasticache Auto Scaling With Replicas effectively.
Goals
Non-Goals
Plan
ClusterTopologyRefreshmentOption
Cluster topology refreshment must need to how refreshment will work. Definitely, we must need two options.
ScanInterval
: how frequently scan the redis cluster.RefreshCoolingDownPeriod
Cluster Topology Refreshment Loop
newClusterClient
with goroutine. loop ends whenClose
is called. To manage lifecycle of goroutine, i will usecontext.Context
.lastRefreshTime
, we calculate whether cooling down period is over or not.lastRefreshTime
is updated when_refresh
is called. Purpose ofRefreshCoolingDownPeriod
is delaying refreshment. So Where refreshment happen doesn’t matter. we don’t want update cluster cache too frequently._refresh
lazyrefresh
Beta Was this translation helpful? Give feedback.
All reactions