Reputation: 1591
I am using Redis with ServiceStack and with a connection pool; now I know that the docs say that it can fail at any time (and it does randomly, especially when i'm ramping up connections; it has timeouts (especially on writes) all over the place while redis with the c & php(which is c) API does not suffer from that. I use the code from the service stack redis page but it does not really describe how to make it resilient etc.
Anyway; following stackoverflow & the docs, I have a connection pool but what to do if a call fails anyway? Do I just retry it until it succeeds? It all feels pretty brittle at the moment especially while I had this issue not at all when running big volume from the c api...
Note; we care about low latency for reads more than anything.
Upvotes: 2
Views: 1017
Reputation: 143284
The ServiceStack.Redis client already has built-in support for automatic retries.
You can customize the different timeouts on the Connection String or on the RedisConfig configuration class.
Upvotes: 1