Hierarchical Scheduler for Fair Resource Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing scheduling systems face challenges in large-scale processing of requests, particularly in ensuring fairness and efficiency in resource allocation across multiple users and workers, while handling varying service rates and constraints.

Innovation Solution

A configurable, hierarchical scheduler is implemented, which distributes loads across different queues based on various factors such as IP address, user ID, time of delivery, and service rates. This scheduler uses multiple levels of queuing mechanisms, including rate-limit queues and concurrency throttling, to manage resource allocation and ensure fairness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If a single queue processes all requests in order, then simplicity is maintained, but high-volume users can monopolize resources and cause delays for low-volume users

Engineering Contradiction:
Improvequeue management simplicityVSAvoidfair resource allocation
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent divides a single queue into multiple user-specific queues organized in a hierarchical structure. Each user has their own queue at the leaf level, and these are grouped under parent queues representing different user groups or rate limits. This segmentation prevents any single user from monopolizing system resources while maintaining manageable complexity through the hierarchical organization.

Inventive Principle:
Principle #1Segmentation

2Reliability

If multiple independent queues are created for each user, then fair resource allocation is achieved, but system complexity increases significantly

Engineering Contradiction:
Improvefair resource allocationVSAvoidqueue management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a nested hierarchical queue structure where user-specific queues are nested within parent queues, which are themselves nested within higher-level rate limit queues. This nesting allows the system to manage thousands of user queues through a compact hierarchical representation, reducing the effective complexity from O(n) independent queues to O(log n) hierarchical levels while maintaining fair resource allocation.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Ease of operation

If requests are processed in first-come-first-served order, then simplicity is maintained, but requests with different service rates cause unreasonable delays for low-bandwidth users

Engineering Contradiction:
Improvescheduling simplicityVSAvoiddelay for low-volume users
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies different scheduling qualities to different levels of the queue hierarchy. Leaf-level user queues can use simple FIFO ordering, while parent queues implement rate limiting and weighted scheduling based on user bandwidth characteristics. This local differentiation allows the system to optimize for both simplicity (at user level) and fairness (at aggregate level), preventing high-volume users from causing excessive delays for low-volume users.

Inventive Principle:
Principle #3Local quality

4Reliability

If rate limiting is applied per user, then resource monopolization is prevented, but control over distributed workers becomes complicated

Engineering Contradiction:
Improveresource allocation fairnessVSAvoiddistributed control complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The hierarchical queue structure acts as an intermediary layer between rate limiting logic and distributed worker management. Parent queues at intermediate levels aggregate requests from multiple users and apply rate limiting before distributing to workers. This intermediary approach prevents resource monopolization while simplifying worker control, as workers only need to process requests from their assigned parent queue without needing to understand individual user rate limits.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12288096B2Hierarchical scheduler
Publication Date: 2025.04.29 TWILIO INC
  • US12288096B2 patent drawing
  • US12288096B2 patent drawing
  • US12288096B2 patent drawing

AI summary

Methods, systems, and computer programs are directed to the implementation of configurable hierarchical schedulers with multiple levels, where each level may use one of several types of queueing mechanisms. A configurable, hierarchical scheduler is designed to handle large scale processing of requests (e.g., transmitting outgoing messages). The hierarchical scheduler distributes the loads to different queues handling different types of messages (e.g., by user ID, by Internet Address (IP), by schedule). The different layers of the hierarchical scheduler are configurable to queue and schedule traffic based on many factors, such as IP address, handling reputation, available downstream bandwidth, fairness, concurrency rates to handle multiple constraints, scheduling per client, time of delivery constrains, rate limits per user, domain scheduling per user, concurrency throttling per outbound channel, and sharing global rate limits across service processors.