Database: S3 blob wrapper (z3blobs)¶
zodb-s3blobs is a storage wrapper
that intercepts blob operations and redirects them to S3-compatible object
storage. It wraps any ZODB storage backend (direct, relstorage, or zeo)
and replaces its blob handling with S3-backed blob storage plus a local LRU
cache.
Note
z3blobs is a wrapper, not a standalone storage backend. You still choose a
backend via db_storage. The wrapper is enabled by setting
db_z3blobs_enabled: true.
Important
z3blobs cannot be used with pgjsonb storage. PGJsonb handles blobs
natively via PostgreSQL bytea and optional S3 tiering through its own
db_pgjsonb_s3_* settings.
Core settings¶
Setting |
Default |
Allowed Values |
|---|---|---|
|
|
|
|
(unset, required when enabled) |
string |
|
(unset, required when enabled) |
path |
|
(unset) |
byte-size (KB, MB, GB) |
db_z3blobs_enabled – Enable the S3 blob wrapper. When true, the selected db_storage backend is nested inside <s3blobstorage> and the inner storage’s blob directives (blob-dir, shared-blob-dir, etc.) are suppressed.
db_z3blobs_bucket_name – S3 bucket name for blob storage. Required when z3blobs is enabled.
db_z3blobs_cache_dir – Local filesystem directory for the LRU blob cache. Blobs are cached here after download from S3 to avoid repeated network requests. Required when z3blobs is enabled.
db_z3blobs_cache_size – Maximum size of the local blob cache. When exceeded, least recently used blobs are evicted.
S3 connection settings¶
Setting |
Default |
Allowed Values |
|---|---|---|
|
(unset) |
string |
|
(unset, uses AWS) |
URL |
|
(unset) |
AWS region |
|
(unset) |
string |
|
(unset) |
string |
|
|
|
|
(unset) |
|
|
(unset) |
base64-encoded key |
db_z3blobs_s3_prefix – Key prefix within the bucket. Useful for sharing a bucket across multiple deployments.
db_z3blobs_s3_endpoint_url – S3 endpoint URL for MinIO, Ceph, or other S3-compatible stores (e.g. http://localhost:9000). Uses AWS S3 if omitted.
db_z3blobs_s3_access_key / db_z3blobs_s3_secret_key – AWS credentials. Uses boto3 credential chain (IAM role, ~/.aws/credentials, environment variables) if omitted.
db_z3blobs_s3_addressing_style – S3 URL addressing style. Use path for MinIO and other S3-compatible stores that don’t support virtual-hosted-style addressing.
db_z3blobs_s3_sse_customer_key – Customer-provided encryption key for S3 Server-Side Encryption (SSE-C). Must be a base64-encoded 256-bit key. Requires s3_use_ssl: true (enforced by pre-generation validation).