Crates.io | s3-batch-put-tar |
lib.rs | s3-batch-put-tar |
version | 0.1.0 |
source | src |
created_at | 2021-03-01 21:02:42.524789 |
updated_at | 2021-03-01 21:02:42.524789 |
description | Gather many objects into a smaller number of s3:PutObject calls |
homepage | |
repository | https://github.com/dholroyd/s3-batch-put-tar |
max_upload_size | |
id | 362375 |
size | 60,657 |
Gather many objects into a smaller number of s3:PutObject calls
A workload that creates numerous PutObject calls may be cost-inefficient due to the transactional cost of using the S3 PutObject API.
The crate provides the calling application with a similar interface to rusoto_s3, and instead of writing objects to S3 immediately, it spools them to a local tar file. The calling application can control how often the tar file containing the last batch of objects will be written to S3.
The S3BatchPutClient
is safe to share across threads, and can coalesce writes from multiple concurrent threads into
a single batch.
The resulting tar files may simply be downloaded to consume each batch as a whole.
The caller of S3BatchPutClient::put_object()
will also receive metadata about the location of the given object
within the tar file. Once the batch has been written to S3, this metadata enables efficient access to individual
objects within the batch, by allowing you to make an S3 byte-range request that retrieves a single object without needing
to download the whole tar file.
This create might help if your workload has the following attributes:
s3:PutObject
operations is a significant and needs to be reduceds3:GetObject
API (i.e. readers are happy to
either download a whole batch of objects as a tar file, or to make byte-range requests to retrieve individual
objects)