Enabling D3N Cache for Ceph RGW
D3N (Data Delivery Network) cache accelerates access to hot objects by using local NVMe/SSD disks on RGW nodes as a cache layer. It reduces frequent read operations to backend OSDs and significantly improves read performance for hot data.
TOC
Background
The core idea of D3N is simple but effective: instead of fetching object data repeatedly from the Ceph backend storage, RGW serves hot data directly from a local persistent cache located on fast disks (NVMe/SSD) attached to RGW nodes.
This design is especially beneficial for:
- Large object downloads
- Repeated reads of hot objects
- Bandwidth-sensitive workloads
Prerequisites
- A Ceph cluster is installed
- Rook-Ceph is deployed
- An Object Storage (RGW / CephObjectStore) is created
- High-performance local disks (NVMe / SSD) are available on RGW nodes
Operation Overview
- Deploy Ceph and create an Object Storage
- Prepare a high-speed local disk on RGW nodes and mount it to a directory
- Configure
CephObjectStoreto:- Mount the directory via
hostPath - Enable D3N-related RGW parameters
- Mount the directory via
Prepare Local Filesystem for Cache
Mount a directory on each node hosting the RGW service. It is recommended to use a high-performance dedicated disk (rather than a partition), formatted with the XFS file system, and to configure /etc/fstab to ensure the mount persists after a reboot. Replace </path/to/cache/dir> in the subsequent documentation with the actual directory path you have configured.
Enable D3N Cache in CephObjectStore
Edit the CephObjectStore resource:
Add the following configuration under gateway:
Parameters
Verify D3N Configuration
Check RGW Configuration via Ceph Tools
In the rook-ceph-tools pod, run:
Example output:
Verify RGW Logs
After the RGW pod restarts, D3N initialization logs should appear:
Example output:
Validate Cache Behavior
When downloading objects through RGW, cached files will appear in the host cache directory:
Example output:
The presence of these files confirms that RGW is serving data from the local D3N cache.