Matan
Matan

Reputation: 730

Azure blobs - Store directly to archive tier

I followed the quickstart at https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python to learn how to use python to upload files to Azure as blob storage.

As I want to use it as a DR solution and I want to minimize costs, I would like to use the Archive tier.

I know that I can set the tier of the blob immediately after I upload it using def set_standard_blob_tier(self, container_name, blob_name, standard_blob_tier, timeout=None)

However, I prefer, if possible, to upload it directly to the archive tier (instead of uploading it to the default tier, which is hot or cool and then move it).

So I have few question:

  1. Is it possible? if yes, how?

  2. As I'm pretty new to cloud, as there any difference in term of the total cost between the two options? (As you can understand, currently, each blob will be in the cool tier for few seconds before moving to the archive tier, so there might be a cost for that time, and in addition, a cost for the transfer between the tiers).

Thanks!

Upvotes: 1

Views: 2334

Answers (2)

jainsuyogj
jainsuyogj

Reputation: 33

As per latest features released for Archive Tier, direct upload to 'Archive' tier is supported.

Though, I don't think is supported with Python SDK as of today. (Supported with .Net/Java)

https://azure.microsoft.com/en-in/blog/azure-archive-storage-expanded-capabilities-faster-simpler-better/

  1. Upload blob direct to access tier of choice (hot, cool, or archive)

Upvotes: 0

Gaurav Mantri
Gaurav Mantri

Reputation: 136369

Is it possible? if yes, how?

Currently it is not possible to upload a blob directly into archive tier. You will need to upload the blob in hot or cool tier and then change the tier to archive once it is uploaded.

As I'm pretty new to cloud, as there any difference in term of the total cost between the two options? (As you can understand, currently, each blob will be in the cool tier for few seconds before moving to the archive tier, so there might be a cost for that time, and in addition, a cost for the transfer between the tiers).

Not sure if I understand the question but each access tier (hot, cool and archive) has different pricing for storage and transaction cost. Hot tier has highest storage and lowest transaction costs while archive tier has lowest storage and highest transaction costs.

Furthermore, changing tier from archive to hot or cool tier is a time consuming operation (while the other way round is almost instantaneous).

Moreover you will be charged a penalty if you move a blob from an archive tier to hot/cool tier within 6 months of archiving the blob.

Please read more about storage tiers here: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers.

UPDATE

  1. Is there a cost to change the tier from cool to archive?

Yes. There is a cost to change the tier from cool to archive. If I am not mistaken, changing tier from cool to archive is considered as a Write operation. If you do it in West US region for 10000 blobs, you will pay just $0.11 for those 10000 blobs. So if you're doing it for 100 blobs, you will pay $0.0011 ($0.11 * 100 / 10000).

  1. Will I be charged for the few seconds the file was in the cool tier (between uploaded and moved to archive)?

Again the answer is yes. The pricing would depend on how much data you're storing in cool tier for how long and in what region. For example, if you store 1 GB of data in cool tier for a month in West US region, you will pay $0.0152. You just need to calculate the prorated amount.

For more information on pricing, please see this link: https://azure.microsoft.com/en-us/pricing/details/storage/blobs/.

Upvotes: 3

Related Questions