ServiceStack.Redis.RedisResponseException Using Redis Cluster and Twemproxy

678 Views Asked by At

I have a 3 master / 3 slave Redis cluster running on a single Ubuntu 14_04 machine. I followed the guide published here when creating the cluster. I also have Nutcracker running on the same machine. Everything starts up and appears to be functioning correctly in the cluster. I wrote a small c# app using the ServiceStack.Redis v3 API and it's throwing an exception whenever I attempt to write to the Redis Cluster. Here's the response:

An unhandled exception of type 'ServiceStack.Redis.RedisResponseException' occurred in ServiceStack.Redis.dll

Additional information: MOVED 5836 192.168.120.147:7001, sPort: 54812, LastCommand: SET foo_1 "bar_1"

Here's the code i'm using:

ServiceStack.Redis.RedisClient redisClient = new ServiceStack.Redis.RedisClient("192.168.120.147");

redisClient.Set("foo_1", "bar_1");

Any help would be greatly appreciated.

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

As far as I know, nutcracker isn't compatible (yet?) with the Redis Cluster Specification and can only be used with Redis' traditional unclustered mode. That means you can use one (the open source Redis Cluster), the other (the open source nutcracker proxy), neither but not both at the same time.