This is a question about redis cluster when running redis-cli.
Assuming I have the setup noted here :
http://redis.io/topics/cluster-tutorialEverything is up and running and it works great ---- Fantastic job !!
Assuming I start off by bringing up a client on 7000
redis-cli -c -p 7000
So I go off and set a bunch of keys for testing...
It will automatically set the keys and the slot and the port
Those keys are now distributed across different slots and ports {7000, 7001, 7002}, this happens automatically
Then I want to get one of those keys I just set.
If the key I get does not exist on 7000 the client says:
Redirected to slot [6597] located at 127.0.0.1:7001and it will merrily get the value of that key and now I am sitting on port 7001
I can then run the "keys *" command and see all of the keys on port 7001.
Then I go get another key and if it is on port 7001 it will get it,
and if it is on port 7002 --- it will switch to that port and get the key.
Now I am on port 7002 and when I run the "keys *" command I get only the keys on 7002. etc....
My question is ----> If I want to go back to port 7000 and run the "keys *" command how do I get back to port 7000.
I can make it happen automatically by going off and getting a key that I know is on port 7000,
and it will REDIRECT me over automatically....
But is there a way to REDIRECT to that port manually with a redis client command ???
I know I can bring up another client on that port
redis-cli -c -p 7001
But I want to be able to stay in the same session / and or do this from client side code...
I am assuming this can not be done --- even though the redirect happens automatically if you know a key in another slot on another port.
Thanks,
Michael Angerman
Corvallis, Oregon