Skip to content

Commit 628dfd0

Browse files
committed
Add RGW Summary to ceph architecture page
Add a summary of the RADOS gateway (RGW) to the ceph.md architecture page. Signed-off-by: Zac Dover <zac.dover@clyso.com>
1 parent 102a6ff commit 628dfd0

1 file changed

Lines changed: 153 additions & 0 deletions

File tree

docs/architecture/ceph.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,159 @@ single infrastructure platform. This convergence of capabilities, combined with
136136
proven integration with major virtualization and cloud platforms, establishes
137137
Ceph block devices as a viable solution for modern data center storage needs.
138138

139+
## RADOS Gateway (RGW) in Summary
140+
141+
### Introduction
142+
143+
RADOS Gateway, commonly referred to as RGW or radosgw, is Ceph's object storage
144+
interface that provides applications with a RESTful gateway to store objects
145+
and metadata in a Ceph cluster. As one of Ceph's three primary storage
146+
interfaces alongside CephFS (file storage) and RBD (block storage), RGW
147+
transforms Ceph's underlying RADOS object store into a scalable, S3 and
148+
Swift-compatible object storage service. This enables organizations to build
149+
cloud storage solutions that are compatible with industry-standard APIs while
150+
leveraging Ceph's distributed architecture for reliability, scalability, and
151+
performance.
152+
153+
### Architecture and Design
154+
155+
RGW operates as a FastCGI or standalone HTTP service that sits atop the Ceph
156+
Storage Cluster. Unlike direct RADOS access, RGW provides a higher-level
157+
abstraction specifically designed for object storage workloads. The gateway
158+
maintains its own data formats, user database, authentication mechanisms, and
159+
access control systems independent of the underlying Ceph cluster's
160+
authentication.
161+
162+
When a client stores data through RGW, the gateway receives HTTP requests,
163+
authenticates the user, authorizes the operation, and then translates the
164+
request into RADOS operations. Objects stored via RGW are ultimately persisted
165+
as RADOS objects in the Ceph cluster, but RGW manages the mapping between
166+
S3/Swift objects and the underlying RADOS objects. This abstraction layer allows
167+
a single S3 or Swift object to potentially map to multiple RADOS objects,
168+
particularly for large files that are striped across the cluster.
169+
170+
### API Compatibility
171+
172+
One of RGW's most significant features is its dual API compatibility. RGW
173+
provides RESTful interfaces compatible with both Amazon S3 and OpenStack Swift,
174+
enabling applications designed for these platforms to work with Ceph without
175+
modification. This compatibility extends beyond basic object operations to
176+
include advanced features like multipart uploads, versioning, lifecycle
177+
management, and bucket policies.
178+
179+
The S3-compatible API supports a comprehensive set of operations including
180+
bucket creation and deletion, object PUT/GET/DELETE operations, ACL management,
181+
and metadata handling. The Swift-compatible API provides similar functionality
182+
using Swift's terminology and conventions, with containers instead of buckets
183+
and account/container/object hierarchy. Importantly, RGW implements a unified
184+
namespace, meaning data written through the S3 API can be read through the Swift
185+
API and vice versa, providing exceptional flexibility for multi-application
186+
environments.
187+
188+
### Multi-Tenancy and User Management
189+
190+
RGW implements sophisticated multi-tenancy capabilities that allow multiple
191+
independent users and organizations to share the same Ceph cluster while
192+
maintaining complete isolation. The system supports multiple authentication
193+
mechanisms including built-in user management, LDAP integration, and integration
194+
with external authentication systems like Keystone for OpenStack environments.
195+
196+
Users in RGW are organized into a hierarchical structure. Each user belongs to a
197+
tenant (which can be implicit or explicit), and users can have multiple access
198+
keys for different applications or purposes. RGW manages user credentials,
199+
quotas, and usage statistics independently, enabling service providers to offer
200+
object storage as a multi-tenant service with per-user billing and resource
201+
limits.
202+
203+
### Data Organization
204+
205+
RGW organizes data using a bucket-based model for S3 compatibility (containers
206+
in Swift terminology). Buckets are logical containers that hold objects, with
207+
each bucket having its own policies, ACLs, and configuration. Objects within
208+
buckets are identified by unique keys and can include arbitrary metadata
209+
alongside the actual data payload.
210+
211+
Internally, RGW uses multiple RADOS pools to organize different types of data.
212+
Separate pools typically store bucket indexes, data objects, and metadata,
213+
allowing administrators to apply different replication or erasure coding
214+
strategies to different data types. For example, bucket indexes might use
215+
replication for fast access while large data objects use erasure coding for
216+
storage efficiency.
217+
218+
### Advanced Features
219+
220+
RGW supports numerous advanced object storage features that make it suitable for
221+
production deployments. Object versioning allows multiple versions of the same
222+
object to coexist, enabling recovery from accidental overwrites or deletions.
223+
Lifecycle management policies automate the transition of objects between storage
224+
classes or deletion after specified periods, reducing storage costs and
225+
administrative overhead.
226+
227+
Server-side encryption provides data protection at rest, with support for
228+
multiple encryption modes including customer-provided keys. Cross-origin
229+
resource sharing (CORS) configuration enables web applications to access RGW
230+
directly from browsers. Bucket notifications allow applications to receive
231+
real-time events when objects are created, deleted, or modified, enabling
232+
event-driven architectures.
233+
234+
### Scalability and Performance
235+
236+
RGW's architecture enables horizontal scaling to meet growing storage and
237+
throughput demands. Multiple RGW instances can be deployed behind load
238+
balancers to distribute client requests across many gateways. Each RGW instance
239+
operates independently, communicating directly with the underlying Ceph
240+
cluster, avoiding any single point of contention.
241+
242+
For improved performance, RGW implements various optimization strategies. It
243+
can cache frequently accessed objects and metadata to reduce latency for
244+
popular content. Asynchronous operations handle time-consuming tasks like
245+
garbage collection and data synchronization without blocking client requests.
246+
The gateway also supports byte-range requests, enabling efficient partial
247+
object retrieval for large files and supporting features like HTTP video
248+
streaming.
249+
250+
### Multi-Site Capabilities
251+
252+
RGW includes robust multi-site replication capabilities for disaster recovery,
253+
geographic distribution, and compliance requirements. The multi-site
254+
architecture supports active-active configurations where multiple RGW clusters
255+
can accept writes simultaneously, with changes automatically synchronized
256+
across sites. This enables organizations to build globally distributed object
257+
storage systems with local read/write access and automatic data replication.
258+
259+
Metadata and data can be replicated independently with different strategies,
260+
allowing for flexible topology designs. Zone groups organize multiple zones
261+
(independent RGW deployments) into replication domains, while periods define
262+
consistent configuration states across all zones. This sophisticated
263+
replication framework supports complex scenarios like hub-and-spoke topologies,
264+
full-mesh replication, and tiered storage architectures.
265+
266+
### Monitoring and Operations
267+
268+
RGW provides comprehensive monitoring capabilities through usage statistics,
269+
performance metrics, and administrative APIs. Administrators can track
270+
bandwidth consumption, request rates, and storage utilization on a per-user or
271+
per-bucket basis. Integration with standard monitoring tools allows RGW metrics
272+
to be collected and visualized alongside other infrastructure components.
273+
274+
The admin API enables programmatic management of users, buckets, and quotas,
275+
facilitating automation and integration with billing systems or custom
276+
management tools. Command-line tools provide capabilities for troubleshooting,
277+
data inspection, and emergency operations.
278+
279+
### Conclusion
280+
281+
RADOS Gateway represents a mature, feature-rich object storage solution that
282+
brings cloud-compatible APIs to Ceph's distributed storage platform. By
283+
providing S3 and Swift compatibility, RGW enables organizations to build
284+
private cloud storage solutions or offer object storage as a service while
285+
maintaining control over their infrastructure. Its scalability, multi-tenancy
286+
support, and advanced features make it suitable for use cases ranging from
287+
backup and archive to content distribution and application data storage. As
288+
part of the unified Ceph storage platform, RGW benefits from the same
289+
reliability, performance, and operational characteristics that make Ceph a
290+
leading choice for software-defined storage solutions.
291+
139292
## See Also
140293
The architecture of the Ceph cluster is explained in [the Architecture
141294
chapter of the upstream Ceph

0 commit comments

Comments
 (0)