Skip to content

feat: support optional Ray actor resource affinity - #6

Open
RexFlux wants to merge 6 commits into
redai-studio:mainfrom
RexFlux:feat/ray-resource-affinity
Open

feat: support optional Ray actor resource affinity#6
RexFlux wants to merge 6 commits into
redai-studio:mainfrom
RexFlux:feat/ray-resource-affinity

Conversation

@RexFlux

@RexFlux RexFlux commented Sep 8, 2026

Copy link
Copy Markdown

Summary

  • Add optional required_node_resource configuration for the
    TransferQueueController and SimpleStorage actors.
  • Select eligible live Ray nodes and apply hard node affinity.
  • Preserve existing scheduling behavior when the option is omitted or null.
  • Fail fast when no eligible node exists.
  • Log explicit affinity selection at INFO level, following the existing
    TQ_LOGGING_LEVEL configuration.

Validation

  • Resource-affinity tests: 10 passed.
  • Verified hard-affinity creation requests and actual actor placement
    in a live mixed stable/elastic Ray cluster.
  • Verified continued TQ consumption without restarting the TQ actors.
  • The new logging patch has unit-test coverage; it is not yet included
    in the running CE image.

Scope

  • No changes to the default logging level.
  • No changes to configurations that do not enable resource affinity.
  • Full 100-step elastic CE validation is still in progress.

Allow the TransferQueue controller and SimpleStorage units to opt into hard node affinity based on a user-defined Ray custom resource. Preserve existing scheduling when unset and fail fast when no alive node matches.
Comment thread transfer_queue/storage/bootstrap/simple_storage_bootstrap.py
Comment thread transfer_queue/utils/common.py Outdated
Preflight storage affinity and account for per-node CPU capacity, including
Controller CPU on its actual Ray node. Roll back only resources owned by
failed affinity initialization and invalidate failed attachment handles.

Add lifecycle, race, retry and heterogeneous-capacity regression tests.
Validation: 154 tests, pre-commit checks, and isolated multi-node Ray init/retry.
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.

2 participants