Weighted Auto-Sharding for Distributed Data Load Balancing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data sharding methods, such as consistent hashing, fail to effectively balance workloads across multiple servers, leading to inefficient key movements, high replication, and fragmentation, especially when dealing with both large and small sets of client keys, and do not allow for optimal tradeoffs between imbalance and cost.

Innovation Solution

The method involves partitioning data sets into multiple partitions based on key values, iteratively determining workload distribution, and performing weighted auto-sharding move operations to balance loads, which includes selecting the move operation with the highest weight and implementing it, while avoiding moves that do not meet a minimum benefit threshold, allowing for explicit tradeoffs between imbalance and cost.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If consistent hashing is used to distribute data across servers, then data distribution is achieved, but workload balancing deteriorates leading to inefficient key movements and high replication

Engineering Contradiction:
Improvedata distributionVSAvoidworkload balancing efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The system dynamically adjusts shard assignments based on real-time workload metrics rather than using static consistent hashing. The load balancer continuously monitors server performance and reassigns partitions to maintain optimal workload distribution, transforming the static data distribution mechanism into a dynamic workload-aware system.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The invention changes the parameters used for data distribution from simple hash-based key mapping to workload-aware metrics including server CPU utilization, memory usage, and network I/O. This parameter transformation enables the system to balance workloads effectively while maintaining data distribution across the cluster.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If traditional sharding methods are used, then data partitioning is achieved, but key movements increase leading to high replication and fragmentation

Engineering Contradiction:
Improvedata partitioningVSAvoidkey movements
Core Design Contradiction:
Quantity of substanceVSLoss of substance

Solution Approach 1:

The system implements feedback mechanisms where the load balancer continuously monitors workload distribution and uses this information to make informed decisions about partition assignments. This feedback loop prevents unnecessary key movements by only triggering reassignments when actual workload imbalance is detected, rather than performing periodic reshuffling.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary workload assessment before executing any partition migration. By evaluating current server loads and predicting the impact of potential moves, the system prevents fragmentation and excessive replication by only executing moves that will improve overall workload distribution.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If load balancing operations are performed frequently, then workload distribution improves, but system overhead and cost increase

Engineering Contradiction:
Improveworkload distributionVSAvoidsystem overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The load balancer performs workload assessment and partition reassignment operations periodically rather than continuously. This periodic action reduces system overhead by avoiding constant monitoring and reassignment operations, while still maintaining effective workload distribution through strategically timed adjustments based on workload thresholds.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS20240064196A1Weighted auto-sharding
Publication Date: 2024.02.22 GOOGLE LLC
  • US20240064196A1 patent drawing
  • US20240064196A1 patent drawing
  • US20240064196A1 patent drawing

AI summary

Methods, systems, and apparatus for automatic sharding and load balancing in a distributed data processing system. In one aspect, a method includes determining workload distribution for an application across worker computers and in response to determining a load balancing operation is required: selecting a first worker computer having a highest load measure relative to respective load measure of the other work computers; determining one or more move operations for a partition of data assigned to the first worker computer and a weight for each move operation; and selecting the move operation with a highest weight the selected move operation.