Skip to content

[Feature][History Server] Support "running" clusters by restoring state from storage #5218

Description

@win5923

Search before asking

  • I had searched in the issues and found no similar feature requirement.

KubeRay Component

historyserver

Description

Follow-up to #5199, based on community feedback in the Ray Slack.

Today the history server has two modes:

RayCluster CR Behavior
Deleted Replay the session from object storage
Running Reverse-proxy to the live head's Ray Dashboard

SessionProcessor.isDead() treats "CR exists" as live, so ProcessSession() short-circuits with SessionStatusLive and never reads storage.

// isDead determines if the RayCluster CR is absent.
//
// Known limit: An old session of a still-running RayCluster will be misclassified as live.
func (p *SessionProcessor) isDead(ctx context.Context, session utils.ClusterInfo) (bool, error) {
rc := &rayv1.RayCluster{}
err := p.k8sClient.Get(ctx, k8stypes.NamespacedName{
Namespace: session.Namespace,
Name: session.Name,
}, rc)
if apierrors.IsNotFound(err) {
return true, nil
}
if err != nil {
return false, err
}
return false, nil
}

We should add a "running" mode that restores state from storage even while the cluster is still running:

  • "running" is enabled by default, "live" (proxy) is opt-in via --enable-live-clusters
  • The snapshot refresh interval is configurable

Use case

Long-running RayClusters risk head node OOM. Users want to offload observability data to storage and read it from the history server, so the head node can keep far less. That only works if a running cluster can be served from storage instead of proxied to its head.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions