Multi-tenant Database Cache Key Identification via Pattern Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern database systems face challenges in managing a key-value cache for multiple tenants due to difficulties in identifying inefficient cache usage patterns, leading to inefficiencies and increased memory requirements, as existing methods struggle to accurately track and adjust cache usage metrics for individual tenants.

Innovation Solution

The system employs pattern matching techniques to analyze cache metadata and key-value pairs, combined with key segmentation, to identify and assign tenants, thereby generating accurate cache usage statistics and adjusting cache parameters to optimize memory usage and reduce eviction rates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If pattern matching techniques are used to identify tenants for cache keys, then measurement precision of cache usage metrics is improved, but device complexity increases

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

Solution Approach 1:

The patent introduces an intermediary component (pattern matching module) that sits between the cache system and the metrics collection mechanism. This module intercepts cache operations, extracts key patterns, and matches them against known tenant patterns without requiring changes to the underlying cache infrastructure or tenant applications, thereby improving measurement precision while containing complexity in a dedicated component.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces manual or rule-based tenant identification mechanisms with automated pattern matching technology. Instead of relying on explicit tenant identifiers in cache keys or manual configuration, the system uses computational pattern recognition to automatically identify tenant associations, improving precision while the automation manages the complexity burden.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If cache parameters are adjusted for individual tenants, then productivity of cache operations is improved, but device complexity increases

Engineering Contradiction:
Improvecache operation efficiencyVSAvoidcache management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies local quality by enabling different cache parameters (such as TTL, memory allocation, eviction policies) to be configured specifically for each tenant based on their identified usage patterns. This allows optimal performance for each tenant's workload characteristics while maintaining a unified cache infrastructure, improving overall productivity without requiring separate cache systems for each tenant.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system dynamically adjusts cache parameters for different tenants based on real-time pattern matching results and observed usage behavior. Rather than static configuration, the cache management adapts parameter settings according to identified tenant patterns and performance requirements, improving productivity while the dynamic adjustment mechanism manages complexity through automation.

Inventive Principle:
Principle #15Dynamics

3Measurement precision

If key segmentation is used to identify tenants, then measurement precision is improved, but difficulty of detecting and measuring increases

Engineering Contradiction:
Improvetenant identification accuracyVSAvoidkey analysis complexity
Core Design Contradiction:
Measurement precisionVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies segmentation by dividing cache keys into distinct components or segments (such as prefix, identifier, suffix portions) and analyzing each segment's contribution to tenant identification. This structured breakdown of keys makes the pattern matching process more systematic and accurate, improving measurement precision while the segmentation framework itself provides a manageable approach to analyzing key complexity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12105715B2Tenant identification for cache keys
Publication Date: 2024.10.01 SALESFORCE INC
  • US12105715B2 patent drawing
  • US12105715B2 patent drawing
  • US12105715B2 patent drawing

AI summary

Techniques are disclosed in which a server computer system manages a database cache for multiple different tenants. The system may compare a key having an unidentified tenant with key segments having a number of occurrences within a database cache satisfying a threshold count, where the key is included in a key-value entry of the cache storing data for multiple tenants. Key segments for keys of the database cache and corresponding occurrence counts are stored in a central database. Based on the comparing, the system determines whether the unidentified key matches one of the key segments satisfying the threshold count. In response to the system determining a match, a tenant corresponding to the unidentified key is identified based on the matching key segment. The disclosed techniques may advantageously allow for analysis of cache metrics for tenants and more efficient use of the cache (e.g., by altering cache parameters for individual tenants).