Understanding Azure Premium Storage – A Developer Perspective
Join the DZone community and get the full member experience.Join For Free
As you may already know Azure Premium Storage is the latest offering from Azure Storage which is designed specifically to handle Virtual Machine workloads. A few weeks back we included support for managing Premium Storage in Cloud Portam. There were a few things I learnt during that process and in this blog post I will share those learning.
Premium Storage Only Support Blobs
As of today, Premium Storage only supports blobs. It does not support Tables, Queues and File Service. In fact, if you try to access Tables, Queues or File Service using “account.[table]|[queue]|[file].core.windows.net” endpoint, you will get an DNS resolution failure error.
Even with blobs, it only supports “Page Blob”. “Block” blobs are not supported at all. Any attempt to perform Block blob related operations will result in an error from the storage service itself.
No CORS/Storage Analytics Support
As of today, Premium Storage does not support Cross-Origin Resource Sharing (CORS). It also does not support Storage Analytics as well. I guess the latter is due to the fact that Storage Analytics need to store data in tables in the same storage account and this kind of storage does not support table service.
Premium Storage is Local-Redundant Only
As of today, Premium Storage is Local-Redundant Storage (LRS) only. Thus your data will be replicated 3 times only in the same region. The data will not be replicated to a secondary location (GRS) and thus it is not even possible to enable Read-Access Geo-Redundant Storage (RAGRS) on this storage.
Premium Storage does support asynchronous copy blob operation so if you want to take a backup of the contents in your storage account, you can do so easily by copying blobs from one storage account to another.
Blob Containers can only have “Private” ACL
As you may already know, in Azure Storage a blob container can have one of the following ACL – Private, Blob and Container which dictates how a blob container/blob can be read. However with Premium Storage, a blob container can only have Private ACL as of today. Any attempt to set the blob container’s ACL to “Blob” or “Container” would result in an error.
While you can take a snapshot of blobs in Premium Storage, there are a few restrictions as of today:
- There can be a maximum of 100 snapshots for a blob.
- You can only take a blob snapshot once every 10 minutes. Any attempt to take another snapshot within 10 minutes of taking a snapshot will result in an error.
- 10 TB is the maximum capacity for snapshots per Premium Storage account. Note that the snapshot capacity is the unique data that exists in the snapshots. In other words, the snapshot capacity does not include the base blob size.
Other Operations are Supported
Apart from the restrictions mentioned above, all other operations on a blob container and blobs in that container are fully supported. For example, you can define access policies, create Shared Access Signature (SAS), perform lease related operations and many more on a blob container. Similarly you can perform all operations on a blob as well. For more details, please visit this link: http://azure.microsoft.com/en-in/documentation/articles/storage-premium-storage-preview-portal/.
This is where things get interesting :). A long time back, a colleague of mine shared something his ex-boss used to say:
Never assume anything because when you do, you make an ass of you and me (ass-u-me).
This is exactly what happened with me with Premium Storage. Since Premium Storage only supports Page Blobs, I assumed that the same pricing rules (only occupied bytes are chargeable) would apply here as well. I never bothered to go through the pricing page and tried to understand that. So for the development of Cloud Portam, I create about 150 page blobs with each about 1KB in size thinking I will be only charged for 150KB which is nothing. I created them in a subscription that has a pricing cap (about $250.00 / month) on it. Then within a few days of new billing period in that subscription, I got an email from Microsoft that I have reached my spending limit and my subscription is suspended. I was surprised as to why this has happened and obviously tried to blame Microsoft for that citing some billing mistake :). Then my good friends in the Storage Team explained me how the pricing works and I realized my mistake.
Basically, Premium Storage is offered in 3 SKUs – P10, P20, and P30. Each SKU has a maximum disk size limit which as of today is 128 GB, 512 GB and 1 TB respectively. For the purpose of pricing in Premium Storage, the page blob size is calculated (which in my case was 1 KB) and rounded up to the nearest SKU. So in my case because each blob size was 1KB, it was rounded up to 128GB and instead of 150KB my storage went up to about 19TB (150 * 128 GB). So basically I ended up with 150 P10 disks in my storage account and I ended up burning roughly $50.00 / day :). I know, pretty ignorant of me!!! I thank God that I tried this in an account with spending limit. Not sure what would have happened if I had tried in other accounts where I didn’t have spending limit set :P.
Anyways, I learned my lesson and I hope you won’t make the same mistake as I did.
That’s it for this post. I hope you have found this post useful. If you find any issues with the post, please let me know and I will fix those ASAP.
Published at DZone with permission of Gaurav Mantri, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.