rbeckman-nextgen / test-mc3

0 stars 0 forks source link

Dynamic Threads Allocation for Mirth Results Sender #3713

Open rbeckman-nextgen opened 4 years ago

rbeckman-nextgen commented 4 years ago

Since I had to do this manually last night, I am very confident that this new feature would be a fantastic improvement. The following settings would be required:

  1. Global maximum size of MR Sender threads pool.
  2. Maximum number of dynamically allocated threads for each channel. Currently, the number of threads in a channel is a static number, each channel is always using that many threads.
  3. Queue threshold.
  4. Priority for each channel.

The way it would work is that each channel usually works with one thread until the number of its queued messages surpasses the threshold. At that point, some clever logic kicks in evaluating how many threads are currently running on the system, what are the active channels' priorities and how big are their queues. Based on these calculations, additional threads are allocated to the channel in question. Thread pool monitor would constantly evaluate the status of active channels increasing or decreasing their allocated threads according to the "clever logic".

Implementing this feature would allow to maintain maximum performance/message throughput while preventing overload of the receiving system (Mirth Results).

Imported Issue. Original Details: Jira Issue Key: MIRTH-3850 Reporter: aitougan Created: 2015-12-08T07:08:41.000-0800

rbeckman-nextgen commented 4 years ago

On a second thought, this should not be reserved exclusively for Mirth Results Sender - the Global Thread Pool Size setting should be in the Resource Settings (for any added resource).

Imported Comment. Original Details: Author: aitougan Created: 2015-12-08T07:32:24.000-0800