Microsoft has opened the code for the Garnet store, compatible with Redis

Microsoft has released the source code for the NoSQL system Garnet, designed for creating caching stores and compatible with existing Redis client libraries. Garnet supports the creation of scalable clusters for data caching, which can utilize replication, key migration, and data segmentation between cluster nodes. The project is written in C# with a storage core in C++, is open-sourced under the MIT license, and can run on all platforms supported by .NET (with Linux and Windows as the primary platforms).

Data is stored using the Tsavorite engine (a fork of Microsoft's FASTER store), which supports multi-threaded request processing, transactions, non-blocking checkpointing, recovery from failures, redundant backup storage, and operation logging. The network handler in Garnet is built using shared memory architecture proposed by the research project ShadowFax. TLS processing and interaction with the storage are executed in a single thread, allowing for reduced overhead on thread switching and more efficient CPU cache usage during data transmission over the network.

The architecture of Garnet separates the logic for parsing and processing requests from storage operations. Data is stored using two key-value stores implemented based on the Tsavorite library. The first 'primary' store is optimized for fast string operation execution, while the second 'object' store is optimized for hosting complex objects and advanced data types such as hashes and lists. Data types in the second store are implemented using .NET libraries. Data is stored in the heap (C# heap), allowing for efficient updates, and in a serialized form on disk.

Microsoft has opened the code for the Garnet store, compatible with Redis

Features of Garnet:

  • Multi-tier storage deployment is possible, encompassing RAM, SSDs, and cloud storage, where less frequently accessed data is pushed to slower storage to create caches larger than RAM.
  • Expandable device support allowing the creation of layers optimized for various devices, such as layers for SSDs, hard drives, and Azure Storage cloud storage.
  • An efficient mechanism for reusing released memory space, preventing fragmentation.
  • Configurable limits on the size of memory used for indexes, logs, and object storage.
  • The RESP protocol is used for accessing the storage, allowing Garnet to work with unmodified Redis clients.
  • Support for storing both string values and complex data structures such as lists, hashes, sets, sorted sets, and geolocation data. Ability to define a key's time-to-live.
  • An API is available for executing analytical queries (HLL/Hyperloglog, Bitmap), transactions (MULTI/EXEC), and for utilizing the publish/subscribe paradigm.
  • Tools for flexible access management through ACL are available.
  • The ability to define the configuration in JSON format or redis.conf.
  • Support for connecting additional network handlers. The option to encrypt traffic using TLS (based on SslStream).
  • The ability to create extensions in C# that implement additional operations on strings and objects.
  • Support for transactional stored procedures covering multiple keys.
  • The ability to restore the state from a previously saved position (checkpoint-recovery). An append-only mode (AOF) is available, where all old data remains accessible and is not overwritten.
  • Support for creating a storage cluster with replication, sharding, dynamic key migration between nodes, and recovery of failed nodes.
  • High performance and low latency in query execution. Efficient handling of small batch requests with a large number of client sessions, achieving throughput (number of processed requests per second) significantly higher than competing solutions. virtual machines In the Azure cloud, client request latencies usually do not exceed 300 microseconds. In conducted tests, Garnet significantly outperforms Redis, Dragonfly, and KeyDB in terms of performance and responsiveness. In some tests, Garnet surpasses competing systems by ten times.
    Microsoft has opened the code for the Garnet store, compatible with Redis
    Microsoft has opened the code for the Garnet store, compatible with Redis
    Microsoft has opened the code for the Garnet store, compatible with Redis
    Microsoft has opened the code for the Garnet store, compatible with Redis

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster