NewLife.Redis is a high-performance / high-throughput / easy-to-integrate .NET Redis client component built by the NewLife team. Since 2017, it has been running stably on multiple production platforms handling billions of records and high concurrency, processing 80+ billion command calls daily.
net8.0 ships with IsAotCompatible checks; AotSmoke/ plus the CI smoke matrix cover win-x64 / linux-x64 / linux-arm64 / linux-la64 (LA64 via QEMU), with win-arm64, macOS and musl RIDs compiled natively. linux-x64 is the blocking gate, the others are under observation — see AOT Compatibility
Main Features
Core Engine (7)
Feature
Key characteristics
Battle-tested at scale
200+ Redis instances in production, with a daily peak of 100M+ business object writes and 80B+ command calls.
Low latency
A single Get/Set round trip takes 200–600µs including network.
High throughput
Built-in connection pool (up to 100,000 concurrent) with a synchronous RESP parser and optional auto-pipeline batching.
Auto retry and multi-address failover
Comma-separated node lists, fast failover on network errors and a 10-second shielding window by default.
Pluggable encoder
JSON by default (RedisJsonEncoder), extensible to binary serialization through IPacketEncoder.
APM tracing
ITracer distributed tracing plus PerfCounter performance counters.
Zero heavy dependencies
Only the NewLife ecosystem (logging, configuration, serialization, security) on top of the BCL.
Signed with newlife.snk so assemblies can be rebuilt and replaced.
NativeAOT
IsAotCompatible static checks, the AotSmoke/ project and a multi-RID CI matrix.
ASP.NET Core package
NewLife.Redis.Extensions registers IDistributedCache and FullRedis through AddRedisCaching.
DataProtection
PersistKeysToRedis persists data-protection keys in Redis.
Ecosystem Map
NewLife is a layered ecosystem of independently versioned open-source projects. The map below is shared verbatim by every NewLife repository; each project links to its repository and its primary NuGet package.
Installs the matching .NET runtime automatically when launched from an older host.
—
Badges show the primary package of each project; theme, extension and satellite packages are listed on their NuGet pages. The 30+ packages not listed here (FTP, LoRa, Office extensions, protocol drivers and more) are available under the NewLifeX organization and on newlifex.com.
Documentation
NewLife.Redis provides .NET developers with full-lifecycle Redis access:
Complete Protocol: Implements RESP2, covers all mainstream commands from Redis 2.8 to 7.x, supports all data structures: String / List / Hash / Set / Sorted Set / Stream / Geo / HyperLogLog.
Message Queues: Built-in simple queue, reliable queue (RPOPLPUSH + Ack semantics), delay queue, and Stream multi-consumer-group queue — ready to use, no need to reinvent the wheel.
Cloud Provider Adapters: Specialized configuration and adaptation for Alibaba Cloud KVStore / Tencent Cloud Redis / Huawei Cloud DCS, covering proxy mode, ACL authentication, SSL encryption, special auth formats, and other differences.
Compatible Implementations: Auto-detects Microsoft Garnet, kvrocks, and other Redis-compatible servers, gracefully degrades with clear alternatives when features are unsupported.
Broad Framework Support: A single package covers .NET Framework 4.5 to .NET 10+, suitable for industrial control, government, IoT, and other legacy scenarios.
Every example below runs against a live FullRedis instance created in Quick Start.
Basic operations
// Write / Read
rds.Set("k1", 123, expire: 600);
var v = rds.Get<Int32>("k1");
// Set only if key does not exist
var ok = rds.Add("k2", "init");
// Replace and return old value
var old = rds.Replace("k2", "new");
// Counters
rds.Increment("counter", 1);
rds.Decrement("counter", 2);
// Expiry management
rds.SetExpire("k1", TimeSpan.FromMinutes(10));
var ttl = rds.GetExpire("k1");
// Batch read/write
rds.SetAll(new Dictionary<String, Object> { ["a"] = 1, ["b"] = 2 }, expire: 300);
var dict = rds.GetAll<Int32>(["a", "b"]);
// Key prefix (FullRedis.Prefix)
var scoped = rds.GetPrefixed("myapp:");
scoped.Set("user", "Alice"); // Actual key is myapp:user
Data structures
List
var list = rds.GetList<String>("queue:demo");
list.Add("job1");
list.Add("job2");
var first = list[0];
var popped = list.RightPop();
Hash
var hash = rds.GetDictionary<String>("user:1001");
hash["Name"] = "Alice";
hash["Email"] = "alice@example.com";
var name = hash["Name"];
var all = hash.GetAll();
Set / Sorted Set
var set = rds.GetSet<String>("tags");
set.Add("redis");
set.Add("cache");
var contains = set.Contains("redis");
var zset = rds.GetSortedSet<String>("leaderboard");
zset.Add("Player1", 100.0);
zset.Add("Player2", 95.5);
var top3 = zset.GetByRank(0, 2);
Stack
var stack = rds.GetStack<String>("undo:ops");
stack.Push("op1");
stack.Push("op2");
var last = stack.Pop(); // "op2"
Geo
var geo = rds.GetGeo("locations");
geo.Add("Beijing", 116.4074, 39.9042);
geo.Add("Shanghai", 121.4737, 31.2304);
var dist = geo.GetDistance("Beijing", "Shanghai", "km");
var nearby = geo.Search("Beijing", 500, "km");
HyperLogLog
var hll = rds.GetHyperLogLog("uv:today");
hll.Add("user1", "user2", "user3");
var count = hll.Count; // Approximate cardinality
hll.Merge("uv:yesterday");
Note: The base Redis instance only supports KV operations. Use FullRedis for advanced collections.
// Explicit pipeline
rds.StartPipeline();
for (var i = 0; i < 1000; i++) rds.Set($"p:{i}", i);
var results = rds.StopPipeline(true);
Auto mode (recommended for production):
rds.AutoPipeline = 100; // Auto-commit when 100 write operations accumulate
rds.FullPipeline = true; // Both reads and writes enter the pipeline (throughput-first scenarios)
Message queues
Simple Queue
var queue = rds.GetQueue<OrderMsg>("orders");
// Producer
queue.Add(new OrderMsg { OrderId = "12345", Amount = 99.9m });
// Consumer (blocking wait; timeout=0 means block indefinitely)
var msg = queue.TakeOne(timeout: 30);
Reliable Queue (at-least-once semantics)
var queue = rds.GetReliableQueue<OrderMsg>("orders");
// Produce
queue.Add(new OrderMsg { OrderId = "12345" });
// Consume + Acknowledge
var msg = queue.TakeOne(timeout: 30);
if (msg != null)
{
// Process the message...
queue.Acknowledge(msg); // Acknowledge consumption; removed from Ack queue
}
// If the process crashes without acknowledging, the message is automatically rolled back
// to the main queue after 60 seconds
Delay Queue
var delay = rds.GetDelayQueue<OrderMsg>("orders:delay");
// Available for consumption after 60 seconds
delay.Add(new OrderMsg { OrderId = "12345" }, delay: 60);
// Consume (auto-waits for due messages)
var msg = delay.TakeOne(timeout: 5);
Stream Queue (Redis 5.0+, multi-consumer-group)
var stream = rds.GetStream<LogEntry>("logs");
stream.Group = "processor-group";
// Produce
stream.Add(new LogEntry { Level = "INFO", Message = "Application started" });
// Consume (multiple instances compete within the same group)
var entry = stream.TakeOne(timeout: 15);
if (entry != null)
{
// Process...
stream.Acknowledge(entry.Id);
}
Publish / Subscribe
var pubsub = rds.GetPubSub("events:user");
// Publish
pubsub.Publish("login:Alice");
// Subscribe (async loop)
var cts = new CancellationTokenSource();
await pubsub.SubscribeAsync((channel, message) =>
{
Console.WriteLine($"[{channel}] {message}");
}, cts.Token);
Clustering and high availability
Multi-Address Auto Failover
// Comma-separated addresses; auto-failover on network errors;
// switches back to the primary node after 60 seconds
var rds = new FullRedis("10.0.0.1:6379,10.0.0.2:6379,10.0.0.3:6379", "pass", 0)
{
ShieldingTime = 10, // Shield unavailable nodes for 10 seconds (default)
Retry = 3, // Retry count (default)
};
Auto Cluster Mode Detection
// When AutoDetect=true, automatically detect the working mode via INFO
// ⚠️ For public cloud proxy mode, keep the default false to avoid obtaining internal node addresses
var rds = new FullRedis("sentinel-host:26379", "pass", 0)
{
AutoDetect = true, // Auto-detect Cluster / Sentinel / Replication
};
Cloud provider adapters
Alibaba Cloud KVStore / Tair
// Standard edition (Redis 2.8/4.0/5.0/6.0/7.0)
var rds = new FullRedis("xxxxxx.redis.rds.aliyuncs.com:6379", "YourPassword", 0);
// Redis 6.0 ACL user authentication
var rds = new FullRedis("xxxxxx.redis.rds.aliyuncs.com:6379", "YourUser", "YourPassword", 0);
// SSL encrypted connection
var rds = new FullRedis("xxxxxx.redis.rds.aliyuncs.com:6380", "YourPassword", 0)
{
SslProtocol = SslProtocols.Tls12,
};
// ⚠️ Public cloud proxy mode: Keep AutoDetect at its default false
// ⚠️ Cluster edition: Proxy handles shard routing; clients don't need to know the internal topology
Tencent Cloud Redis
// Tencent Cloud standard/cluster edition: use instance ID as UserName (AUTH instanceId:password format)
var rds = new FullRedis("xxxxxx.redis.tencentcds.com:6379", "instanceId", "YourPassword", 0);
// Or via connection string
var rds = FullRedis.Create("server=xxxxxx.redis.tencentcds.com:6379;username=instanceId;password=YourPassword;db=0");
Huawei Cloud DCS
// Master/Standby edition (standard AUTH)
var rds = new FullRedis("xxxxxx.dcs.myhuaweicloud.com:6379", "YourPassword", 0);
// SSL edition (use after downloading the PEM certificate)
var rds = new FullRedis("xxxxxx.dcs.myhuaweicloud.com:6380", "YourPassword", 0)
{
SslProtocol = SslProtocols.Tls12,
Certificate = new X509Certificate2("huawei-dcs.pem"),
};
// ⚠️ Cluster edition does not support SELECT; Db must be 0
// ⚠️ AutoDetect = false (default) to avoid internal node address issues
General Cloud Provider Notes:
Public cloud proxy mode: Keep AutoDetect = false (default) to prevent auto-detection of internal nodes
Connection quota: Each cloud provider and instance size has connection limits; set the pool Max parameter accordingly
TCP keepalive: Huawei Cloud defaults to a 300-second TCP idle timeout; set Timeout below that value and periodically PING
Serialization and encoders
Default encoder: RedisJsonEncoder (built-in JSON host), ready to use out of the box.
// Inspect current JSON configuration
var jsonHost = RedisJsonEncoder.GetJsonHost();
// Switch to a custom encoder (e.g., MessagePack)
rds.Encoder = new MyMessagePackEncoder();
Primitive types (String / Int32 / Int64 / Double / Boolean) are serialized directly without going through JSON for maximum performance.
Security and authentication
// Redis 6.0+ ACL authentication
var rds = new FullRedis("host:6379", "username", "password", 0);
// TLS encryption (specify protocol version)
rds.SslProtocol = SslProtocols.Tls12;
// Certificate verification (mutual mTLS)
rds.Certificate = new X509Certificate2("client.pem", "certPassword");
// Connection string password encryption (ProtectedKey mechanism)
// Configure ProtectedKey.Instance.Secret; passwords in connection strings are auto-decrypted
Observability
// Structured logging
rds.Log = XTrace.Log; // Component-level logs (connection changes, cluster changes, retries)
rds.ClientLog = XTrace.Log; // Protocol-level logs (every command; enable only when debugging)
// Performance counters
rds.Counter = new PerfCounter();
var stats = rds.Counter.GetAll(); // Get ops/s, latency, error rate
// APM distributed tracing (compatible with NewLife.Stardust / OpenTelemetry)
rds.Tracer = DefaultTracer.Instance;
// All Execute / queue produce-consume operations are automatically instrumented, with key as tag
// OpenTelemetry native tracing (net8.0+): subscribe to the built-in ActivitySource
// builder.Services.AddOpenTelemetry().WithTracing(t => t.AddSource(Redis.ActivitySourceName));
Extension packages
NewLife.Redis.Extensions provides deep ASP.NET Core integration:
NewLife.Redis fully supports Microsoft’s Garnet high-performance Redis-compatible server, with auto-detection and graceful degradation.
var redis = new FullRedis("127.0.0.1:7000", null, 0);
// Auto-detect server type
if (redis.IsGarnet)
Console.WriteLine("Connected to Garnet server");
Console.WriteLine($"Server type: {redis.ServerType}"); // Redis / Garnet / Unknown
Console.WriteLine($"Server version: {redis.Version}");
Feature
Garnet Support Status
String / List / Hash / Set / Sorted Set
✅ Fully supported
HyperLogLog / Geo
✅ Fully supported
Pub/Sub / Transactions / Lua Scripts
✅ Fully supported
Pipeline
✅ Fully supported
RedisQueue<T> / RedisDelayQueue<T>
✅ Fully supported
RedisReliableQueue<T>
✅ Fully supported
RedisStream<T>
❌ Garnet does not support Stream yet; automatically throws NotSupportedException with suggested alternatives
rds.Bench(rand: true, batch: 100); // Random keys + batch optimization
Actual performance is affected by network RTT / value size / serialization complexity. It is recommended to keep individual values between 1–1.4KB.
Best practices
Singleton reuse: FullRedis has an internal connection pool; strongly recommend using a single instance for the entire application lifetime — do not new each time
Key design: Use : as a hierarchical separator, e.g., user:1001:profile; use Prefix for namespace isolation in production
Batch first: Prefer GetAll/SetAll over looping single-key operations; use AutoPipeline to auto-merge write operations
Value size: Keep values within 1–2KB; split large objects / compress / use Hash for field-level storage
Reliable consumption: Use RedisReliableQueue<T> in production rather than a simple List to avoid message loss
Cloud providers: Keep AutoDetect = false on public clouds to avoid internal node address issues
Monitoring: Enable Counter statistics in production; only enable ClientLog when debugging to avoid hot-path logging overhead
SSL: Enable TLS encrypted transport on public clouds and in production environments
FAQ
Q: Does it support Redis Cluster sharding?
A: Yes. FullRedis auto-detects Cluster mode with AutoDetect=true. CRC16 routing, MOVED/ASK redirections are all implemented. For public cloud proxy mode, keep the default AutoDetect=false.
Q: How does it compare to StackExchange.Redis?
A: NewLife.Redis uses a connection-pool model (vs. StackExchange’s multiplexing) for more intuitive connection behavior. Built-in message queue wrappers (reliable queue / delay queue) are a key differentiator. It also supports .NET Framework 4.5. See Competitive Analysis (中文).
Q: How to handle slow queries caused by large values?
A: Split data structures (e.g., Hash per-field) + batch reads/writes + binary encoder + control MaxMessageSize (default 1MB limit).
Q: What if the connection pool runs out?
A: The default max is 100,000 connections; normal workloads won’t exhaust it. The pool is configurable via Redis.PoolConfig (RedisPoolConfig): min idle / max capacity / idle cleanup time / max lifetime / borrow wait timeout. Connections idle beyond IdleTime are proactively PING-checked when leased; for master-slave switch or rolling proxy update scenarios, lower MaxLifetime to recycle connections faster. If you see wait timeouts, check for connection leaks (missing Dispose) or operations that hold connections for excessively long periods.
Q: Why do connections fail on Alibaba Cloud / Tencent Cloud?
A: Check: ① Is AutoDetect set to false (correct default)? ② Is the auth format correct (Tencent Cloud requires username=instanceId)? ③ Are the network security group / whitelist allowing the client IP? ④ Does the cluster edition prohibit using SELECT to switch databases?
Q: Does Garnet support all features?
A: Basic operations, List/Hash/Set/ZSet/HLL/Geo, and queues are all supported. Stream is not yet supported and will automatically throw NotSupportedException with a suggestion to use RedisQueue<T> as an alternative.
dotnet build NewLife.Redis/NewLife.Redis.csproj -c Release
dotnet test XUnitTest -c Release
Integration tests need a live Redis: set REDIS_CONNECTION or start one on 127.0.0.1:6379; otherwise tests marked [RedisFact] / [RedisTopologyFact] are skipped automatically.
NativeAOT smoke: AotSmoke/, CI in .github/workflows/aot.yml.
Benchmarks: Samples/Benchmark.
Repository layout
Directory
Description
NewLife.Redis/
Client sources: connection pool, RESP codec, data structures and queues
NewLife.Redis.Extensions/
ASP.NET Core integration: IDistributedCache, DI and data protection
NewLife.Extensions.Caching.Redis/
Legacy caching extension compatibility package
XUnitTest/
xUnit test suite (net10.0)
AotSmoke/
NativeAOT smoke project
Samples/
Benchmark, WebDemo, QueueDemo, RedisSwitch and mobile smoke samples
Doc/
Requirements, architecture, feature list and topic documents
Release
Push a v-prefixed tag (for example v7.0.2026.1024) to trigger .github/workflows/publish.yml. The workflow packs NewLife.Redis and NewLife.Redis.Extensions, publishes them to NuGet.org and GitHub Packages, and creates a GitHub Release whose notes come from the matching ChangeLog.md section; a manual run only publishes packages.
Feedback
Before submitting, make sure dotnet build and the relevant tests pass, and follow the repository code style and commit conventions
PRs: Keep changes minimal, add necessary comments and test descriptions
Issues: Provide version, runtime environment, and a minimal reproduction scenario
Community: QQ groups 1600800 / 1600838; GitHub Discussions / Issues.
Team
Founded in 2002, the NewLife team has spent more than two decades on the .NET and IoT ecosystem, maintains nearly 100 open-source projects (34 of them core to this map), and delivers integrated software and hardware solutions for power, logistics, healthcare, industrial control and internet industries. We live by the motto “learning has no seniority — mastery earns respect”.
Open-source components have been downloaded 6.48M times from NuGet (ecosystem-wide, as of 2026-10).
NewLife.Redis — High-Performance Redis Client Component
🌐 简体中文 | 繁體中文 | Español | Deutsch | 日本語 | Français | Português | Русский | 한국어 | العربية
NewLife.Redisis a high-performance / high-throughput / easy-to-integrate .NET Redis client component built by the NewLife team. Since 2017, it has been running stably on multiple production platforms handling billions of records and high concurrency, processing 80+ billion command calls daily.Contents: Quick Start · Main Features · Ecosystem Map · Documentation · Contributing · Team · License
Quick Start
Install
Basic usage
Recommended: singleton, thread-safe, reuse throughout the application lifetime:
Connection string mode (recommended for config centers):
Platform support
net8.0ships withIsAotCompatiblechecks;AotSmoke/plus the CI smoke matrix cover win-x64 / linux-x64 / linux-arm64 / linux-la64 (LA64 via QEMU), with win-arm64, macOS and musl RIDs compiled natively. linux-x64 is the blocking gate, the others are under observation — see AOT CompatibilityMain Features
Core Engine (7)
RedisJsonEncoder), extensible to binary serialization throughIPacketEncoder.ITracerdistributed tracing plusPerfCounterperformance counters.Data Structures (10)
Message Queues and Pub/Sub (7)
RedisQueue<T>RedisReliableQueue<T>RedisDelayQueue<T>RedisStream<T>MultipleConsumerGroupsQueue<T>PubSub+RedisEventBusClustering and High Availability (7)
Protocol and Server Compatibility (7)
Cloud, Security and Observability (8)
instanceId:password).Log) and protocol-level log (ClientLog).PerfCounterreports ops/s, latency and error rate.ITracerspans everywhere plus anActivitySource(net8.0+) for OpenTelemetry.ProtectedKeydecrypts passwords embedded in connection strings.Platform and Integration (5)
newlife.snkso assemblies can be rebuilt and replaced.IsAotCompatiblestatic checks, theAotSmoke/project and a multi-RID CI matrix.NewLife.Redis.ExtensionsregistersIDistributedCacheandFullRedisthroughAddRedisCaching.PersistKeysToRedispersists data-protection keys in Redis.Ecosystem Map
NewLife is a layered ecosystem of independently versioned open-source projects. The map below is shared verbatim by every NewLife repository; each project links to its repository and its primary NuGet package.
dotnet newproject templates for console, web, API, service, data and IoT projects.Documentation
NewLife.Redis provides .NET developers with full-lifecycle Redis access:
Guides
Protocol and version support
RESP Protocol Support
Redis Version Feature Support
Architecture
Key Class Descriptions:
RedisFullRedisRedisClientRedisList<T>etc.RedisReliableQueue<T>RedisStream<T>IPacketEncoderUsage examples
Every example below runs against a live
FullRedisinstance created in Quick Start.Basic operations
Data structures
List
Hash
Set / Sorted Set
Stack
Geo
HyperLogLog
Pipeline and auto batching
Pipeline significantly reduces network round-trips (RTT) and improves bulk operation throughput:
Auto mode (recommended for production):
Message queues
Simple Queue
Reliable Queue (at-least-once semantics)
Delay Queue
Stream Queue (Redis 5.0+, multi-consumer-group)
Publish / Subscribe
Clustering and high availability
Multi-Address Auto Failover
Auto Cluster Mode Detection
Cloud provider adapters
Alibaba Cloud KVStore / Tair
Tencent Cloud Redis
Huawei Cloud DCS
General Cloud Provider Notes:
AutoDetect = false(default) to prevent auto-detection of internal nodesMaxparameter accordinglyTimeoutbelow that value and periodically PINGSerialization and encoders
Default encoder:
RedisJsonEncoder(built-in JSON host), ready to use out of the box.Primitive types (
String/Int32/Int64/Double/Boolean) are serialized directly without going through JSON for maximum performance.Security and authentication
Observability
Extension packages
NewLife.Redis.Extensionsprovides deep ASP.NET Core integration:Garnet compatibility
NewLife.Redis fully supports Microsoft’s Garnet high-performance Redis-compatible server, with auto-detection and graceful degradation.
RedisQueue<T>/RedisDelayQueue<T>RedisReliableQueue<T>RedisStream<T>NotSupportedExceptionwith suggested alternativesSee: Garnet Compatibility Documentation (中文)
Reference
Feature completion status
Data Structures
Message Queues
RedisQueue<T>RedisReliableQueue<T>RedisDelayQueue<T>RedisStream<T>MultipleConsumerGroupsQueue<T>PubSub+RedisEventBusCluster Support
Protocol & Advanced Features
Performance benchmarks
Built-in benchmark in source (
Samples/Benchmark), typical results (40 logical processors, local Redis 7.0):Manual bench trigger:
Best practices
FullRedishas an internal connection pool; strongly recommend using a single instance for the entire application lifetime — do notneweach time:as a hierarchical separator, e.g.,user:1001:profile; usePrefixfor namespace isolation in productionGetAll/SetAllover looping single-key operations; useAutoPipelineto auto-merge write operationsRedisReliableQueue<T>in production rather than a simple List to avoid message lossAutoDetect = falseon public clouds to avoid internal node address issuesCounterstatistics in production; only enableClientLogwhen debugging to avoid hot-path logging overheadFAQ
Q: Does it support Redis Cluster sharding? A: Yes.
FullRedisauto-detects Cluster mode withAutoDetect=true. CRC16 routing, MOVED/ASK redirections are all implemented. For public cloud proxy mode, keep the defaultAutoDetect=false.Q: How does it compare to StackExchange.Redis? A: NewLife.Redis uses a connection-pool model (vs. StackExchange’s multiplexing) for more intuitive connection behavior. Built-in message queue wrappers (reliable queue / delay queue) are a key differentiator. It also supports .NET Framework 4.5. See Competitive Analysis (中文).
Q: How to handle slow queries caused by large values? A: Split data structures (e.g., Hash per-field) + batch reads/writes + binary encoder + control
MaxMessageSize(default 1MB limit).Q: What if the connection pool runs out? A: The default max is 100,000 connections; normal workloads won’t exhaust it. The pool is configurable via
Redis.PoolConfig(RedisPoolConfig): min idle / max capacity / idle cleanup time / max lifetime / borrow wait timeout. Connections idle beyondIdleTimeare proactively PING-checked when leased; for master-slave switch or rolling proxy update scenarios, lowerMaxLifetimeto recycle connections faster. If you see wait timeouts, check for connection leaks (missingDispose) or operations that hold connections for excessively long periods.Q: Why do connections fail on Alibaba Cloud / Tencent Cloud? A: Check: ① Is
AutoDetectset tofalse(correct default)? ② Is the auth format correct (Tencent Cloud requiresusername=instanceId)? ③ Are the network security group / whitelist allowing the client IP? ④ Does the cluster edition prohibit using SELECT to switch databases?Q: Does Garnet support all features? A: Basic operations, List/Hash/Set/ZSet/HLL/Geo, and queues are all supported. Stream is not yet supported and will automatically throw
NotSupportedExceptionwith a suggestion to useRedisQueue<T>as an alternative.Roadmap
RESP3 protocol support(Completed)Pub/Sub(Completed)RedisStream multi-consumer-group(Completed)Garnet server type detection(Completed)Feedback and feature requests welcome via Issue / PR.
Competitive comparison
server=valkey/valkey_versionSee Competitive Analysis Document (中文) for details.
Release notes
Contributing
Build and test
REDIS_CONNECTIONor start one on127.0.0.1:6379; otherwise tests marked[RedisFact]/[RedisTopologyFact]are skipped automatically.AotSmoke/, CI in.github/workflows/aot.yml.Samples/Benchmark.Repository layout
NewLife.Redis/NewLife.Redis.Extensions/IDistributedCache, DI and data protectionNewLife.Extensions.Caching.Redis/XUnitTest/AotSmoke/Samples/Doc/Release
Push a
v-prefixed tag (for examplev7.0.2026.1024) to trigger.github/workflows/publish.yml. The workflow packsNewLife.RedisandNewLife.Redis.Extensions, publishes them to NuGet.org and GitHub Packages, and creates a GitHub Release whose notes come from the matchingChangeLog.mdsection; a manual run only publishes packages.Feedback
dotnet buildand the relevant tests pass, and follow the repository code style and commit conventionsCommunity: QQ groups 1600800 / 1600838; GitHub Discussions / Issues.
Team
Founded in 2002, the NewLife team has spent more than two decades on the .NET and IoT ecosystem, maintains nearly 100 open-source projects (34 of them core to this map), and delivers integrated software and hardware solutions for power, logistics, healthcare, industrial control and internet industries. We live by the motto “learning has no seniority — mastery earns respect”.
Open-source components have been downloaded 6.48M times from NuGet (ecosystem-wide, as of 2026-10).
Website: https://newlifex.com · Open source organization: https://github.com/NewLifeX
WeChat Official Account: 智能大石头 (scan to follow)
License
MIT License. Free to use commercially / modify / redistribute (no additional authorization required). Just retain the copyright notice.