Multi-tenant Database Cache Management via Key Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern database systems face challenges in managing a multi-tenant database cache, where identifying inefficient tenants is difficult due to the unordered nature of keys, leading to inefficiencies and increased memory requirements.

Innovation Solution

The system employs pattern matching techniques to analyze cache metadata and key-value pairs, combined with key segmentation, to identify tenants and adjust cache usage parameters, thereby optimizing cache efficiency without disrupting regular data flow.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If pattern matching and key segmentation are implemented to identify tenants, then cache usage statistics accuracy is improved, but device complexity increases

Engineering Contradiction:
Improvecache usage statistics accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The key is segmented into multiple parts (e.g., tenant ID, timestamp, operation type) to enable systematic analysis and identification of tenant-specific cache usage patterns, improving measurement precision without requiring complete key parsing

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A pattern matching module acts as an intermediary between the cache system and the analysis system, extracting tenant information and usage statistics without disrupting the core cache operations, thus managing complexity

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If cache metadata is analyzed to identify inefficient tenants, then cache efficiency is improved, but loss of time increases

Engineering Contradiction:
Improvecache efficiencyVSAvoidanalysis time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

Cache metadata is collected and stored in advance during normal cache operations, so that when analysis is needed, the data is already prepared and can be processed quickly without disrupting ongoing cache operations

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The cache system continues to operate normally while metadata is continuously collected and analyzed in the background, maintaining cache efficiency while performing analysis without significant time loss

Inventive Principle:
Principle #20Continuity of useful action

3Measurement precision

If tenant identification is performed on unordered keys, then measurement precision is improved, but difficulty of detecting and measuring increases

Engineering Contradiction:
Improvetenant identification accuracyVSAvoidtenant detection difficulty
Core Design Contradiction:
Measurement precisionVSDifficulty of detecting and measuring

Solution Approach 1:

The unordered key is segmented into identifiable components, allowing the system to extract tenant information regardless of key order, maintaining measurement precision while simplifying the detection process

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of modifying the original unordered key, a copy or representation of the key with extracted tenant information is created, making measurement and analysis easier without affecting the original key structure

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11734278B2Cache management for multiple tenants
Publication Date: 2023.08.22 SALESFORCE INC
  • US11734278B2 patent drawing
  • US11734278B2 patent drawing
  • US11734278B2 patent drawing

AI summary

Techniques are disclosed in which a server computer system manages a database cache for multiple different tenants. The system may retrieve, from a database cache storing data for different tenants, a set of key-value entries and cache metadata for the set of key-value entries. Further, the system may identify, based on analyzing keys of key-value entries, tenants corresponding to respective ones of the set of key-value entries. The system may generate, based on the identified tenants and cache metadata for cache entries corresponding to the identified tenants, current usage metrics for the database cache. Based on the current usage metrics for the cache, the system may determine whether to adjust one or more operation parameters of the cache. Disclosed cache management techniques may advantageously allow for analysis of cache usage metrics for individual tenants and more efficient use of the cache (e.g., by altering cache parameters for individual tenants).