garnet
by
microsoft

Description: Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster...

View on GitHub ↗

Summary Information

Updated 58 minutes ago
Added to GitGenius on April 7th, 2024
Created on August 21st, 2023
Open Issues & Pull Requests: 60 (+0)
Number of forks: 669
Total Stargazers: 11,899 (+0)
Total Subscribers: 73 (+0)

Issue Activity (beta)

Open issues: 26
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 293 days
Stale 30+ days: 23
Stale 90+ days: 20

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (46)
  • bug (39)
  • help wanted (39)
  • question (34)
  • answered (33)
  • API (19)
  • good first issue (13)
  • cluster (2)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 10.5 hours
Mean response time: 8.7 days
90th percentile: 13.0 days
Tracked items: 303

Most active contributors

Detailed Description

Garnet is a remote cache-store developed by Microsoft Research that reimplements the entire cache-store stack to achieve high throughput, low latency, and strong scalability. Written in C# and built on modern .NET technology, Garnet adopts the RESP wire protocol used by Redis, enabling compatibility with existing Redis clients across most programming languages without modification. This design choice allows developers to use Garnet as a drop-in replacement for Redis-compatible systems while gaining significant performance improvements.

The repository demonstrates exceptional performance characteristics, particularly client latencies often below 300 microseconds at the 99.9th percentile when running on Azure VMs with Accelerated Networking. Garnet achieves state-of-the-art performance on both Linux and Windows platforms through careful optimization of .NET usage. The system is designed to handle many client connections with small batches more efficiently than comparable open-source cache-stores, directly translating to cost savings for large applications and services.

Garnet's architecture separates concerns through a narrow-waist Tsavorite storage API that implements read, upsert, delete, and atomic read-modify-write operations with asynchronous callbacks. This design cleanly decouples parsing and query processing from storage details including concurrency, storage tiering, and checkpointing. The storage layer consists of two Tsavorite key-value stores bound by a unified operation log: a main store optimized for raw string operations with careful memory management to avoid garbage collection, and an optional object store optimized for complex objects and custom data types like Sorted Sets, Sets, Hashes, Lists, and Geo types.

The network layer uses a shared memory design where TLS processing and storage interactions occur on the network IO completion thread, avoiding thread switching overheads in common cases. This approach leverages CPU cache coherence to bring data to processing logic rather than requiring traditional data movement to appropriate shards. Garnet implements a wide range of APIs including raw strings with key expiration, analytical operations like HyperLogLog and Bitmap, and object operations. It supports multi-key transactions through client-side RESP transactions, server-side stored procedures and modules written in C#, and Lua scripts.

Garnet's cluster mode provides fully-featured sharding and replication with efficient dynamic key migration for rebalancing. The cluster design is passive, responding to user-provided control plane commands rather than implementing internal leader election. Users can manage clusters using standard Redis cluster commands with nodes performing gossip to share cluster state.

Recent additions include Vector Sets in preview, providing approximate nearest-neighbor search backed by the DiskANN algorithm and Garnet's Tsavorite storage engine, and Range Index in preview, offering secondary range and equality indexes over Garnet keys powered by Bf-Tree. The Garnet paper is appearing at VLDB 2026, documenting the research behind this next-generation cache-store.

Community engagement shows active development with median issue and PR response latency of 10.5 hours across 303 tracked items. The most active contributors include badrishc with 410 events, TalZaccai with 204 events, and vazois with 169 events. Enhancement requests represent the most common issue type with 46 tracked items, followed by help wanted with 37 items and bugs with 28 items. The repository shares contributors with microsoft/vscode, microsoft/typescript, and rust-lang/rust, indicating cross-project collaboration within the broader Microsoft and open-source ecosystems.

garnet
by
microsoftmicrosoft/garnet

Repository Details

Fetching additional details & charts...