Uploads and downloads | Cloud Storage | Google Cloud

This page discusses concepts related to uploading and downloading objects. Youcan upload and store any MIME type of data up to 5 TiB in size.

You can send upload requests to Cloud Storage in the following ways:

Single-request upload. An upload method where an object is uploadedas a single request. Use this if the file is small enough toupload in its entirety if the connection fails.

Resumable upload. An upload method that provides a more reliabletransfer, which is especially important with large files. Resumable uploadsare a good choice for most applications, since they also work for small filesat the cost of one additional HTTP request per upload. You can also useresumable uploads to perform streaming transfers, which allows you to uploadan object of unknown size.

XML API multipart upload. An upload method that is compatible withAmazon S3 multipart uploads. Files are uploaded in parts and assembled intoa single object with the final request. XML API multipart uploads allow you toupload the parts in parallel, potentially reducing the time to complete theoverall upload.

Using these basic upload types, more advanced upload strategies are possible:

Parallel composite upload. An upload strategy in which you chunk afile and upload the chunks in parallel. Unlike XML API multipart uploads,parallel composite uploads use the compose operation, and thefinal object is stored as a composite object.

Streaming upload. An upload method that lets you upload data withoutrequiring that the data first be saved to a file, which is useful when youdon't know the final size at the start of the upload.

When choosing whether to use a single-request upload instead of a resumableupload or XML API multipart upload, consider the amount of time that you'rewilling to lose should a network failure occur and you need to restart theupload from the beginning. For faster connections, your cutoff size cantypically be larger.

For example, say you're willing to tolerate 30 seconds of lost time:

If you upload from a local system with an average upload speed of 8 Mbps, youcan use single-request uploads for files as large as 30 MB.

If you upload from an in-region service that averages 500 Mbps for its uploadspeed, the cutoff size for files is almost 2 GB.

All downloads from Cloud Storage have the same basic behavior: anHTTP or HTTPS GET request that can include an optional Range header, whichdefines a specific portion of the object to download.

Using this basic download behavior, you can resume interrupted downloads, andyou can utilize more advanced download strategies, such assliced object downloads and streaming downloads.

If you use REST APIs to upload and download, see Request endpoints fora complete discussion on the request endpoints you can use.

Read the original here:
Uploads and downloads | Cloud Storage | Google Cloud

Related Posts

Comments are closed.