Skip to content

feat(storage): Support trailing checksum metadata for single-shot REST uploads #6461

Description

@xlai20

Is your feature request related to a problem? Please describe.
Currently, when performing unbuffered, single-shot object uploads via the JSON (REST) API, the payload is streamed continuously in a single HTTP PUT request for maximum performance. However, because HTTP/1.1 requires all headers to be sent before the request body, we cannot append an on-the-fly computed CRC32C or MD5 checksum via the traditional x-goog-hash header. Achieving this currently requires passing over the payload twice (once to pre-compute the checksum and once to stream the data), creating a significant disk I/O performance penalty.

Describe the solution you'd like
To provide server-side validation against network data corruption without the double-read overhead, we should leverage the GCS JSON API's multipart trailing metadata feature.

Implementation Constraints
This trailing checksum strategy should be mutually exclusive with other kinds of checksum validation opt-in'ed by users.

b/521188176

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions