Heat-Based Load Balancing for Database Cache Warm-Up

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Multi-node databases face performance issues due to cold caches when a server restarts, as random allocation of read requests can lead to increased disk reads and network traffic, negatively impacting database performance.

Innovation Solution

Implementing a heat-based load balancing method that adjusts the allocation of read requests based on cache miss rates, gradually warming up the cache by initially assigning fewer requests to a node with a cold cache and increasing the fraction as it warms up, while minimizing network traffic by redistributing requests according to calculated fractions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If read requests are randomly allocated to nodes, then load distribution is simple, but cache miss rates increase when a node restarts

Engineering Contradiction:
Improverequest allocation complexityVSAvoidcache performance
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The system dynamically adjusts the allocation function based on real-time cache miss rates. When a node restarts with a cold cache, its allocation fraction is automatically reduced. As the cache warms up and miss rates decrease, the fraction gradually increases. This dynamic adaptation resolves the contradiction by making the allocation system responsive to actual cache performance rather than using static random allocation.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system implements feedback loops where cache miss rates are continuously monitored and used to adjust the allocation function. The allocation fraction for each node is modified based on its recent performance, creating a closed-loop control system that automatically optimizes request distribution to minimize overall cache miss rates while maintaining simple operation.

Inventive Principle:
Principle #23Feedback

2Productivity

If more requests are sent to a node with cold cache, then load balancing is improved, but disk reads and network traffic increase

Engineering Contradiction:
Improveload balancing efficiencyVSAvoiddisk reads and network traffic
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system changes the allocation parameter (request fraction) based on cache state. Nodes with cold caches are assigned lower allocation fractions, directly reducing the number of requests they receive and thereby reducing disk reads and network traffic. As caches warm up, parameters are adjusted to restore full load balancing efficiency, resolving the contradiction between productivity and energy loss.

Inventive Principle:
Principle #35Parameter changes

3Ease of manufacture

If uniform request distribution is used, then implementation is simple, but performance degrades when caches are cold

Engineering Contradiction:
Improveimplementation simplicityVSAvoiddatabase performance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The system performs preliminary actions by pre-warming caches before full load is applied. When nodes restart, they initially receive reduced request fractions, allowing the cache to be pre-filled with frequently accessed data. This preliminary warming action prevents performance degradation during the transition to uniform distribution, maintaining both simplicity and productivity.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11157561B2Heat-based load balancing
Publication Date: 2021.10.26 SCYLLA DB LTD
  • US11157561B2 patent drawing
  • US11157561B2 patent drawing
  • US11157561B2 patent drawing

AI summary

Methods, apparatus and computer software products implement embodiments of the present invention that include receiving requests from clients to access a corpus of data that is replicated on a group of servers, and distributing the requests among the servers for execution in accordance with an allocation function, which indicates a respective fraction of the requests that is to be assigned to each of the servers for execution. Respective cache miss rates incurred by the servers in responding to the requests that are distributed to each of the servers are measured, and the allocation function is adjusted responsively to the cache miss rates.