Plans to integrate TPL to Redis driver?


I was wondering if it’s planned to add support for TPL (async await) to the Redis driver?
I looked around and couldn’t find any references to this in the forums so I apologize if this is a duplicate post.


No there’s no plan for an async redis client. I don’t believe the overhead of async provides any benefit when accessing network services at sub ms latencies and the API explosion of Async overloads for every method would unnecessarily complicate the server implementation and client surface area, overall I believe it would be detrimental to the Redis client library. Although we’d consider providing Async equivalents for a smaller surface area like ICacheClient.

Hey thanks for the reply.

While that might be true for most cases, some heavier queries can take well over 10s and 100s of milliseconds, and it might be nice to have a separate API to access these functions.

Also in cases of timeouts connecting to the Redis server, TPL (and usage of cancellation tokens) - could prove very useful.

We are using MongoDB’s C# driver, which in the last major release (2.X) migrated their work to support TPL, and the migration wasn’t that hard.

What queries in Redis can take over 10s? This would be very bad to run in production as it means the entire (single-threaded) redis-server would block and your entire system would grind to a halt, an async client is not going to help with this.

Also see the comments section in MongoDB v2.0 to see how well changing to an async driver was received which forced them to add the Sync API’s back.