Hierarchical Timing Wheels for Distributed Task Timeout Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current solutions for managing task timeouts in distributed computing environments are inadequate, leading to negative impacts on business and customer experience, particularly as they are designed for single machine-centric and data-in-motion use cases, and fail to efficiently handle state transitions across multiple nodes in datacenters.

Innovation Solution

The implementation of hierarchical timing wheels replicated across an application cluster, combined with actor engines that handle updates, allows for the reliable and efficient management of task state timeouts across compute nodes, enabling automatic allocation and deallocation of tasks based on event detection or timeout expiration.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If hierarchical timing wheels are implemented across distributed nodes, then timeout management reliability is improved, but system complexity increases

Engineering Contradiction:
Improvetimeout management reliabilityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The timeout management system is segmented into hierarchical timing wheels with different time granularities (coarse-grained and fine-grained wheels). Each timing wheel is further divided into slots that can independently manage tasks at different time intervals. This segmentation allows the system to handle various timeout scenarios efficiently while maintaining modularity and reducing overall system complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a hierarchical dimension to timeout management by creating multiple levels of timing wheels (coarse-grained and fine-grained). This dimensional approach allows tasks to be managed at appropriate time granularities, improving reliability without requiring a single complex monolithic timing system.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Measurement precision

If hierarchical timing wheels with multiple granularities are used, then timeout precision is improved, but memory consumption increases

Engineering Contradiction:
Improvetimeout precisionVSAvoidmemory consumption
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The timing wheel is segmented into multiple granularities (coarse-grained and fine-grained levels). Each level handles specific time ranges, allowing the system to achieve high precision for short timeouts while using coarser representation for long timeouts. This reduces overall memory consumption compared to a single fine-grained timing wheel that would be required to handle all time ranges with equal precision.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a hierarchical dimension to time representation, organizing timeout management into multiple levels of granularity. This dimensional approach allows the system to optimize memory usage by representing time differently at each level, achieving high precision where needed without proportionally increasing memory consumption across the entire time range.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If tasks are automatically managed through hierarchical timing wheels, then operational efficiency is improved, but device complexity increases

Engineering Contradiction:
Improveoperational efficiencyVSAvoiddevice complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The hierarchical timing wheel system operates autonomously to manage task timeouts. When a task is assigned, the system automatically determines the appropriate timing wheel and slot, schedules the task, and executes timeout handling without requiring manual intervention. This self-service mechanism improves operational efficiency by eliminating the need for operators to manually monitor and manage task timeouts across distributed nodes.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary actions by pre-configuring hierarchical timing wheels with multiple granularities and establishing the scheduling framework in advance. This preliminary setup enables automatic task management to proceed efficiently without requiring complex real-time decision-making or manual configuration during task execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20230376339A1Methods and apparatus for managing task timeouts within distributed computing networks
Publication Date: 2023.11.23 WALMART APOLLO LLC
  • US20230376339A1 patent drawing
  • US20230376339A1 patent drawing
  • US20230376339A1 patent drawing

AI summary

Systems and methods for managing the timeout of executable task are disclosed. A task is obtained for execution, a timeout associated with a state of the task is determined, and a timeout task is allocated to a slot of a first timing wheel based on the timeout. Each of the slots of the first timing wheel corresponds to an increment of a first period. When the increment corresponding to slot of the first timing wheel expires before an event associated with the state has been received, the timeout task is deallocated from the first timing wheel, a residual time is determined, and the timeout task is allocated to a slot of a second timing wheel based on the residual time. Each of the slots of the second timing wheel correspond to an increment of a second period.