{"id":982563,"date":"2024-03-13T11:33:11","date_gmt":"2024-03-13T18:33:11","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?post_type=msr-project&p=982563"},"modified":"2024-06-04T17:09:47","modified_gmt":"2024-06-05T00:09:47","slug":"garnet","status":"publish","type":"msr-project","link":"https:\/\/www.microsoft.com\/en-us\/research\/project\/garnet\/","title":{"rendered":"Garnet"},"content":{"rendered":"
\n\t
\n\t\t
\n\t\t\t\"Garnet\t\t<\/div>\n\t\t\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n

Garnet<\/h1>\n\n\n\n

A high-performance, extensible, and low-latency remote cache-store from Microsoft Research<\/p>\n\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/section>\n\n\n\n\n\n

Introducing Garnet<\/h2>\n\n\n\n

Garnet is a research project from Microsoft Research. It is a remote cache-store designed to offer high performance, extensibility, and low latency. Garnet is thread-scalable within a single node. It also supports sharded cluster execution, with replication, checkpointing, failover, and transactions. It can operate over main memory as well as tiered storage (such as SSD and Azure Storage). Garnet supports a rich API surface and a powerful extensibility model.<\/p>\n\n\n\n

Garnet uses Redis’ RESP (opens in new tab)<\/span><\/a> as the starting point for its wire protocol. Thus, one can use Garnet with unmodified Redis clients available (opens in new tab)<\/span><\/a> in most programming languages, for example, with StackExchange.Redis (opens in new tab)<\/span><\/a> in C#. Compared to other open-source cache-stores, you get much better performance, latency, extensibility, and durability features.<\/p>\n\n\n\n

Version of Garnet have been deployed in several real-world use cases at Microsoft, such as those in the Windows & Web Experiences Platform, Azure Resource Manager, and Azure Resource Graph. Garnet is also now open-source at https:\/\/github.com\/microsoft\/garnet (opens in new tab)<\/span><\/a>.<\/p>\n\n\n\n

\n\t\n\t
\n\t\t
\n\t\t\t
\n
\n

High Performance<\/h3>\n\n\n\n

Garnet uses a thread-scalable storage layer called Tsavorite, which provides cache-friendly shared-memory scalability with tiered storage support. Garnet supports cluster mode (sharding and replication). It has a fast pluggable network design to get high end-to-end performance (throughput and 99th percentile latency).<\/p>\n<\/div>\n\n\n\n

\n

Rich & Extensible<\/h3>\n\n\n\n

Garnet uses the popular RESP wire protocol, allowing it to be used with unmodified Redis clients in any language. Garnet supports a large fraction of the Redis API surface, including raw strings and complex data structures such as sorted sets, bitmaps, and HyperLogLog. Garnet also has scalable extensibility and transactional stored procedure capabilities.<\/p>\n<\/div>\n\n\n\n

\n

Modern & Secure<\/h3>\n\n\n\n

The Garnet server is written in modern .NET C#, and runs efficiently on almost any platform. It works equally well on Windows and Linux, and is designed to not incur garbage collection overheads. You can also extend Garnet’s capabilities using new .NET data structures to go beyond the core API. Finally, Garnet has efficient TLS support out of the box.<\/p>\n<\/div>\n<\/div>\t\t<\/div>\n\t<\/div>\n\n\t<\/div>\n\n\n\n

\n\t\n\t
\n\t\t
\n\t\t\t

Key advantages<\/h2>\n\n\n\n

Garnet offers several unique benefits:<\/p>\n\n\n\n