Tenant Queue Scheduling for Fair Distributed Operation Batching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Multi-tenant distributed systems face challenges in resource allocation fairness and scalability, leading to poor user experience and system inefficiency due to over-allocation to one tenant, which can cause data corruption and system crashes.
Innovation Solution
Implement a tenant-specific work item queue and a tenant scheduler that iteratively adds batches of operations to an execution queue, ensuring fair access to resources and preventing data corruption by serializing potentially conflicting operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If operations from a single tenant are processed sequentially in the execution queue, then data corruption is avoided, but resource utilization fairness deteriorates and other tenants are starved
Solution Approach 1:
The patent segments the execution queue into multiple parallel queues, each dedicated to a specific tenant. This allows operations from different tenants to be processed in parallel without interfering with each other, thus maintaining data integrity while improving resource utilization fairness. The segmentation prevents one tenant from monopolizing the execution queue and starving others.
Solution Approach 2:
The patent introduces a queue manager as an intermediary component that coordinates between the execution queue and compute nodes. The queue manager ensures that operations are distributed fairly across tenants while maintaining proper sequencing within each tenant's queue, thus preventing data corruption caused by concurrent modifications while ensuring fair resource allocation.
2Productivity
If compute nodes request work items continuously from the execution queue, then system efficiency is improved, but tenant starvation occurs when one tenant has excessive operations
Solution Approach 1:
The execution queue is segmented into multiple tenant-specific queues, allowing compute nodes to efficiently process operations from different tenants in parallel. This segmentation enables continuous work item requests to be fulfilled without any single tenant monopolizing the queue, thus maintaining both system efficiency and tenant resource access fairness.
Solution Approach 2:
The system implements periodic batching of operations from each tenant into fixed-size batches before adding them to the execution queue. This periodic action prevents any single tenant from overwhelming the system with continuous operations, ensuring that other tenants receive fair access to compute nodes while maintaining high system efficiency through batch processing.
3Reliability
If thousands of operations from one tenant are queued sequentially, then correctness is maintained, but system scalability deteriorates and processing time increases
Solution Approach 1:
The patent segments large volumes of operations from a single tenant into smaller batches that are distributed across multiple compute nodes. This segmentation allows parallel processing of operations that would otherwise need to be executed sequentially, significantly reducing processing time while maintaining operation correctness through proper batch management and dependency tracking.
Solution Approach 2:
The system allows multiple compute nodes to process operations from the same tenant's queue simultaneously, performing more operations in parallel than would traditionally be allowed. This partial relaxation of sequential processing constraints, combined with proper batch management, reduces processing time while maintaining correctness through batch-level coordination.
4Ease of operation
If retries are allowed for stalled operations, then customer experience is improved, but system bandwidth and processing capacity are consumed excessively
Solution Approach 1:
The patent segments retry logic into tenant-specific retry queues rather than allowing global retries. This segmentation ensures that retries for one tenant do not consume bandwidth and processing capacity that should be allocated to other tenants. Each tenant's retry operations are isolated and processed independently, improving customer experience while preventing system resource exhaustion.
Data Source
AI summary
Operation requests received from a tenant are added to a tenant-specific queue. A tenant scheduling work item is added to an execution queue that is shared with other tenants. When the tenant scheduling work item is executed, it copies up to a defined number of scheduled operations from the tenant-specific queue to the execution queue. The tenant-scheduling work item then re-adds itself to the execution queue. While the operations are executed and before the tenant scheduling work item is executed again, other tenants have an opportunity to queue their own operations. The tenant scheduling work item selects scheduled operations from the tenant-specific queue in the order they were originally requested until one of several conditions is met. Conditions may be based on how many operations are in progress, what kind of operations are in progress, and/or dependencies between operations of different types.


