You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an application once we have initialised redis client with various Options parameters, what is the most viable and elegant way to update those properties? Currently, I am looking for connection-pool resizing but in general it would be very helpful (as well as interesting) to know what is the correct way to update the redis-client without application restart.
The text was updated successfully, but these errors were encountered:
siddharthgoel88
changed the title
Dynamically update client properties
Dynamically update redis client properties
Aug 3, 2020
👍 I also wonder if we can update redis client properties on the fly. Yes I'm aware we can just override redisClient.Opts.Addr = "10.231.25.1:3009" on the fly but I wonder if this will take effect in the run time.
My situation is I want to add a service discovery for redis. Such that when the broker address changed, my web app get updated with the new address.
This is not supported and unlikely to be implemented (lots of work and not a popular feature). If you really need this you could store *redis.Client in atomic.Pointer and replace it when config changes.
In an application once we have initialised redis client with various
Options
parameters, what is the most viable and elegant way to update those properties? Currently, I am looking for connection-pool resizing but in general it would be very helpful (as well as interesting) to know what is the correct way to update the redis-client without application restart.The text was updated successfully, but these errors were encountered: