Ceph RGW (RADOS Gateway): How S3 Object Storage Works on Ceph
Ceph RGW, short for RADOS Gateway and officially the Ceph Object Gateway, is the daemon that turns a Ceph cluster into S3-compatible object storage. Applications talk HTTP to it as they would to Amazon S3, and RGW writes what they send into the same cluster that may already be holding your virtual machine disks and shared file systems.

Since MinIO’s community edition stopped taking changes, it is one of the first options anyone weighing self-hosted S3 looks at, so it pays to know how it lays your data out and where it tends to hurt in production.
What is Ceph RGW?
Ceph stores everything in RADOS, its distributed object layer, and offers three ways in: RBD for block devices, CephFS for a shared POSIX file system and RGW for objects over HTTP. RGW is an HTTP server (the radosgw process) that speaks two APIs, Amazon S3 and OpenStack Swift, over a shared namespace, so something written through one can be read through the other. It has its own users and access keys, separate from Ceph’s internal ones, and it does not use the metadata server that CephFS needs, which means you can run an object-only cluster with no MDS at all.
S3 compatibility covers the parts most software relies on: buckets, multipart uploads, versioning, lifecycle rules, bucket policies, presigned URLs, object lock, event notifications and storage classes. The notable gap is bucket replication, which only works between zones of Ceph’s own multisite setup and not towards AWS. Backup tools that write to S3, data platforms that expect an S3 endpoint and the usual SDKs work once you point them at your RGW address instead of Amazon’s.
How RGW stores your objects
Each RGW zone keeps its data in a set of pools whose names start with the zone name (default.rgw. if you never created one): small ones for configuration, users and logs, and two that matter for performance. The data pool (.rgw.buckets.data) holds the object contents, and the index pool (.rgw.buckets.index) holds one listing per bucket, split into shards, which RGW reads every time someone lists a bucket and updates on every write.
That split is why the usual design puts the two pools on different media. The data pool can live on large hard disks and use erasure coding, which stores data plus parity instead of three full copies: with a 4+2 profile, every terabyte takes 1.5 TB of raw disk instead of 3 TB. The index pool stays replicated and goes on SSD or NVMe, because index updates are many small writes to the same few objects and a slow index makes every PUT slow, however fast the data disks are. If you only have budget for flash in one place, put it here.
Deploying RGW with cephadm
On a cluster managed by cephadm, RGW is one more service. The usual pattern is to label the hosts that will act as gateways and ask the orchestrator for the daemons:
ceph orch host label add node1 rgw
ceph orch host label add node2 rgw
ceph orch apply rgw s3 --placement='label:rgw count-per-host:1' --port=8080
Without --port, cephadm binds RGW to port 80. Then you create a user, which returns the access key and secret key your applications will use, load those keys into any S3 client (aws configure, for example) and test it:
radosgw-admin user create --uid=backup --display-name="Backup service"
aws --endpoint-url http://node1:8080 s3 mb s3://test-bucket
Two gateways on their own are two separate URLs, and if a client points at the one that goes down, it stops working. cephadm can deploy an ingress service, HAProxy with keepalived holding a virtual IP, so applications see a single endpoint that survives the loss of a gateway:
service_type: ingress
service_id: rgw.s3
placement:
count: 2
spec:
backend_service: rgw.s3
virtual_ip: 192.168.10.50/24
frontend_port: 80
monitor_port: 1967
You apply it with ceph orch apply -i ingress.yaml. The ingress listens on a different port from the gateways (80 here, 8080 behind it), because HAProxy may land on the same hosts. This example serves plain HTTP, so the next step is TLS, either with a certificate on the ingress or on RGW itself. In production you want both the gateways and TLS before the first application goes live, because changing the endpoint later means touching every client.
Where RGW goes wrong in production
Buckets with tens of millions of objects. Each index shard handles up to 100,000 entries by default before RGW reshards the bucket, and dynamic resharding (on by default, up to 1,999 shards) does it online, but writes to that bucket are blocked briefly while it happens. On a bucket that takes a constant stream of writes, the application notices. If you know a bucket will be huge, a backup target for example, shard it up front with radosgw-admin bucket reshard --bucket=name --num-shards=N. A LARGE_OMAP_OBJECTS warning in ceph health is usually the first sign that an index has grown past what it should.
Space that doesn’t come back after deleting. When you delete a large object, RGW removes it from the bucket straight away but frees the disk space later, through a garbage collection process that runs in the background. After a mass deletion, such as a backup retention policy cleaning up a month of data, the space comes back gradually, and a cluster that was close to full stays close to full for a while. radosgw-admin gc list shows what is still pending, and the collector’s settings can be tuned if it can’t keep up.
Many small objects on erasure coding. Erasure coding is efficient for large files but not for millions of 4 KB objects, which lose much of the saving to padding and pay more latency for each read. If your workload is mostly small objects, logs or thumbnails for instance, a replicated pool or a separate storage class for them usually works better.
Multisite is asynchronous. RGW can replicate between clusters in different locations (a realm with zonegroups and zones), and each zone accepts writes, but replication happens after the fact. After a site failure, the newest objects may not have reached the other side yet, and that has to be accounted for in your recovery point objective. On releases older than Reef, dynamic resharding is also not available in multisite setups.
RGW or something else?
If you only need S3 on a single server, RGW is a heavy way to get it, because it brings a whole Ceph cluster with it. It makes sense when you need storage that grows by adding servers, when you want to survive the loss of disks or whole nodes, or when you already run Ceph for virtual machines and want object storage from the same hardware and the same team. We compared the options in more depth in our Ceph RGW vs MinIO guide, and if you want files rather than objects, Ceph can also export them over NFS, which we cover in Ceph NFS with Ganesha.
Frequently asked questions
Is Ceph RGW compatible with Amazon S3?
With a large subset of the S3 API, including versioning, lifecycle, bucket policies, object lock and multipart uploads. Bucket replication only works between Ceph zones. Most tools only need the endpoint URL changed.
What port does Ceph RGW use?
Port 80 when deployed with cephadm and no port configured, and traditionally 7480 in manual deployments. In production you choose it and put TLS in front.
Does RGW need the Ceph metadata server (MDS)?
No. The MDS is only for CephFS. RGW keeps its metadata and indexes in its own pools.
What is the difference between RGW, RBD and CephFS?
They are three ways into the same cluster: RBD for virtual machine disks, CephFS for a shared file system and RGW for S3 and Swift objects.
Keep reading
-

Ceph vs ZFS: Which One Fits Your Storage, and When to Use Both
Ceph vs ZFS: one is a cluster, the other lives on one server. What each does when a node dies, what hardware they need and which to choose for Proxmox.
-

IBM Storage CEPH vs. Storage Scale (GPFS), GFS2, NFS and SMB
What IBM Storage Ceph is, which use cases it fits (object, block and file) and how it compares with Storage Scale (GPFS), GFS2, NFS and SMB.
-

Storage Scale vs Ceph for AI Inference: How to Choose
We deploy both. Here's what Storage Scale does well, what Ceph does well, and what each gets wrong for AI inference storage.
If you need a hand with Ceph
We design, deploy and support Ceph clusters with RGW, RBD and CephFS. For RGW that usually means sizing the index pool and the gateways before the first bucket fills up, setting up ingress and TLS, or finding out why an existing gateway slows down as buckets grow, and the engineer who designs the cluster is the one who picks up the call when something falls over. Our Ceph consulting and support page explains how we work, including 24/7 on-call for production incidents. If your team is the one that will run it, we also explain how to learn Ceph and what our Ceph training covers, and you can see what changed in the latest releases in Ceph Squid vs Tentacle.
