In-Memory Cache Segmentation for Multi-Tenant Data Isolation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Cloud application development platforms face challenges in efficiently managing and caching data across multiple users and organizations, particularly in maintaining data security and performance while handling computationally expensive and infrequently changing data.

Innovation Solution

Implementing a multi-tenant database system with an in-memory cache that uses separate caches for user sessions and organizations, along with a cache hierarchy and metadata management to ensure data security and performance, including the use of high-level and low-level caching APIs and sharding techniques.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If data is cached in an in-memory cache for multiple users and organizations, then web application performance and response times are improved, but data security and visibility control across tenants become more complex

Engineering Contradiction:
Improveweb application performanceVSAvoidcache management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The cache is segmented into separate caches for different tenants (organizations) and user sessions. Each tenant has its own isolated cache namespace, preventing data leakage while allowing efficient caching within each tenant's data. This segmentation resolves the contradiction by maintaining security through isolation while preserving performance benefits through localized caching.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A cache manager component acts as an intermediary between the application layer and the in-memory cache. It handles visibility control, security policies, and cache operations, shielding the complexity of multi-tenant cache management from individual applications. This intermediary layer enables performance optimization while centralizing the complex security and visibility management logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If separate caches are maintained for user sessions and organizations, then data security and visibility scope are maintained, but cache memory usage and management overhead increase

Engineering Contradiction:
Improvedata securityVSAvoidcache memory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

While maintaining logical separation for security, the system merges cache management operations and uses a unified cache infrastructure with namespace isolation. This allows efficient memory utilization through shared cache pools while maintaining security boundaries, reducing overall memory overhead compared to completely separate physical caches for each tenant.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The cache system is designed as a universal multi-tenant cache that can serve multiple organizations and user sessions simultaneously with a single infrastructure. The cache manager provides universal access control and visibility management, allowing the same cache resources to be efficiently utilized across multiple tenants while maintaining security, rather than requiring dedicated caches for each tenant.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Loss of energy

If computationally expensive data that changes infrequently is cached, then redundant database invocations are reduced, but cache invalidation and update management become more challenging

Engineering Contradiction:
Improveredundant database invocationsVSAvoidcache invalidation management
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by establishing cache invalidation rules and update propagation mechanisms in advance. When data changes are detected, the cache manager proactively invalidates or updates relevant cached entries across the appropriate tenant namespaces before they are accessed, preventing stale data issues without requiring complex real-time synchronization logic.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The cache system implements feedback mechanisms where the cache manager monitors data changes in the database and automatically responds by invalidating or updating cached entries. This feedback loop ensures cache consistency without manual intervention, reducing the complexity of cache invalidation management while maintaining the performance benefits of caching computationally expensive data.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9858187B2Buffering request data for in-memory cache
Publication Date: 2018.01.02 SALESFORCE INC
  • US9858187B2 patent drawing
  • US9858187B2 patent drawing
  • US9858187B2 patent drawing

AI summary

Techniques are disclosed relating to an in-memory cache for web application data. In some embodiments, received transactions include multiple operations, including one or more cache operations to access the in-memory cache. In some embodiments, transactions are performed atomically. In some embodiments, data for the one or more cache operations is stored locally in memory by an application server outside of the in-memory cache until the transaction is successfully completed. This may improve performance and facilitate atomicity, in some embodiments.