Storage best practices
There are a lot of best practices for using blobs.
When uploading blocks or page blobs, always make sure you set the correct content type. This is crucial for clients to handle the downloaded content correctly. Setting the content type to say "video/MP4" ensures that the receiving client will correctly handle the content.
To minimize the number of storage transactions and maximize the availability of blobs (which requires a lot of money), make sure you use the Cache-Control
header properly. Setting the
CacheControl
property ensures that static content such as HTML or pictures are cached on the client and consecutive calls to the static resource with the cache expiration will prevent clients from touching storage and costing money.
Parallelize as much as possible. When you upload large files to blob storage, use multithreading or the Parallel functionality in C# 4.0.
Pick the right blob type. Streaming contents? Choose a block blob and parallelize the upload and download...