





























Media organizations deal with large binary files (images, video, audio) that require:
Ceph RGW handles all of these natively.
aws s3 mb s3://media-assets --endpoint-url https://rgw.example.com
# Set bucket for public read (if serving public media)
aws s3api put-bucket-acl \
--bucket media-assets \
--acl public-read \
--endpoint-url https://rgw.example.comFor files >100MB, use multipart upload:
First, configure the multipart chunk size:
aws configure set default.s3.multipart_chunksize 64MBThen upload:
aws s3 cp large-video.mp4 s3://media-assets/videos/2026/large-video.mp4 \
--expected-size 5368709120 \
--endpoint-url https://rgw.example.com# Generate a URL valid for 1 hour (3600 seconds)
aws s3 presign s3://media-assets/videos/2026/large-video.mp4 \
--expires-in 3600 \
--endpoint-url https://rgw.example.comUsers can download directly from the pre-signed URL without credentials.
import boto3
from botocore.config import Config
s3 = boto3.client(
's3',
endpoint_url='https://rgw.example.com',
aws_access_key_id='your-access-key',
aws_secret_access_key='your-secret-key',
config=Config(signature_version='s3v4')
)
url = s3.generate_presigned_url(
'get_object',
Params={'Bucket': 'media-assets', 'Key': 'videos/2026/large-video.mp4'},
ExpiresIn=3600
)
print(url)Use custom metadata to tag assets:
aws s3 cp thumbnail.jpg s3://media-assets/images/thumbnail.jpg \
--metadata "project=campaign-2026,format=JPEG,width=1920,height=1080" \
--endpoint-url https://rgw.example.comRetrieve metadata:
aws s3api head-object \
--bucket media-assets \
--key images/thumbnail.jpg \
--endpoint-url https://rgw.example.com | jq '.Metadata'Configure RGW for large object throughput:
ceph config set client.rgw rgw_max_chunk_size 4194304
ceph config set client.rgw rgw_put_obj_min_window_size 16777216
ceph config set client.rgw rgw_max_put_size 137438953472{
"Rules": [{
"ID": "expire-temp-media",
"Filter": { "Prefix": "temp/" },
"Status": "Enabled",
"Expiration": { "Days": 7 }
}]
}aws s3api put-bucket-lifecycle-configuration \
--bucket media-assets \
--lifecycle-configuration file://media-lifecycle.json \
--endpoint-url https://rgw.example.comSince video and image files are already compressed, disable BlueStore compression on the RGW pool:
ceph osd pool set default.rgw.buckets.data compression_mode noneCeph RGW provides a high-throughput, scalable backend for media asset management. Use multipart uploads for large files, pre-signed URLs for time-limited client access, and custom metadata for asset tagging. Tune rgw_max_chunk_size and related settings for streaming workloads, and disable compression on RGW data pools when storing already-compressed media to avoid CPU overhead without savings.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。