Skip to content

Support 1-n mapping of model_key to deployment in NDIF (model multireplica). #234

Description

@khaiwang

Enable model replicas (one-to-many mapping)

Goal

  • Support multiple concurrent replicas of the same model. First stage is strictly the 1 model_key to N replicas mapping and a naive request routing method; smart scheduling and auto‑scaling are out of scope.

Scope

  • Add a replica identity (replica_id) and use it in actor naming.
  • Allow controller/cluster to track and create multiple deployments per model_key.
  • Allow the processor to route requests across multiple replicas.
  • Update status/CLI to surface replica information.

Functional requirements

  • A model can be deployed with a specified replica count (e.g. replicas=3).
  • Each replica is a distinct Ray actor named ModelActor:{model_key}:{replica_id}.
  • Dispatcher/Processor can send requests to any available replica of the model.
  • The request will be routed based on simple statistics of ongoing requests.
  • Status APIs and CLI show replicas per model_key and their state.
  • Backward compatible: if replica_id isn’t provided, default to 0.

Non‑goals (stage 1)

  • No autoscaling, no placement optimization, no replica health‑based scheduling beyond basic
    selection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions