RespClient icon indicating copy to clipboard operation
RespClient copied to clipboard

Want to pass multiple Redis Server to Connect-RedisServer?

Open guitarrapc opened this issue 9 years ago • 2 comments

Currently Connection is hold as static variables. Thus 1:1 connection is required, means we foreach servers and command.

Some user voice said "want to pass multiple servers, command at once.". This guy image capistrano like usage.

Get-RedisConfig -Key save -Servers 192.168.10.10, 192.168.10.11, 192.168.10.12

or

$connection = Connect-RedisServer -Host 192.168.10.10, 192.168.10.11, 192.168.10.12 -PassThru
Get-RedisConfig -Key save -Connection $connection

How do you think?

guitarrapc avatar Mar 09 '15 09:03 guitarrapc

It's depend on use case. May be better offering -PassThru with Connect-RedisServer and add `-Connection`` to each Cmdlet.

So that you can handle both way of "Persistent Connection" and "OnDemand Connection".

Any idea?

guitarrapc avatar Apr 03 '15 21:04 guitarrapc

+1 We have migrated to a Redis Cluster, and being able to provide multiple Host is required, otherwise we get a response of "MOVED xx.xx.xx.xx". As a work around we are thinking about building some retry logic that will parse the moved string and connect to the ip it gives.

nwesoccer avatar Mar 21 '18 16:03 nwesoccer