Skip to content

Change download link to not require storage.getMetadata() ? #524

Closed
@jgeewax

Description

Looks like we can auto-generate the download link without pulling all the metadata in a separate request:

https://<bucket>.storage.googleapis.com/<object>

Can we just make this a standard URL?

@robertdimarco says:

Remove the getMetadata() round-trip from the createReadStream() code path, in the interests of reducing overall request latency.

In comparison to the S3 implementation we were using, gcloud-node performs an additional call to the storage backend in series to get the metadata to obtain a download link. This download link, however, is able to be statically generated. Removing the extra round-trip to the server would halve the request latency for serving small files.

Metadata

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions