Sharded Polling System Fairness Mechanism
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing systems face challenges in providing fair access to resources, as large data producers can monopolize resources, leading to delays for smaller producers, and previous techniques like throttling are unpredictable and unfair.
Innovation Solution
A shard polling system that implements a fairness algorithm, using shard and global permit counters to ensure equal distribution of data, where shard pollers obtain permits to fetch items from shards and place them in queues, and a global process moves items from these queues to a global output queue in a round-robin manner.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If large data producers are allowed to access resources without restriction, then their data production speed is improved, but resource monopolization occurs and smaller producers are delayed
Solution Approach 1:
The system divides the resource access control into multiple independent permit counters (shard-level counters and global counters) rather than a single centralized control. Each shard has its own permit counter that independently tracks and regulates access, preventing any single producer from monopolizing the entire system while maintaining high throughput for individual shards.
Solution Approach 2:
The patent introduces permit counters as intermediary components between producers and resources. These counters act as mediators that regulate access by granting or denying permits, thereby controlling the flow of data production requests and preventing harmful monopolization while allowing legitimate high-speed production.
2Object-generated harmful factors
If throttling techniques are used to control resource access, then resource monopolization is prevented, but the results become unpredictable and unfair
Solution Approach 1:
The system performs preliminary actions by pre-allocating permits to each shard through permit counters before actual data production occurs. This advance allocation ensures that each shard has a guaranteed level of access rights, making the system predictable and fair while still preventing monopolization through the global permit counter constraints.
Solution Approach 2:
The patent implements feedback mechanisms where permit counters continuously monitor resource usage and dynamically adjust permit availability. When resources are under-utilized, more permits become available; when over-utilized, permits are restricted. This feedback loop ensures predictable and fair resource distribution while preventing monopolization.
Data Source
AI summary
A shard polling system fairly distributes stored items from producers to consumer processes and includes polling threads that poll for items from respective portions of a storage source, place the items in respective queues, and increment a global permit counter, restricted to a configurable maximum, that tracks the quantity of messages across the respective queues. The polling threads are restricted by respective shard permit counters that limit a quantity of items that may be moved from a storage source to a respective queue. A global thread applies a fairness technique, such as round robin, to fairly obtain the items from each of the respective queues and places the items in a global queue, decrementing the global permit counter, and incrementing the respective shard permit counter for each item obtained. Consumer threads poll the global queue (e.g., a blocking output queue) for the messages.


