Skip to main content
RunBook Academy

CephCXX · Multi-Site ConceptsMulti-Site Concepts

What RGW multi-site does that block and file mirroring cannot

Advanced⏱ ~18 minradosgw-admin

What you'll learn

  • Compare the replication model of each Ceph interface
  • Configure selective replication with sync policy
  • Build an asymmetric topology with an archive zone
  • Identify the operations that still require the metadata master

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

Choosing a multi-site mechanism per interface is a design decision, and RGW is the only one of the three that accepts writes at both ends.

The three mechanisms side by side

PropertyRBD mirroringCephFS snapshot mirroringRGW multi-site
Unit of replicationone imageone directory treeone zone, filtered by policy
Write modelone primary, others read-onlysource onlyactive-active
Directionone-way per imageone-waysymmetrical or directional
Granularity controlper imageper configured pathper bucket, per prefix, per tag
Failover unitthe imagethe mountDNS plus a period commit
Namespace conflicts possiblenonoyes — hence a metadata master
Block and file mirroring have exactly one writable copy by construction.
Object storage does not, and everything distinctive about RGW multi-site
follows from that.

Active-active, and what it costs

radosgw-admin sync status
radosgw-admin zonegroup get | python3 -c '
import sys,json
d = json.load(sys.stdin)
print("master:", d.get("master_zone"))
for z in d.get("zones", []):
    print("  %-12s %s" % (z.get("name"), z.get("endpoints")))'
Both zones serve PUT. Two clients writing the same key in different
zones produce a last-writer-wins resolution by object mtime, and the
loser is discarded silently — there is no conflict record.
OperationWorks at a non-master zone
GET, PUT, DELETE on an existing bucketyes
Multipart uploadyes
Create a bucketno — requires the metadata master
Create a user or keyno
Change a bucket policy or ACLyes, replicated as metadata

Selective replication with sync policy

radosgw-admin sync group create --group-id=global --status=allowed
radosgw-admin sync group flow create --group-id=global \
  --flow-id=both-ways --flow-type=symmetrical --zones=site-a,site-b
radosgw-admin sync group pipe create --group-id=global --pipe-id=all \
  --source-zones='*' --dest-zones='*'
radosgw-admin period update --commit
# then enable only the buckets that need it
radosgw-admin sync group create --bucket=acme-data --group-id=acme \
  --status=enabled
radosgw-admin sync group pipe create --bucket=acme-data --group-id=acme \
  --pipe-id=acme-pipe --source-zones='*' --dest-zones='*'
radosgw-admin period update --commit
# what will actually flow for one bucket
radosgw-admin sync info --bucket=acme-data
Group statusEffect
enabledthe pipes in the group replicate
allowedreplication is permitted but only where a lower level enables it
forbiddenreplication is blocked regardless of lower-level policy

Asymmetric topologies

# a receive-only zone: data arrives, nothing leaves
radosgw-admin sync group flow create --group-id=global \
  --flow-id=to-dr --flow-type=directional \
  --source-zone=site-a --dest-zone=site-dr
# an archive zone keeps every version of every object it receives
radosgw-admin zone modify --rgw-zone=site-archive --tier-type=archive
radosgw-admin period update --commit
An archive zone versions objects on arrival even when the source bucket
is unversioned, so a deletion at the source leaves the archived copy
intact. It is the one topology in Ceph where replication is not a
faithful copy of the source.

Quiz

Knowledge check · 4 questions

  1. Q1. Why can RGW multi-site accept writes at both zones while RBD mirroring cannot?

  2. Q2. A sync group with status `allowed` causes the buckets it covers to replicate.

  3. Q3. Replicate only two of 140 buckets to a second site.

    A zonegroup has two zones and 140 buckets. Only `acme-data` and `audit-logs` justify the cost of a second copy. The current configuration replicates everything.

  4. Q4. What does an archive zone do that a normal secondary zone does not?

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

Production discipline

Set the zonegroup-level sync group to allowed and enable replication per bucket — replicating everything by default is how a second site ends up holding 140 buckets when two matter. Include bucket creation in the availability check for secondary zones; it fails independently of object access when the metadata master is down.

Cross-course references

  • Kubernetes: multi-primary writes need a conflict rule, and last-writer-wins discards silently
  • Linux: shared mutable state is what forces serialisation, not the volume of traffic