Indexing Technique for Distributed Key-Value Storage Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Distributed caching layers face challenges in efficiently storing and retrieving data across different types of storage while ensuring data integrity, particularly in large-scale systems like genome-related data analysis, where existing solutions often result in high latency, low throughput, and SSD drive wearout due to inefficient storage selection and data migration.
Innovation Solution
Implementing an index with extensible primary and secondary tables in a distributed caching layer that generates key hashes to dynamically select storage based on key-value pair size and access frequency, allowing for flexible storage allocation and minimizing SSD wear by migrating data during reads rather than writes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If data is stored in distributed caching layer with transparent storage selection, then storage flexibility and data integrity are improved, but system latency increases and throughput decreases
Solution Approach 1:
The system pre-computes and stores metadata including key hashes, value sizes, and optimal storage location information in an index structure before data access occurs. This preliminary indexing allows the caching layer to immediately determine storage locations and retrieve data without performing complex storage selection algorithms during read operations, thereby reducing latency while maintaining storage flexibility
Solution Approach 2:
An index structure acts as an intermediary between the application and the distributed storage system. The index contains pre-computed key hashes and storage location mappings that enable rapid data retrieval without requiring the application to understand or participate in storage selection decisions, thus reducing system latency while preserving storage adaptability
2Adaptability or versatility
If existing storage selection methods are used, then data can be stored across different storage types, but SSD drive wear increases due to frequent migrations
Solution Approach 1:
The system determines optimal storage locations and migration strategies in advance by pre-computing key hashes and storing them in the index along with value size information. This allows the system to predict when and where data migrations will occur, enabling proactive management of SSD wear through wear-leveling algorithms and deferred migration until SSD capacity or health thresholds are approached
Solution Approach 2:
The system monitors SSD health metrics, capacity utilization, and access patterns continuously, using this feedback to dynamically adjust migration timing and storage selection. When SSDs approach capacity or show signs of degradation, the system uses the pre-stored index information to migrate data proactively, distributing wear across multiple devices and extending overall system longevity while maintaining multi-storage flexibility
3Productivity
If efficient storage selection is implemented, then throughput increases, but system complexity increases
Solution Approach 1:
The system divides the complex storage management task into separate components: an index structure that stores pre-computed key hashes and storage location mappings, and a simplified retrieval process that only needs to lookup and follow pointers. This segmentation allows high throughput operations to proceed using simple index lookups while the complex storage selection logic is encapsulated in the pre-built index structure
Solution Approach 2:
The index structure is designed to be self-updating and self-maintaining, automatically recomputing key hashes and updating storage location mappings when data is added or modified. This self-service capability reduces the need for complex external management systems while maintaining high throughput through efficient, automated index maintenance that operates independently of application logic
Data Source
AI summary
An application and a plurality of types of storage in a distributed storage system are communicated with. A write instruction that includes a key-value pair that in turn includes a key and value is received from the application. The key-value pair is stored in a selected one of the plurality of types of storage where the selected type of storage is selected based at least in part on a size or access frequency of the key-value pair. A link to the stored key-value pair is stored, including by: generating a key hash based at least in part on the key from the key-value pair and selecting one of a plurality of rows in an extensible primary table in an index based at least in part on the key hash. If it is determined there is sufficient space, the link to the stored key-value pair is stored, in the selected row. If it is determined there is insufficient space, the key-value pair is stored in an overflow row in a secondary table.


