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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating Task Scheduling and Execution #546

Open
Blejwi opened this issue Oct 1, 2024 · 4 comments
Open

Separating Task Scheduling and Execution #546

Blejwi opened this issue Oct 1, 2024 · 4 comments

Comments

@Blejwi
Copy link

Blejwi commented Oct 1, 2024

Hi,

I’m wondering if it’s possible to separate the scheduling and processing of tasks.

In my scenario, I have an API instance responsible for scheduling tasks, and I would like to have multiple worker instances dedicated to executing those scheduled tasks. This is to keep the API instance under a lighter load.

Additionally, is it possible to configure the executor to pick up only specific types of tasks? For example, I’d like to set up a separate instance for heavy, long-running tasks and scale those independently from the instances handling short tasks.

Thanks in advance!

@osoykan
Copy link
Contributor

osoykan commented Oct 8, 2024

In my scenario, I have an API instance responsible for scheduling tasks, and I would like to have multiple worker instances dedicated to executing those scheduled tasks. This is to keep the API instance under a lighter load.

This is possible as far as I know, if you don't start the scheduler, and use the SchedulerClient interface for scheduling-only purposes, it should be fine.

Workers can use Scheduler by starting.

Additionally, is it possible to configure the executor to pick up only specific types of tasks? For example, I’d like to set up a separate instance for heavy, long-running tasks and scale those independently from the instances handling short tasks.

For this one, i am not sure, as far as I have used the library, as soon as something is not KnownTask then it should be removed from the table. What you can do is, create separate schedulers hence separate tables for each scheduler you wanna prioritize. As if a separate queue.

@Blejwi
Copy link
Author

Blejwi commented Oct 8, 2024

That's great. Are you aware if there is a feature to have multiple job queues and dedicated executors for each of them?

@osoykan
Copy link
Contributor

osoykan commented Oct 8, 2024

I edited my post to answer that :) @Blejwi

@Blejwi
Copy link
Author

Blejwi commented Oct 8, 2024

Thanks, I'll play with the configuration and verify if that's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants