Skip to content

Conversation

@skurfuerst
Copy link
Contributor

If you have a multi-tenant application, you might want to use one wait-list per tenant (e.g. for import jobs),
combined with global concurrency limits (depending on the globally available server resources).

To enable this, do the following:

  • queue_strategy: partitioned_replace: Enabled partitioned wait list
  • queue_partition_limit: 1 (or higher): Configure the number of wait-list slots per tenant. The last slot gets replaced
    when the wait-list is full.
  • can be combined with arbitrary start_delay and concurrency as expected

Full example:

pipelines:
  do_something:
    queue_strategy: partitioned_replace
    # prevent starvation
    queue_partition_limit: 2
    concurrency: 1
    # Queues a run of the job and only starts it after 10 seconds have passed (if no other run was triggered which replaced the queued job)
    start_delay: 10s
    tasks: # as usual

Additionally, when submitting a job, you need to specify the queuePartition argument:

POST /pipelines/schedule

{
  "pipeline": "my_pipeline",
  "variables": {
    ...
  },
  "queuePartition": "tenant_foo"
}

@skurfuerst
Copy link
Contributor Author

also contains lots of cleanups and a critical bugfix (87d979e)

@skurfuerst skurfuerst merged commit b692da9 into main Aug 15, 2025
5 checks passed
@skurfuerst skurfuerst deleted the partitioned_waitlist branch August 15, 2025 12:01
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

Successfully merging this pull request may close these issues.

3 participants