Skip to content

[docs][core] Document the embedded RocksDB GCS backend - #64731

Merged
rueian merged 7 commits into
ray-project:masterfrom
jhasm:jhasm/docs-rocksdb-gcs-backend
Jul 28, 2026
Merged

rueian merged 7 commits into
ray-project:masterfrom
jhasm:jhasm/docs-rocksdb-gcs-backend

Conversation

@jhasm

@jhasm jhasm commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

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: 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

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

  • I've signed off every commit (git commit -s) to meet the DCO requirement.
  • Docs-only change; verified all touched files map to the doc tag.
  • AI assistance was used to draft and revise these docs.

@jhasm
jhasm requested review from a team and andrewsykim as code owners July 13, 2026 22:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@rueian rueian self-assigned this Jul 14, 2026
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jul 14, 2026
jhasm and others added 4 commits July 15, 2026 01:02
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]>
@jhasm
jhasm force-pushed the jhasm/docs-rocksdb-gcs-backend branch from 0cb8bc8 to 951405f Compare July 15, 2026 01:02
- ReadWriteOnce
resources:
requests:
storage: 10Gi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should warn users about the cloud throughput implications on the storage size.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to the latest released version of Ray that has the RocksDB backedn

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 andrewsykim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@rueian rueian added the go add ONLY when ready to merge, run all tests label Jul 28, 2026
@rueian
rueian enabled auto-merge (squash) July 28, 2026 00:15
@rueian
rueian merged commit fb92ada into ray-project:master Jul 28, 2026
5 checks passed
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants