Repository navigation
[docs][core] Document the embedded RocksDB GCS backend - #64731
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds documentation and user guides for the new experimental GCS fault tolerance backend using embedded RocksDB. The review feedback points out a critical issue in the provided Kubernetes manifest: because the RocksDB backend is configured manually via environment variables, KubeRay will not automatically inject the RAY_gcs_rpc_server_reconnect_timeout_s environment variable to worker Pods. It is recommended to explicitly set this timeout to 600 seconds in the worker group specification to prevent worker Pods from terminating during head Pod recovery.
Adds user-facing documentation for the experimental embedded RocksDB GCS fault-tolerance backend introduced in ray-project#63657, which persists GCS state to a local RocksDB database on a persistent volume instead of requiring an external Redis instance. - ray-core/fault_tolerance/gcs.rst: introduce the two GCS FT backends up front and add an "Embedded RocksDB backend (experimental)" section covering the recovery model, a Redis-vs-RocksDB comparison, how to enable it (RAY_gcs_storage / RAY_gcs_storage_path), the single-writer constraint, and advanced tuning knobs. - cluster/kubernetes/user-guides/kuberay-gcs-rocksdb-ft.md: new step-by-step KubeRay how-to (PVC + env vars, recovery verification), wired into the user-guides toctree and list. - kuberay-gcs-ft.md: cross-link the new RocksDB how-to from the Redis page for discoverability. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
Align the maturity wording with Ray's governed stability taxonomy (alpha/beta/stable, per doc/source/ray-contribute/stability.md and the @publicapi(stability=...) convention). "Experimental" is not a defined Ray stability level; peer cluster/infra features (RDT, Ray Event Export, KubeRay History Server, RayService incremental upgrade) all brand as "alpha". Use the standard "in alpha and may change before becoming stable" phrasing. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
Because the RocksDB backend is configured manually via environment variables (not through gcsFaultToleranceOptions), KubeRay doesn't auto-inject RAY_gcs_rpc_server_reconnect_timeout_s to worker Pods. The 60s default is usually too short for a PersistentVolume to detach from the old node and reattach to the recovered head, so workers would terminate during recovery. Set it explicitly to 600 in the worker group. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
…mendation State the actual invariant (at most one GCS process may have the database open at a time; concurrent writers corrupt it) and frame ReadWriteOnce + a single head replica as the simplest way to guarantee it rather than the only valid setup. This leaves room for coordinated shared-volume configurations that still enforce a single active writer. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
0cb8bc8 to
951405f
Compare
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: 10Gi |
There was a problem hiding this comment.
We should warn users about the cloud throughput implications on the storage size.
There was a problem hiding this comment.
Good point, added in 091e314. I added a warning admonition after the manifest explaining that on cloud providers volume IOPS/throughput scale with provisioned size (e.g. AWS gp3, GCP pd-balanced), so because the GCS syncs every mutating write to disk, an undersized volume can throttle write latency even with free capacity to spare. It advises sizing for throughput needs rather than the metadata footprint alone and checking the StorageClass/provider docs for the size-to-throughput relationship.
Address review feedback: on cloud providers, volume IOPS/throughput scale with provisioned size. Since the GCS syncs every mutating write to disk, an undersized volume can throttle GCS write latency. Add a warning admonition advising users to size the volume for throughput, not just capacity. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
| spec: | ||
| containers: | ||
| - name: ray-head | ||
| image: rayproject/ray:latest |
There was a problem hiding this comment.
Refer to the latest released version of Ray that has the RocksDB backedn
There was a problem hiding this comment.
Addressed in 379c403. There isn't a released version with the RocksDB backend yet — it landed in #63657 (2026-07-11), after the latest tag (ray-2.55.1), so rayproject/ray:latest (which tracks the latest stable release) wouldn't include it. For now the manifest uses rayproject/ray:nightly, and I added a note telling readers to pin to a released version (rayproject/ray:X.Y.Z) once one ships the backend. Happy to swap in a concrete release tag as soon as one is available.
| storage: 10Gi | ||
| --- | ||
| apiVersion: ray.io/v1 | ||
| kind: RayCluster |
There was a problem hiding this comment.
Are we still planning on have new fields in RayCluster's spec.gcsFaultToleranceOptions to enable this? If so can we add that first and include both options in the user guide?
There was a problem hiding this comment.
That is a good point. I think we should add that to support kuberay managed storage, for better UX. But I am not sure if we want to hold off these user docs for that change, or release these docs now and update them when we have the kuberay changes. I am still debating. Both approaches have pros and cons.
There was a problem hiding this comment.
Added kuberay support in kuberay-project/kuberay#5013, and updated these docs to reflect that in commit c2107f8
…oncepts
Address review feedback:
- The embedded RocksDB backend isn't in any stable release yet, so
rayproject/ray:latest wouldn't include it. Switch the manifest images
to rayproject/ray:nightly and add a note to pin to a released version
once one ships the backend.
- Add a {ref} cross-link to the fault-tolerance-gcs-rocksdb concepts doc
from the Redis-backed KubeRay GCS FT guide's seealso block.
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Santosh Jha <[email protected]>
andrewsykim
left a comment
There was a problem hiding this comment.
LGTM, we can add the docs for using the new KubeRay APIs in a follow-up PR
KubeRay now natively supports the embedded RocksDB GCS backend via gcsFaultToleranceOptions.backend: rocksdb (kuberay-project/kuberay#5013). Rewrite the KubeRay how-to to use it instead of the manual PVC + env-var wiring: - Opt in with backend: rocksdb; the operator provisions {cluster}-gcs-pvc, mounts it at /data/gcs, sets RAY_gcs_storage / RAY_gcs_storage_path, and garbage-collects the PVC with the cluster. - Document the GCSFaultToleranceEmbeddedStorage operator feature gate (alpha, off by default). - Cover the storage sub-fields (size, storageClassName, accessModes, subPath, deletionPolicy, claimName) and the DeleteWithCluster/Retain PVC lifecycle. - Drop the manual RAY_gcs_rpc_server_reconnect_timeout_s worker setting; KubeRay now injects the 600s timeout automatically, as with the Redis backend. Co-authored-by: Copilot <[email protected]> Signed-off-by: Santosh Jha <[email protected]>
…4731) ## Description Adds user-facing documentation for the **alpha embedded RocksDB GCS fault-tolerance backend** introduced in ray-project#63657. The RocksDB backend lets the GCS persist its state to a local RocksDB database on a persistent volume instead of requiring an external Redis instance, so there's no separate datastore to run. The KubeRay how-to targets the **native** integration merged in [kuberay-project/kuberay#5013](kuberay-project/kuberay#5013), which lets users opt in with `gcsFaultToleranceOptions.backend: rocksdb` and has the operator provision, mount, and garbage-collect the persistent volume. This is a **docs-only** PR (all changes map to the `doc` build tag). The goal is to make the feature discoverable within the existing Ray fault-tolerance docs and to collect early user feedback. ## What's included - **`ray-core/fault_tolerance/gcs.rst`** — the canonical GCS fault-tolerance page. Introduces the two backends (external Redis vs. embedded RocksDB) up front and adds an "Embedded RocksDB backend (alpha)" section covering: - the recovery model (identical to Redis-backed FT; only the location of state differs), - a Redis-vs-RocksDB comparison table (when to use which), - how to enable it (`RAY_gcs_storage=rocksdb`, `RAY_gcs_storage_path`), - the single-writer constraint, and - advanced tuning knobs (`RAY_gcs_rocksdb_io_pool_size`, `RAY_gcs_rocksdb_strand_buckets`). - **`cluster/kubernetes/user-guides/kuberay-gcs-rocksdb-ft.md`** — a new step-by-step KubeRay how-to built on the native `gcsFaultToleranceOptions.backend: rocksdb` API from kuberay#5013. It covers: - opting in with `backend: rocksdb` (KubeRay provisions `{cluster}-gcs-pvc`, mounts it at `/data/gcs`, and sets `RAY_gcs_storage` / `RAY_gcs_storage_path` automatically), - enabling the alpha `GCSFaultToleranceEmbeddedStorage` operator feature gate (off by default), - the `storage` sub-fields (`size`, `storageClassName`, `accessModes`, `subPath`, `deletionPolicy`, and `claimName` for a bring-your-own PVC), - the operator-managed PVC lifecycle (`DeleteWithCluster` default vs. `Retain`), - the single-writer / `ReadWriteOnce` constraint and volume-throughput sizing, and - recovery verification by deleting the head Pod. KubeRay injects the worker `RAY_gcs_rpc_server_reconnect_timeout_s` timeout automatically (as with the Redis backend), so no manual env-var wiring is needed. It's wired into the KubeRay user-guides toctree and list. - **`kuberay-gcs-ft.md`** — cross-links the new RocksDB how-to from the Redis page. Content is authored to match the current docs organization: concept/tuning lives in `gcs.rst`, the practical Kubernetes walkthrough lives under the KubeRay user-guides, and the new page is discoverable via toctree, the guides list, and a `{seealso}` cross-reference. ## Related issues - Related to ray-project#63657 (embedded RocksDB GCS backend, REP-64). - KubeRay counterpart: [kuberay-project/kuberay#5013](kuberay-project/kuberay#5013) (merged), which adds native `gcsFaultToleranceOptions.backend: rocksdb` support. ## Additional information - New page authored as MyST Markdown (`.md`) per the docs authoring rule; the only `.rst` touched is the pre-existing `gcs.rst` (editing existing `.rst` is allowed). - The feature is branded as alpha (Ray's governed stability level) throughout, with a feedback callout. - The native KubeRay support isn't in a stable KubeRay release yet (latest is v1.6.2), so the how-to notes it requires KubeRay master/nightly, and it keeps the `rayproject/ray:nightly` image because the Ray-side backend isn't in a stable Ray release either. ## Checks - [x] I've signed off every commit (`git commit -s`) to meet the DCO requirement. - [x] Docs-only change; verified all touched files map to the `doc` tag. - [x] AI assistance was used to draft and revise these docs. --------- Signed-off-by: Santosh Jha <[email protected]> Co-authored-by: Copilot <[email protected]> Signed-off-by: 400Ping <[email protected]>
Description
Adds user-facing documentation for the alpha embedded RocksDB GCS
fault-tolerance backend introduced in #63657. The RocksDB backend lets the GCS
persist its state to a local RocksDB database on a persistent volume instead of
requiring an external Redis instance, so there's no separate datastore to run.
The KubeRay how-to targets the native integration merged in
ray-project/kuberay#5013,
which lets users opt in with
gcsFaultToleranceOptions.backend: rocksdband hasthe operator provision, mount, and garbage-collect the persistent volume.
This is a docs-only PR (all changes map to the
docbuild tag). The goal isto make the feature discoverable within the existing Ray fault-tolerance docs and
to collect early user feedback.
What's included
ray-core/fault_tolerance/gcs.rst— the canonical GCS fault-tolerance page.Introduces the two backends (external Redis vs. embedded RocksDB) up front and
adds an "Embedded RocksDB backend (alpha)" section covering:
RAY_gcs_storage=rocksdb,RAY_gcs_storage_path),RAY_gcs_rocksdb_io_pool_size,RAY_gcs_rocksdb_strand_buckets).cluster/kubernetes/user-guides/kuberay-gcs-rocksdb-ft.md— a newstep-by-step KubeRay how-to built on the native
gcsFaultToleranceOptions.backend: rocksdbAPI from kuberay#5013. It covers:backend: rocksdb(KubeRay provisions{cluster}-gcs-pvc,mounts it at
/data/gcs, and setsRAY_gcs_storage/RAY_gcs_storage_pathautomatically),
GCSFaultToleranceEmbeddedStorageoperator feature gate(off by default),
storagesub-fields (size,storageClassName,accessModes,subPath,deletionPolicy, andclaimNamefor a bring-your-own PVC),DeleteWithClusterdefault vs.Retain),ReadWriteOnceconstraint and volume-throughput sizing, andKubeRay injects the worker
RAY_gcs_rpc_server_reconnect_timeout_stimeoutautomatically (as with the Redis backend), so no manual env-var wiring is needed.
It's wired into the KubeRay user-guides toctree and list.
kuberay-gcs-ft.md— cross-links the new RocksDB how-to from the Redis page.Content is authored to match the current docs organization: concept/tuning lives
in
gcs.rst, the practical Kubernetes walkthrough lives under the KubeRayuser-guides, and the new page is discoverable via toctree, the guides list, and a
{seealso}cross-reference.Related issues
gcsFaultToleranceOptions.backend: rocksdbsupport.Additional information
.md) per the docs authoring rule; the only.rsttouched is the pre-existinggcs.rst(editing existing.rstis allowed).so the how-to notes it requires KubeRay master/nightly, and it keeps the
rayproject/ray:nightlyimage because the Ray-side backend isn't in a stable Rayrelease either.
Checks
git commit -s) to meet the DCO requirement.doctag.