Azure Storage

In this Azure Storage tutorial, you will be learning what Azure Storage is and various Azure Storage types like blob, queue, file, table, and disks. You will also be learning how to create an Azure Storage account and work on Microsoft Azure Storage Explorer.

Microsoft Azure Storage Overview

Microsoft provides a smart solution for modern-day storage problems which is Azure Storage. With data growing day by day, we need to upscale our methods of storage as well. Azure storage provides massive scalability, along with security, durability, and much more.

In case you are more intrigued by videos than reading, here is a video on Azure Storage:

Before moving further, below are the topics that will be discussed in this blog. In case you want to know about a particular point, you can jump to it.

So, how does storing data in the cloud impact any business or people in general?

The first and foremost advantage is of not needing any hardware or physical space. When you do not need any infrastructure, you save money as well.

You can scale up or down your storage space as per your requirements.

Availability is another factor that makes storing data in the cloud an ideal solution.

Before moving on with Azure Storage, you can brush up your basics on Azure by reading this blog: What Is Microsoft Azure? Now that you know why opting to store data in the cloud is important, let us see what Azure Storage is.

What is Azure Storage?

As mentioned before, Azure Storage is the modern-day solution to all storage problems. Its storage capacity is limitless, virtually. Being a pay-as-you-go model, it gives you the flexibility of paying only for what you have used. Azure Storage supports different clients like .NET, Ruby, Java, etc. which gives developers an option. To access any of the storage services, you must have an Azure Storage account. To do so, first, create an Azure account. How to get started with Azure Storage will be discussed later in this blog. Now that you know what Azure Storage is, let us have a look at its features.

Features of Azure Storage

Let us look at the features of Azure Storage:

Durability and high availability: Stored data is replicated and kept in different geographical locations. Hence, in the case of any hardware failure, you have your replicas safe and so your data. Also, if there is any natural disaster, your data will remain secure and you can avail them pretty easily.

Scalability: The storage is massively scalable depending on the requirements. Data is automatically scaled up to accommodate any peak demands.

Security: Accessing any information by an intruder from your storage is not an easy task, and hence your data is secure. Azure Storage uses a shared key model to authenticate a user. Usage of the shared access signature (SAS) can restrict access to data.

Accessibility: You can access your data from anywhere over HTTP or HTTPS. You can write your code on Azure PowerShell or on Azure CLI. Azure Storage Explorer and Azure portal provide you an easy way to work with your data.

Keep reading further to know more about these types and their pricing in detail.

Azure Blob Storage

‘Blob’ stands for Binary Large Object and includes text files, images, audios, and videos. Azure Blob is a service that stores massive unstructured data that can be accessed from any place via protocols like HTTP or HTTPS.Here are Azure blob’s responsibilities:

Block Blobs: It is an accumulation of small blocks that have their own unique block IDs. One block blob can contain up to 50,000 blocks. You can work parallelly by uploading multiple blocks at a time which decreases the upload time. The size of a single block blob is slightly higher than the normal, 4.75 TB, so the total size is 100 MB x 50,000 blocks. You can insert, delete, and replace blobs.

Append Blobs: Append blobs also comprises blocks, but when you modify these blobs new blocks are added at the end. Here, you cannot update or delete any existing blocks and the unique ID is kept a secret, whereas in block blob unique IDs are exposed.

Page Blobs: They are comprised of 512-byte pages that are optimized for arbitrary read and write operations. To create a page blob, you must first define the maximum size of the blob. You can then add or update the content of the page blob. The maximum size of a page blob is 8 TB.

If you have any doubts or queries related to Azure, do post on Azure Community.

Azure Table Storage

Azure table storage service stores structured NoSQL data.It is schemaless, i.e., the data does not have a fixed structure. You can easily store datasets that do not require any joins or foreign keys. You can denormalize them to make quicker access. You can scale up the tables based on your requirements. Let us look at its pricing options.

Azure Table Storage Pricing

For storage using Azure table, here are the pricing options:

Capacity

LRS

GRS

RA-GRS

ZRS

GB/month

GB

3.9658/GB

4.9573/GB

3.7147/GB

And for operations and data transfers, it costs Rs.0.023795/1000 transactions.

Azure Disk Storage

Azure Managed Disk is a virtual hard disk which is mostly like a physical disk that is virtualized. Azure Disk Storage is further divided into two:

Managed

Unmanaged

You can have one storage account for each Azure region, which makes it limitless. In unmanaged disks, you need to have storage accounts that can hold the disks for Azure VM. Managed disks provide you with two kinds of encryptions:

Storage Service Encryption

Azure Disk Encryption

Let us see the pricing of Azure Disk Storage.

Azure Disk Storage Pricing

There are four types of managed disks:

Ultra SSD Managed Disks

Premium SSD Managed Disks

Standard SSD Managed Disks

Standard HDD Managed Disks

Here are the pricing options for ultra SSD managed disk:

Disk Size (GiB)

4

8

16

32

64

128

256

512

1024–65536 (in increments of 1 TiB)

IOPS Range

100–1200

100–2400

100–4800

100–9600

100–19200

100–38400

100–76800

100–160000

100–160000

Throughput Range (MB/s)

1–300

1–600

1–1200

1–2000

1–2000

1–2000

1–2000

1–2000

1–2000

For further details on Azure Disk Storage pricing, please follow the page: https://azure.microsoft.com/en-in/pricing/details/managed-disks/

Now, let us see what Azure Storage Explorer is.

Azure Storage Explorer

Azure Storage Explorer is used to manage the contents of your Azure Storage account. You can easily work with it on different OS like Windows, Mac, and Linux. Storage Explorer offers you various ways to connect with your storage accounts. For example, you can connect and manage your local storage and your accounts associated with Azure subscription. To get started, you need to download and install Azure Storage Explorer. In the next section, we will see how to create an Azure Storage account and use Azure Storage Explorer to create blobs, queues, files, and tables.

Creating Azure Storage Account

Step 2: Let us add an account now. Select Add or click on Create an account that appears at the bottom of the screenStep 3: You will be asked to fill in a few things.

1. Create a resource group if you don’t have one. If you already have it, then select the same

2. Name your account

3. Select the nearest location

Step 4: Coming to the first step of Step 3, select Create new and add a name to your resource groupStep 5: After you have filled everything, click on Review + create. Check your options and details and then select CreateStep 6: After you press on Create, you will see a notification that your storage account has been deployedStep 7:

1. Go to Access keys on the left menu

2. Copy the name of your account and save it in a notepad

3. In the same notepad, copy and paste the link of key1/key2 and Connection strings.

Azure Storage Explorer: Hands-on

Before moving on with the types of storage, let us install the Azure Storage Explorer. We will be working with it for blobs, queues, files, and tables.Step 8: Search for Azure Storage Explorer and open the link. You will be able to see an option to download. Select your OS and click on the download linkStep 9: After downloading it, install the explorer. Once done, it will ask you to connect with your Azure Storage account. Select the radio button Use a connection string and click on NextStep 10: Remember the notepad where you saved the details in Step 7?

1. Enter the storage account name

2. Paste the Connection string link that you saved

3. Click on Connect for connecting with your Azure Storage account

Step 11: Once you are connected, you will be able to see your account on the left side. When you expand it, you can see the storage types

Azure Blob: Hands-on

Let us now create a blob and see if we can access any file from the URLStep 12: In Storage Explorer, right-click on Blob Containers, select Create Blob Container, and enter a name for your containerStep 13: Once done, click on the blob container that you have created. Select Upload and you can choose from uploading a folder or a file. Let’s upload a file here.Step 14: Browse for any file or folder that you want to upload and select it. You can also choose the type of blobs. In this hands-on, let’s take the default option. Now, click on UploadStep 15: Now that you have uploaded a file, go to Azure portal and to your storage account. Select Blobs and you will be able to see the container that has been created. Once you select the container, you can see the file that was uploadedStep 16: Click on the uploaded file and you can view the details. There is a URL given, which you need to copyStep 17: To be able to view the file/folder, you need to change the access level of your blob account. In order to do that, go to the container and right-click on it. You can see a drop-down menu where you can select Change access level.Step 18: Once you select it, you can see a pop-up that has a drop-down menu for Public access level. Select the last option, Container, and close the window. After doing that, open a new tab and paste the URL. Voila! There is your file.

Azure Table: Hands-on

Step 19: Under the storage account on Storage Explorer, select Table and you will be able to see a few tables (which are empty). Right-click on Tables and select Create TableStep 20: Name the new table and click on Add to add a column in your tableStep 21: Let us now add some column details

1. You can see Add Property at the bottom of the screen. Once you click on it, you can see a row add in on the screen below the two existing rows. After performing the following steps, you will be to see the column that you have entered

2. Enter the column name that you want to insert into the table

3. Choose the data type of your column value

4. Enter the value

Click on Insert

Azure File: Hands-on

Step 22: Go to the portal and click on Files under the storage account. Click on File share to create a new fileStep 23:

1. Enter the name that you want to keep for your file

2. Specify the number of Quota (GiB)

3. Press on Create

Step 24: Select the name of your file and right-click on it. Select Properties and you will be redirected to a window that has a URL. Copy the URL and save it in a notepadStep 25: Right-click on the This PC on your desktop and select Map network drive Step 26: Once you do that you can see a small window that will ask for some details.

1. Paste the URL from Step 24. Change the link according to the example given as shown below

2. Tick the second box

3. Click on Finish

Step 27: You will be prompted to enter network credentials

1. Enter your storage account name

2. Paste the link of your access key

3. Select OK to proceed

You can see that a new storage space has been created.Step 28: Let us upload a file in our drive now. Go to the portal and select the file that we created in Step 24. Click on Upload and you can see a pop up

1. Browse for the file to be uploaded

2. Click on Upload to upload the file

Step 29: You can see the file in the drive that you have created on your computer

Azure Queue: Hands-on

Step 30: Go to Storage Explorer, right-click on Queues and select Create Queue to create a new queue. Name the queue and select Add MessageStep 31:

1. Write a message in the given space

2. Enter a number in the Expires in field

3. Now, select if you want it to be in seconds, minutes, days, months, etc. so that it will dequeue itself after the specified time

If you want, you can tick the box below to encode the message. Otherwise, leave it as is

1. Select OK to proceed

You can see the message once it is created.Step 33: Go to the portal and navigate to Queue from your storage account. You will be able to see the message. Since the specified expiration time is 7 minutes in this hands-on, it will get deleted after 7 minutes and you can no longer view it after you refresh the screen Well, we have come to the end of this blog, and working with Azure Storage now seems to be an easy task for you for sure. If you still want to learn Azure from the basics, here is a blog that will help you: What Is Microsoft Azure? Now that you know almost A to Z of Azure Storage, there are three job profiles that you can apply for:

Administrator

Developer

Architect

If you want to pursue your career in Azure, here are a few courses that will help you understand how to become a certified Azure professional.