BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Announces Garnet: a New Open-Source Cache-Store and Redis Alternative

Microsoft Announces Garnet: a New Open-Source Cache-Store and Redis Alternative

Microsoft Research has recently announced Garnet, an open-source cache-store designed to accelerate applications and services. Using the RESP wire protocol, Garnet is a faster alternative to cache-stores and is compatible with existing Redis clients.

Among the benefits of the new remote cache-store, the team behind Garnet highlights the RESP wire protocol, better scalability and throughput, and lower client latency at the 99th and 99.9th percentiles. Badrish Chandramouli, partner research manager at Microsoft, explains the main limitations of modern caches such as Redis, Memcached, KeyDB, and Dragonfly that offer rich APIs and feature sets:

Existing systems achieve this feature richness at a cost, by keeping the system design simple, which limits the ability to fully exploit the latest hardware capabilities (e.g., multiple cores, tiered storage, fast networks). Further, many of these systems are not explicitly designed to be easily extensible by app developers or to work well on diverse platforms and operating systems.

To showcase its performance advantages, Microsoft Research compared Garnet, Redis, KeyDB, and Dragonfly using their proprietary benchmarking tool, Resp.benchmark. The comparison covers four distinct scenarios: throughput with a varying number of client sessions, throughput with varying batch sizes, latency with a varying number of client sessions, and latency with varying batch sizes.

Source: Microsoft Research blog

In a popular thread on Hacker News, user west0n comments:

From the benchmark performance charts, the throughput of the GET command exceeds that of Dragonfly by more than tenfold. While 50% latency is slightly higher than Dragonfly, the 99th percentile is slightly lower than Dragonfly. Both the throughput and latency of Garnet and Dragonfly are far better than Redis, indicating that Redis may require significant performance optimization.

One Reddit user UnidentifiedBlobject writes:

When looking at the graphs I thought, "Oh cool yeah it’s a little bit faster." Then I realized they’re log-scales, so it’s actually 1 to 2 orders of magnitudes higher throughput.

Garnet supports raw string, analytical, and object operations and transactions in the form of client-side RESP transactions. Chandramouli adds:

Garnet uses a fast and pluggable network layer, enabling future extensions such as leveraging kernel-bypass stacks (..) Garnet’s storage layer, called Tsavorite, was forked from OSS FASTER and includes strong database features such as thread scalability, tiered storage support (memory, SSD, and cloud storage), fast non-blocking checkpointing, recovery, operation logging for durability, multi-key transaction support, and better memory management and reuse.

In addition to single-node execution, Garnet supports a cluster mode, which allows users to create and manage a sharded and replicated deployment, and a dynamic key migration scheme to rebalance shards. Developers can use standard Redis cluster commands to create and manage Garnet clusters, and nodes perform gossip to share and evolve cluster state.

In response to Redis changing its license and adopting a dual source-available licensing model, Peter Zaitsev, founder at Percona and open source advocate, highlights the recent surge in project popularity, commenting:

Garnet - Microsoft's Redis protocol implementation is going strong, as Redis ditches the Open Source license.

Garnet is available on GitHub and is licensed under the MIT license.

About the Author

Rate this Article

Adoption
Style

BT