Intellipaat
Intellipaat

Azure Storage – Learn Azure Storage – Intellipaat

Azure Storage – Learn Azure Storage – Intellipaat
 01st Jul, 2019
 28 Views

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

Before moving on, below are the topics that I will be talking about in this blog. In case you want to know about a particular point, you can skip to that part.

 

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

 

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

  • The first and foremost advantage is 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 we know why opting to store data in the cloud is important, let us see what is Azure Storage.

 

What is Azure Storage

As I said before, Azure storage is the modern day solution to all storage problems. The 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. I will get back on how to get started with Azure storage in the later part of this blog.

Now that you know what is Azure Storage, let us have a look at its features.

 

Features of Azure Storage

Let us look at the features of Azure Storage:

  • Durability and highly available: Stored data is replicated in different geographical locations. Hence, in case of any hardware failure, you have your replicas and so your data is safe. Also, if there is any natural disaster, your data will remain secure and you can avail them pretty easily.
  • Scalable: The storage is massively scalable depending on the requirements. Data is automatically scaled up to accommodate any peak demands.
  • Security: Accessing any information 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.
  • Accessible: You can access your data from anywhere over HTTP or HTTPS. You can write your code on Azure PowerShell or Azure CLI. Azure Storage Explorer and Azure portal provide you an easy way to work with your data.

 

Now that you know the features of Azure Storage, let us have a look at the different Azure Storage Types in the section below.

Azure Storage Types

There are four primary Azure storage types with additional disk storage.

  1. Azure blob storage: optimized to store huge unstructured data. Storage is in terms of binary large objects (BLOBs).
  2. Azure table storage: it has now become a part of Azure Cosmo DB. Azure table stores structured NoSQL data.
  3. Azure file storage: it is a fully managed file sharing in cloud or on-premise via Server Message Block (SMB) protocol.
  4. Azure queue storage: it is a storage service that stores messages that can be accessed through HTTP or HTTPS from any part of the globe.
  5. Disk Storage: It is a virtual hard disk (VHD) and there are two types- managed and unmanaged.

We will cover each of these in this blogs in separate sections below. So, keep reading further to know more about the types and their pricing.

 

Azure Blob Storage

Azure Blob-Azure Storage-Intellipaat

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:

  • Stores files for shared access
  • Video and audio streaming
  • Stores data for analysis
  • Writes to the log file
  • Stores data for disaster recovery, backup, and recovery, and archiving

There are three types of blob:

  1. Block blobs: it is an accumulation of small blocks that have their own unique block ID. One block blob can contain up to 50,000 blocks. You can work parallelly by uploading multiple blocks at a time which decreases upload time. The size of a block blob is slightly higher than the normal 4.75 TB, so it is 100 MB x 50,000 blocks. You can modify the blob by inserting, deleting, and replacing. The unique IDs are exposed in block blobs.
  2. Append Blobs: even this comprises blocks but when you modify these blobs, new blocks are added at the end. You cannot update or delete any existing blocks and the unique ID is kept a secret, which is not the same as in block blob.
  3. Page Blobs: they are comprised of 512-byte pages that are optimized for an 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 page blob. The maximum size of a page blob is 8TB.

Let us now see what all Azure blob offers and at what cost.

Azure Blob storage pricing

The total cost of this service depends on:

  • The volume of data stored/month
  • What type of operations performed were performed
  • How many operations were performed
  • Data transfer cost, if any
  • Which data redundancy option was selected

Now, before seeing the pricing options, let me briefly explain to you the Data redundancy options in Azure Storage.

Locally redundant storage (LRS)Keeps multiple copies of your data in one datacenter. It provides 99.99%(11 9’s) durability over a given year.
Zone redundant storage (ZRS)Keeps multiple copies of your data in different data centers in different regions. It provides 99.99%(12 9’s) durability.
Geographically redundant storage (GRS)Holds multiple copies of your data in one region and replicates to the second region asynchronously. The durability is 16 9’s.
Read-access geographically redundant storage (RA-GRS)Allows read access from the second region which is used for GRS and the read availability is 99.99%. Durability is 16 9’s.

 

So, coming back to Azure blob pricing, here are the options when you opt for LRS:

Data Storage Prices (in Rs):

 

PremiumHotCoolArchive
First 50 TB/month12.8888/GB1.3220/GB1.0576/GB0.1322/GB
Next 450TB/month12.8888/GB1.2691/GB1.0576/GB0.1322/GB
Over 500TB/month12.8888/GB1.2162/GB1.0576/GB0.1322/GB

 

Data transfer and operations (in Rs) :

 

PremiumHotCoolArchive
Write Operations (per 10,000)1.50703.30496.60977.9316
List and Create Container Operations (per 10,000)4.29633.30493.30493.3049
Read Operations (per 10,000)0.12030.26440.6610396.5775
All other Operations (per 10,000), except Delete, which is free0.12030.26440.26440.2644
Data Retrieval (per GB)FreeFree0.66101.5864
Data Write (per GB)FreeFreeFreeFree

 

Let us now move on to the next storage type which is the Azure table.

Azure Table Storage

Azure Table-Azure Storage-Intellipaat

Azure table storage service stores structured NoSQL data. It is schemaless, meaning 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 access quicker. 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 is the price option:

CapacityLRSGRSRA-GRSZRS
GB/monthGB3.9658/GB4.9573/GB3.7147/GB

 

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

Let us quickly see the other storage types, the next being Azure file storage.

 

Azure File Storage

Azure File-Azure Storage-Intellipaat

It provides managed file sharing in the cloud. Applications on Azure can easily share files between the Virtual Machines and is accessible via SMB.

The responsibilities of Azure file storage are:

  • Replace on-premise file servers
  • It makes lift and shift of application easy to the cloud and offers both, classic as well as hybrid lift and shift
  • Cloud development is simplified with diagnostic share, shared application settings, and Dev/Test/Debug.

Let us take a look at the pricing now.

Azure File Storage Pricing

The pricing is with respect to the LRA redundancy option.

Data storage (in Rs):

PremiumStandard
GiB/month9.518/used GiB3.966/used GiB
Snapshots GiB/month7.932/used GiB3.966/used GiB

 

 

Operations and data transfer:

StandardPremium
Put, create container operations0.9915Free
List operations(per 10,000)0.9915Free
Other operations except for delete (free) per 10,0000.0992Free
Geo-replication data transfer (per GiB)N/AFree

 

For file sync, the price is Rs.330.482/month.

I will be now talking about the last primary storage type, Azure Queue. Let us see what it has to offer.

 

 

Azure Queue Storage

Azure Queue-Azure Storage-Intellipaat

Azure queue stores a large number of messages that can be accessed from any location using HTTP or HTTPS. The size of a queue message can be up to 64KB.

The uses of Azure queue storage are:

  • It creates a backlog of work done and processes asynchronously.
  • It carries messages from the Azure web role to the Azure worker role.

Azure storage queue pricing

Data storage option:

LRSGRSRA-GRS
Storage in GB/month2.9744/GB3.9658/GB4.9573/GB

 

Operation and data transfer pricing:

LRSGRSRA-GRS
Queue class 1 operations in (10,000)0.02380.02380.0238
Queue class 2 operations in (10,000)0.02380.02380.0238
Geo-replication data transfer (per GB)N/AFreeFree

 

 

We are finally done discussing the primary storage types. Now, let us see what Disk storage is.

 

 

Azure Disk Storage

Azure Disk-Azure Storage-Intellipaat

Azure Disk Storage is further divided into two:

  1. Managed
  2. Unmanaged

Azure managed disk is a virtual hard disk which is mostly like a physical disk that is virtualized. You can have one storage account for one of each Azure region, which makes it limitless. In unmanaged disk, you need to have storage accounts that can hold the disks for Azure VM.

Managed disks provide you with two kinds of encryption:

  • Storage Service Encryption
  • Azure Disk Encryption

Without going into further details, let us see the pricing of 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)481632641282565121024-65536 (in increments of 1 TiB)
IOPS Range100-1200100-2400100-4800100-9600100-19200100-38400100-76800100-160000100-160000
Throughput Range (MB/s)1-3001-6001-12001-20001-20001-20001-20001-20001-2000

 

For further details on Azure disk storage pricing, please follow Microsoft’ page: https://azure.microsoft.com/en-in/pricing/details/managed-disks/

 

Let us see what Azure Storage Explorer is.

 

Azure Storage Explorer

Azure storage explorer is used to managing 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 with various ways to connect to your storage accounts. For example, you can connect and manage your local storage as well and your accounts associated with Azure subscription.

To get started with you need to download and install Storage explorer.

For more details please look out for the hands-on where I am going to show you how to work with Storage Explorer.

Let us get into the hands-on part for a more clear understanding of Azure Storage and how to get started with it.

 

Azure Storage Hands-on

In this section, I am going to show you how to get started with Azure Storage Account and also demo on the types of Storage.

Let us first start with creating an Azure storage account.

Creating Azure storage account

Step 1: Log in to your Azure account first. In your dashboard, search for Storage.

  1. Click on Storage
  2. Click on Storage accounts

Azure storage dashboard-Azure Storage-Intellipaat

 

Step 2: Let us add an account now. Select Add or you can or select on Create an account that appears below on the screen.

Azure Storage account-Azure Storage-Intellipaat

 

Step 3: You will be asked to fill in a few things.

  1. Create a resource group if you haven’t. If you already have one then you can select that.
  2. Name your account.
  3. Select the nearest location.

 

Azure Storage create account-Azure Storage-Intellipaat

 

Step 4: Coming to the first step of Step 3, select on create new and add a name to your resource group.

Azure Storage resource group-Azure Storage-Intellipaat

 

Step 5: After you have filled out everything, click on Review +create.

You can check your options and details and then select Create.

 

Azure storage account review-Azure Storage-Intellipaat

Azure storage account create-Azure Storage-Intellipaat

 

Step 6: After you press on Create, you will see the notification that your storage account has been deployed.

Azure storage account deployment-Azure Storage-Intellipaat

Step 7:

  1. Now 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 account access keys-Azure Storage-Intellipaat

 

Azure Storage Explorer Hands-on

Before moving on with the types of storage, let us install the Azure Storage Explorer. We will be working on it for blobs, queues, files, and tables.

Step 8: Google Azure Storage Explorer and open the link. You will be able to see an option to download. Select your OS and click on the link.

Azure Storage explorer download-Azure Storage-Intellipaat

 

Step 9: After downloading it, install the explorer. Once it is done, it will ask you to connect with your Azure Storage Account. Select the option use a connection string and click Next. 

Azure storage account connect-Azure Storage-Intellipaat

 

Step 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 had saved.
  3. Click on Connect for connecting to your Azure Storage Account.

Azure connection string-Azure Storage-Intellipaat

 

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

Azure Storage Explorer storage account-Azure Storage-Intellipaat

 

Azure Blob Hands-on

Let us now create blob and see if we can access any file from the URL.

Step 12: In Storage Explorer, right-click on Blob Containers and select Create Blob Container and enter a name for your container.

Azure storage explorer blob-Azure Storage-Intellipaat

 

Step 13: Once done, click on the blob container that you have created. Select Upload and you can choose if you want to upload a folder or a file. I am going to upload a file here.

Azure storage explorer blob container-Azure Storage-Intellipaat

 

Step 14: Browse any file or folder that you want to upload and select that. You can also choose the type of blob. I let it remain the default option. Now click Upload.

Azure storage explorer upload file in blob-Azure Storage-Intellipaat

 

Step 15: Now that you have uploaded a file, go to Azure Portal and go to your storage account. Select Blobs and you will be able to see the container that has been created. Once you select that, you can see the file that was uploaded.

Azure storage explorer blob dashboard-Azure Storage-Intellipaat

Azure storage account blob-Azure Storage-Intellipaat

 

Step 16: Click on the uploaded file and you can view the details. There is a URL given that you need to copy.

Azure storage blob URL-Azure Storage-Intellipaat

 

Step 17: Before you paste the URL, you need to give permission to be able to view the file/folder. Go to the container and right-click on it. You can see a drop-down menu where you will have to select Change Access Level. 

Azure Storage access level blob-Azure Storage-Intellipaat

 

Step 18: Once you have selected that, you can see a pop-up that has a drop-down menu for Public access level. Select the last option, Container and close that window. After doing that, open a new tab and paste the URL. Voila! There is your file.

Azure blob access-Azure Storage-Intellipaat

 

Azure blob result-Azure Storage-Intellipaat

 

Azure Table Hands-on

Step 19: Under the storage account on Storage Explorer Select Table and you will be able to see few tables (they are empty). Right-click on Table and select Create Table. 

Azure storage explorer table-Azure Storage-Intellipaat

Azure storage explorer create table-Azure Storage-Intellipaat

 

Step 20: Name the new table and click on Add to add a column in your table.

 

Azure storage explorer add column-Azure Storage-Intellipaat

 

Step 21: Let us now add some column.
1. You can see Add Property below. Once you click on it, you can see a row add in on the screen below the two existing rows. After doing the steps below, 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

5. Click Insert. 

Azure storage new column-Azure Storage-Intellipaat

Azure storage explorer new column added-Azure Storage-Intellipaat

 

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 file.

Azure storage account file-Azure Storage-Intellipaat

Azure storage account file share-Azure Storage-Intellipaat

 

Step 23: 

  1. Enter the name that you want to keep for your file
  2. Specify the number of Quota (GiB).
  3. Create the file

Azure storage account file share new-Azure Storage-Intellipaat

 

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 notepad.

Azure storage acccount properties -Azure Storage-Intellipaat

Azure storage account file URL-Azure Storage-Intellipaat

 

Step 25: Right-click on My PC in your desktop and select Map network drive. 

Azure storage mount file -Azure Storage-Intellipaat

 

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 and as shown.

2. Tick the second box

3. Click Finish

Azure storage file map network device-Azure Storage-Intellipaat

 

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 new storage space has been created.

Map network credentials-Azure Storage-Intellipaat

Azure file drive created-Azure Storage-Intellipaat

 

Step 28: Let us upload a file in our drive. Go to the portal and select the file that we created in step 24. Click Upload and you can see a pop-up.

  1. Browse the file and select to upload
  2. Click Upload to upload the file.

Azure file upload-Azure Storage-Intellipaat

 

 

 

 

Azure file browse file -Azure Storage-Intellipaat

 

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

Azure file shared-Azure Storage-Intellipaat

 

Azure Queue Hands-on

Step 30: Go to the Storage Explorer and right-click Queue to create a new queue. Name the Queue and select Add Message.

Azure storage queue-Azure Storage-Intellipaat

 

Azure queue message-Azure Storage-Intellipaat

 

Step 31: 

  1. Write a message in the given space
  2. Enter a number so that it will dequeue itself after that much time from now.
  3. Now select if you want it to be in seconds, months or days, etc.
  4. If you want you can tick on the box below to encode the message. If not, leave it as is. Select OK to proceed.

You can see the message once created.

 

 

Azure queue new message

 

Step 33: Go to the portal and navigate to Queue from your storage account. You will be able to see the message. Since I specified the expire time to be 7 minutes, it will delete itself after 7 minutes and I can no longer view it after I refresh the screen after 7 minutes.

azure storage queue new-Azure Storage-Intellipaat

 

 

Well, we have come to the end of this blog and I am sure working with Azure Storage now will be an easy task for you.

If you want to go back and learn Azure from scratch, here is a blog that will help you: What Is Microsoft Azure?

Now that you know almost A-Z of Azure Storage, there are three job profiles that you can go with :

  1. Administrator
  2. Developer
  3. Architect

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

1. If you want to become a certified developer, here is the course :
Microsoft Azure Developer Associate AZ-203 Certification Training Course

2. If you want to become a certified solution architect, here is the course:
Microsoft Azure Solutions Architect Certification Training (AZ 300 – 301)

3. If you want to become a certified administrator, here is the course:
Best Microsoft Azure Training for Administration (AZ-103 = AZ-100 and AZ-101)

 

 

 

 

 

 

 

 

Related Articles