Skip to content

Implement concurrent downloads and resumable chunked uploads for GCS#31

Open
serdarozerr wants to merge 4 commits intocloudfoundry:mainfrom
sap-contributions:feature/gcs-concurrent-upload-download
Open

Implement concurrent downloads and resumable chunked uploads for GCS#31
serdarozerr wants to merge 4 commits intocloudfoundry:mainfrom
sap-contributions:feature/gcs-concurrent-upload-download

Conversation

@serdarozerr
Copy link
Contributor

Context

The GCS client currently performs single-threaded downloads and uploads, which is inefficient for large files. Additionally, upload failures require retrying the entire file, wasting bandwidth on unreliable networks.

Solution

Concurrent Downloads

Implemented parallel downloads using transfermanager.NewDownloader with 5 concurrent workers and 4MB chunks
Also for encrypted objects falls back to single-stream (transfermanager incompatibility)

Resumable Chunked Uploads

Configured GCS Writer with 100MB chunk size (matching fog-google client). Enables automatic per-chunk retry instead of whole-file retry. Uploads remain sequential (GCS SDK limitation - no NewUploader equivalent)
Chunking provides resumability and memory efficiency, not speed improvement for uploads.

- Enable parallel downloads with 4MB chunks and 5 concurrent workers
for improved performance on large objects
- putOnce renamed as putResumable
- chunk size set to 100MB by default as in fog client
- eventhough chunking the upload, still serial no concurrency
@beyhan beyhan requested review from a team, Sascha-Stoj and nookala and removed request for a team February 5, 2026 16:16
@beyhan beyhan moved this from Inbox to Pending Review | Discussion in Foundational Infrastructure Working Group Feb 5, 2026
Copy link

@Alphasite Alphasite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus some small nits

@github-project-automation github-project-automation bot moved this from Pending Review | Discussion to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Group Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Changes | Open for Contribution

Development

Successfully merging this pull request may close these issues.

2 participants