StackExchange.Redis lets .NET applications talk to Redis and other RESP-compatible servers over a shared multiplexer. It exposes synchronous and asynchronous APIs across the Redis feature set.
Overview
StackExchange.Redis is a general-purpose Redis client for .NET languages such as C#. It connects to Redis, Valkey, Garnet, Azure Managed Redis, AWS ElastiCache, and other servers that speak the Redis wire protocol.
The library uses a multiplexed design so many threads can share connections efficiently. It abstracts redis node configuration and can work with clusters, pub/sub, streams, Lua scripting, and many other server capabilities documented in the project guides.
Consumers install it as a NuGet package and configure endpoints, authentication, and failover behavior through the client API. It is the successor to BookSleeve and is used in production at Stack Exchange sites including Stack Overflow.
Key features
- High-performance connection multiplexing
- Synchronous and asynchronous APIs
- Redis cluster support
- Pub/sub and streams
- Lua scripting support
- Pipeline and transaction helpers
- Node configuration abstraction
- RESP3 support
Use cases
- Caching in .NET web apps
- Shared session storage
- Real-time messaging backends
- Coordinated distributed locks
- Rate limiting services