Search before asking
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?
Search before asking
KubeRay Component
historyserver
Description
Follow-up to #5199, based on community feedback in the Ray Slack.
Today the history server has two modes:
SessionProcessor.isDead()treats "CR exists" as live, soProcessSession()short-circuits withSessionStatusLiveand never reads storage.kuberay/historyserver/pkg/historyserver/session_processor.go
Lines 81 to 97 in ffec815
We should add a "running" mode that restores state from storage even while the cluster is still running:
--enable-live-clustersUse 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?