Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Windows Azure Blob Storage support serving compressed files similar to Amazon S3?

For example, at Amazon S3, there is a convention, if you have both 'bundle.js' and 'bundle.js.gz' uploaded to the server, and a client requests for 'bundle.js' file with 'Accept-Encoding: gzip' header, Amazon S3 will serve the compressed version of this file ('bundle.js.gz' instead of 'bundle.js').

Does Windows Azure Storage support this? If not, what are workarounds?

like image 203
Grief Coder Avatar asked Apr 24 '14 07:04

Grief Coder


People also ask

Is Azure Blob storage equivalent to AWS S3?

For data that is infrequently accessed but must be available immediately when accessed, Azure Cool Blob Storage tier provides cheaper storage than standard blob storage. This storage tier is comparable to AWS S3 - Infrequent Access storage service.

What is the difference between S3 and Azure Blob storage?

Size of storage in Azure Blob Storage allows up to 100 accounts per subscription and a 500 TB storage account limit. But with AWS S3 it allows up to 100 buckets per bucket, but you can scale this limit. Also, it doesn't limit the number of objects you can store per bucket.

What type of files does Azure blob support?

Azure Storage supports three types of blobs: Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually. Block blobs can store up to about 190.7 TiB.

Is Blob storage compressed?

Although blob storage doesn't support content compression on service level we can still create compressed files and set response headers so browsers understand that content is compressed.


2 Answers

Azure Storage allows you to define Content-Encoding property on a blob. For compressed content, you could set this property to be GZIP and when this content is served by a browser, it automatically decompresses the content and shows the uncompressed content.

This is a bit different than Amazon S3 though where you actually have to upload 2 files. Here you will only upload one file (bundle.js in your example) which is compressed and has content-encoding set as GZIP.

like image 195
Gaurav Mantri Avatar answered Sep 20 '22 09:09

Gaurav Mantri


As of 12th August 2015 Azure CDN (mounted on blob storage) now supports automatic GZip compression.

Compression method - Supported compression methods are gzip/deflate/bzip2, a supported method must be set in the Accept-Encoding Request Header.

Improve performance by compressing files

like image 25
QFDev Avatar answered Sep 19 '22 09:09

QFDev