S3 Fan-Out Extension
MinIO AIStor implements an S3 extension that performs fan-out uploads: writing multiple, independently-readable objects from a single source data stream in one request.
Fan-out is an extension to the S3 POST Object (PostUpload) operation.
Instead of writing one object per uploaded stream, MinIO AIStor reads the source stream once and creates each object described in the fan-out list.
Every created object is a complete, standalone object that you can read afterward using the regular S3 GetObject API.
A common use case is fanning out incoming TSB (Time Shift Buffer) media segments. TSBs facilitate time-shifted playback of television signaling and media content, where a single incoming stream must be written out as many separate objects.
How fan-out uploads work
Fan-out uploads are automatically enabled when the x-minio-fanout-list form-field is supplied with the PostUpload (S3 POST Object) request.
When this form-field is present, MinIO AIStor treats the uploaded body as the shared source stream and creates one object for each entry in the fan-out list.
Each entry in the fan-out list specifies its own object key and may optionally include per-object settings:
- Custom user metadata
- Object tags
- Object retention (mode and retain-until date)
If a fan-out entry fails, the response reports the failure for that specific object while the other objects in the request can still be created.
This is a MinIO AIStor extension and is not intended for use with other S3-compatible services.
Access to fan-out uploads is controlled by the s3:PutObjectFanOut action.
See s3:PutObjectFanOut for details.
Higher-level SDK support
To avoid building the x-minio-fanout-list form-field by hand, the MinIO SDKs provide a higher-level wrapper, PutObjectFanOut, that constructs the request for you.
This wrapper is available in minio-go and minio-java.
You provide the bucket, the single source stream, and a list of fan-out entries. Each entry carries a mandatory object key and any optional per-object settings:
| Setting | Description |
|---|---|
| Object key | Name of the object to create. Required for each entry. |
| User metadata | Map of custom user metadata applied to the object. |
| User tags | Map of object tags applied to the object. |
| Content type | Content type of the object, for example application/text. |
| Content encoding | Content encoding of the object, for example gzip. |
| Content disposition | Content disposition of the object, for example inline. |
| Content language | Content language of the object. |
| Cache control | Caching directives for the object, for example max-age=600. |
| Retention mode | Object lock retention mode to apply, for example COMPLIANCE. |
| Retain-until date | Time until which the applied retention is valid. |
The response returns one result per requested object, including the object key, ETag, and version ID for successful uploads, or an error for any object that could not be created.
Code examples
The following examples create multiple objects from a single source stream.
After the upload completes, read each created object independently with the standard GetObject API.