Skip to main content
RunBook Academy

CephXLV · RADOS Gateway (RGW)RADOS Gateway (RGW)

RGW: translating S3 into RADOS

Intermediate⏱ ~17 minradosgw-adminrados

What you'll learn

  • Trace an S3 PUT through the gateway to RADOS
  • Identify which pools each stage touches
  • Explain why gateways hold no state
  • Use the request path to structure an investigation

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

RGW performance problems are almost always in one of three places: the gateway process, the index pool, or the data pool. Knowing which stage of the request touches which makes the investigation short.

A PUT, stage by stage

graph TD
    A[S3 client PUT] --> B[RGW: authenticate signature]
    B --> C[RGW: resolve bucket and user - meta pool]
    C --> D[RGW: check policy and quota]
    D --> E[RGW: write data objects - data pool]
    E --> F[RGW: update bucket index - index pool]
    F --> G[RGW: 200 OK]
StagePool touchedFailure looks like
Authenticatenone (in-process)403 SignatureDoesNotMatch
Resolve bucket and user.rgw.meta404 NoSuchBucket
Quota checkcached stats403 QuotaExceeded
Write data.rgw.buckets.data500, or slow
Update index.rgw.buckets.index500, or slow

The last two are where latency lives, and they have different characteristics: data writes scale with object size, index updates are small and latency-sensitive.

Large objects

aws s3 cp large.bin s3://data/large.bin

RGW splits objects above rgw_max_chunk_size into a head object plus tail objects:

ceph config get client.rgw rgw_max_chunk_size       # 4 MiB
ceph config get client.rgw rgw_obj_stripe_size      # 4 MiB

rados -p default.rgw.buckets.data ls | head
# 8f3a2b1c.1_large.bin              ← head
# 8f3a2b1c.1__shadow_.abc123_1      ← tail
# 8f3a2b1c.1__shadow_.abc123_2

The head object carries the metadata and the first chunk; tails carry the rest. This is why a single S3 object appears as many RADOS objects.

Statelessness

A gateway holds no durable state. Everything — bucket metadata, user records, object data, indexes — is in RADOS.

Consequences:

  • Any gateway can serve any request for any bucket
  • Gateways can be added or removed without coordination
  • A gateway crash loses only the requests in flight
  • Load balancing needs no session affinity
ceph orch apply rgw default --placement="3 rgw1 rgw2 rgw3"
ceph orch ps --daemon-type rgw

Structuring an investigation

# is it the gateway process?
ceph orch ps --daemon-type rgw
journalctl -u ceph-radosgw@* --since '30 min ago' | grep -iE 'error|warn'

# is it the index pool?
ceph osd pool stats default.rgw.buckets.index

# is it the data pool?
ceph osd pool stats default.rgw.buckets.data

# per-request detail
ceph config set client.rgw debug_rgw 10      # bounded window

Slow small operations — HEAD, LIST, small PUT — point at the index pool. Slow large transfers point at the data pool or the network.

Quiz

Knowledge check · 4 questions

  1. Q1. An RGW deployment shows slow HEAD and LIST operations while large transfers achieve full throughput. Where is the problem?

  2. Q2. Any RGW gateway can serve a request for any bucket, so a load balancer in front of them needs no session affinity.

  3. Q3. Scale an RGW deployment under load.

    An RGW deployment with two gateways is saturating both on CPU during peak ingest. The index and data pools show low latency and ample headroom. The load balancer distributes evenly.

  4. Q4. Why does RGW store object metadata in the head object rather than separately?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Classify RGW performance complaints by operation size before investigating: small operations point at the index pool, large transfers at the data pool or network. Put the index pool on flash for the same reason as the CephFS metadata pool — it is small, and its latency is paid by every operation.

Cross-course references

  • Kubernetes: stateless application replicas scale the same way behind a load balancer
  • Linux: separating a metadata-intensive path onto fast storage is a recurring pattern