Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃挕 FEATURE REQUEST]: Multiple pool support #1679

Open
Kaspiman opened this issue Aug 14, 2023 · 1 comment
Open

[馃挕 FEATURE REQUEST]: Multiple pool support #1679

Kaspiman opened this issue Aug 14, 2023 · 1 comment
Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed help-needed-hard Call for participation: Experience needed to fix: Hard / a lot P-jobs Plugin: Jobs

Comments

@Kaspiman
Copy link
Sponsor

Kaspiman commented Aug 14, 2023

Plugin

JOBS

I have an idea!

We in the company actively use JOBS plugin and process a lot of tasks.

Our monolithic application has very different queue handlers with:

  • a very long locks and small amount of tasks
  • a very short duration and huge amount of tasks
  • a regular and predictable number of tasks
  • an unpredictable task spikes
  • memory leaks

In the current JOBS implementation, all tasks added into one queue and processed by one pool of workers. Different queue handlers can greatly interfere with others. Problem handlers can take too many workers, requeue tasks too often, and take too long to process.

As a result, the JOBS-cluster performance is unstable and low.

I would like to be able to configure individual pools and assign them individual settings:

  • the most important queues will always be processed in a separate pools
  • long tasks will run separately from fast ones
  • handlers with memory leaks will be restarted more often then non-leaked
  • other problematic and experimental queues will be processed regardless of stable

The new feature proposes:

  • configuring many pools
  • start/destroy pools in parallel
  • restart certain pool in case of network error
  • collect metrics from each pool separately (maybe add tag with pool name)
  • manage each pool via console commands

Here is an example config for solving these problems:

jobs:
    pools:
        predictable_pool:
            pool:
                num_workers: 80
                max_jobs: 10000
            consume:
                - predictable_queue_1
                - predictable_queue_2
            pipelines:
                predictable_queue_1:
                    driver: amqp
                    config:
                        queue: predictable_queue_1
                        prefetch: 40
                        # ...
                predictable-queue-2:
                    driver: amqp
                    config:
                        queue: predictable_queue_2
                        prefetch: 40
                        # ...
        slow_pool:
            pool:
                num_workers: 25
                max_jobs: 100 # restart more often
            consume:
                - leaked_queue_1
            pipelines:
                # ...

The result can be a mechanism for managing many pools in a each plugin. This mechanism can be reused in the future plugins.

Comrades, what do you think of this?

@Kaspiman Kaspiman added the C-feature-request Category: feature requested, but need to be discussed label Aug 14, 2023
@Kaspiman Kaspiman changed the title [馃挕 FEATURE REQUEST]: Ability to configure separate pools for different queues with different settings [馃挕 FEATURE REQUEST]: JOBS: Ability to configure separate pools for different queues with different settings Aug 14, 2023
@rustatian
Copy link
Member

Hey @Kaspiman 馃憢馃徎 Thanks for the great idea 馃憤馃徎
I'll plant it (initially) for the 2024.0 milestone (2023.3 is full now).

@rustatian rustatian changed the title [馃挕 FEATURE REQUEST]: JOBS: Ability to configure separate pools for different queues with different settings [馃挕 FEATURE REQUEST]: Multiple pool support Aug 14, 2023
@rustatian rustatian added the P-jobs Plugin: Jobs label Aug 14, 2023
@rustatian rustatian added this to the v2024 milestone Aug 14, 2023
@rustatian rustatian removed this from the v2024.1.0 milestone Apr 15, 2024
@rustatian rustatian added the help-needed-hard Call for participation: Experience needed to fix: Hard / a lot label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: feature requested, but need to be discussed help-needed-hard Call for participation: Experience needed to fix: Hard / a lot P-jobs Plugin: Jobs
Projects
Status: 馃敄 Ready
Development

No branches or pull requests

2 participants