Add support for running multiple orchestrators at once with sidekiq - #470
Draft
adamruzicka wants to merge 6 commits into
Draft
Add support for running multiple orchestrators at once with sidekiq#470adamruzicka wants to merge 6 commits into
adamruzicka wants to merge 6 commits into
Conversation
within a single redis instance.
This relies on having per-orhcestrator-instance queues
`dynflow-orhcestrator:${UUID}`. The orchestrators talk with workers
using the regular queues (like `default`), the workers talk back to
orchestrators using the per-orchestrator-instance queues. Execution
plans are distributed to orhcestrators using round-robin, while ordering
of things within a single execution plan is kept.
Multi-orchestrator setups leave behind a dynflow_orchestrator:<world_id> Sidekiq queue when an orchestrator dies without a clean shutdown. Sweep these during startup validity checks, removing any queue whose world id is not a currently active executor world.
Covers the pieces added for running multiple orchestrators: World#id being configurable, executor.prune_orphaned_queues being invoked from perform_validity_checks, per-orchestrator reply queue detection and fallback, the Redis lock/drain flow being bypassed once a subqueue is configured, reply-queue routing in feed_pool, sender-based work_finished gating, and the drain/startup-complete recovery round trip.
adamruzicka
force-pushed
the
multi-orchestrator
branch
from
August 12, 2026 12:51
b4c6ecf to
13433fb
Compare
Tests the new per-orchestrator queue feature by spawning two orchestrators with distinct queue names (dynflow_orchestrator:orch-a and orch-b), one worker, and verifying that jobs get distributed across both orchestrators via round-robin scheduling.
orchestrator_queue was only assigned when matching the per-orchestrator
queue pattern, so the global "dynflow_orchestrator" queue case left it
nil and split(':') blew up.
adamruzicka
force-pushed
the
multi-orchestrator
branch
from
August 12, 2026 13:11
13433fb to
42be4be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.