Logo
Deploy Now

Developer links

Garnet

Garnet is Microsoft Research's cache-store built on .NET that speaks the Redis RESP wire protocol while delivering up to 10x higher throughput and 4x lower tail latency than comparable alternatives on identical hardware. The Tsavorite storage engine provides a cache-friendly, shared-memory architecture scaling linearly across CPU cores, supporting both in-memory operation and tiered storage across local SSDs and Azure Storage for datasets exceeding available RAM. Cluster mode enables sharded deployments with replication, dynamic key migration for live rebalancing, non-blocking checkpointing, and automatic failover using standard Redis cluster commands. The RESP implementation covers raw strings, sorted sets, lists, hashes, sets, bitmaps, HyperLogLog, streams, pub/sub, Lua scripting, and client-side transactions, allowing StackExchange.Redis, Jedis, redis-py, and other Redis clients to connect without modification. C#-based extensibility lets developers define custom commands and new data types as server-side stored procedures, compiled and loaded at runtime without restarting the server. TLS encryption, ACL-based access control, and operation logging complete the production feature set. Deployed across Microsoft services including Windows & Web Experiences, Azure Resource Manager, and Azure Resource Graph. Nearly 12,000 GitHub stars. MIT licensed.

Garnet
Garnet
Garnet
Garnet
Garnet

Benefits

  • Thread-Scalable Cache Performance
  • Achieves up to 10x higher throughput than Redis with sub-300-microsecond 99.9th percentile latency, scaling linearly across CPU cores within a single server node.
  • Drop-In Redis Client Compatibility
  • Implements the RESP wire protocol enabling unmodified Redis clients in C#, Java, Python, Go, and every major language to connect without code changes.
  • Tiered Storage Beyond Memory
  • Extends cache capacity beyond RAM using the Tsavorite engine with tiered storage across local SSDs and Azure Storage, with non-blocking checkpointing and recovery.
  • Production Cluster Sharding
  • Supports sharded cluster deployments with replication, automatic failover, dynamic key migration for live rebalancing, and standard Redis cluster command compatibility.

Features

  • Rich Data Structures
  • Supports strings, sorted sets, lists, hashes, sets, bitmaps, HyperLogLog, streams, and pub/sub with RESP protocol coverage matching most Redis API surfaces.
  • C# Extensibility Model
  • Define custom commands and new data types as server-side stored procedures in C#, compiled and hot-loaded at runtime without server restarts.
  • TLS and Access Control
  • Secure connections with TLS encryption and ACL-based authentication providing fine-grained command-level and key-pattern access control per user.
  • Non-Blocking Checkpointing
  • Tsavorite engine performs incremental checkpoints without blocking client operations, enabling fast recovery and operation logging for point-in-time durability.
  • Cross-Platform .NET Runtime
  • Runs on both Linux and Windows using modern .NET runtime with identical performance characteristics, supporting commodity cloud VMs and edge devices.