Thread Pool Manager for Messaging System Bottlenecks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing messaging systems, such as those using RabbitMQ, face bottlenecks during peak periods due to single consumers being overwhelmed by high data volumes, leading to delays in processing messages for other tenants, especially when data is replicated to cloud components, and the scaling of consumer threads can adversely affect the system.
Innovation Solution
Implementing a thread pool with a thread manager that dynamically controls the number of active threads, using a round-robin approach to ensure equal access to threads and scaling up or down based on traffic volume, while maintaining message processing in FIFO order.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If one consumer is assigned per queue to process messages, then message processing reliability is improved, but processing speed deteriorates during peak periods due to single consumer bottlenecks
Solution Approach 1:
Multiple consumer threads are merged to work on the same queue simultaneously. The patent implements a thread pool where multiple consumer threads can process messages from the same queue in parallel, combining their processing capabilities to handle high-volume traffic while maintaining reliable message delivery through coordinated thread management.
2Adaptability or versatility
If one consumer thread is assigned per tenant to ensure fair processing, then tenant isolation is improved, but system resource utilization deteriorates due to excessive thread creation
Solution Approach 1:
Consumer threads are made universal by allowing them to serve multiple tenants through queue assignment. Instead of dedicating one thread per tenant, the patent implements a shared thread pool where threads can be dynamically assigned to different tenant queues based on load, enabling one thread to perform multiple functions across different tenants.
Solution Approach 2:
The consumer thread assignment is made dynamic rather than static. The patent implements a thread manager that dynamically assigns and reassigns consumer threads to different tenant queues based on current traffic conditions, allowing the system to adapt to varying loads while maintaining tenant isolation guarantees.
3Productivity
If consumer threads are scaled up to handle peak traffic, then message processing capacity is improved, but system stability deteriorates due to inordinate number of threads
Solution Approach 1:
The patent changes the parameter of thread management from unbounded scaling to bounded pooling. Instead of allowing the number of threads to grow indefinitely with traffic, the system implements a fixed-size thread pool with configurable maximums, and uses parameter adjustments in thread assignment strategies to handle varying loads within stable boundaries.
Data Source
AI summary
A thread pool of consumers polls existing queues. A thread manager controls the number of active threads. This approach limits the number of threads, but is still able to keep up with the volume of traffic.


