Azure Storage Services

Azure storage services offer a massively scalable object store for data objects, disk storage for Azure virtual machines (VMs), a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store.

Welcome to Azure tutorial, in our previous Azure tutorial we learned about what is Azure storage account and how to create an Azure storage account. In this Azure tutorial, we will learn what are the different Azure Storage services and how can we create each Azure storage service step by step.

What are the different Azure Storage Services

Microsoft Azure has multiple Azure storage services that will fit most scenarios. At the moment, there are four types of Azure Storage services, they are

  1. Blob storage.
  2. Table storage.
  3. Queue storage.
  4. File storage.

Blob Azure storage Services

Blob stands for binary large object. This type of service can store almost everything, since it stores unstructured data, such as documents, files, images, VHDs, and so on. Using the Azure Blob storage service allows you to store everything that we have just mentioned, and you can access anything from anywhere using different access methods, such as URLs, REST APIs, or even one of the Azure SDK storage client libraries.

There are three types of Blob storage:

  • Block blobs: They are an excellent choice to store media files, documents, backups, and so on. They are good for files that are read from A-Z (sequential reading).
  • Page blobs: They support random access for files stored on them. That is why they are commonly used for storing VHDs of Azure virtual machines.
  • Append blobs: They are similar to block blobs, but are commonly used to append operations. For example, each time a new block is created, it will be added to the end of the blob. One of the most common use cases within which append blobs can be used is logging, where you have multiple threads that need to be written to the same blob. This is an excellent solution that will help you to dump the logs in a fast and safe way.

Creating Blob storage service

Let’s see how we can create Blob storage, where everyone has read/write access to in the storage account. Navigate to the Azure storage we created earlier using the portal, as shown in the following

Azure Storage Services

To manage blobs, you have to click on Blobs, and a new blade will appear, as shown in the following screenshot:

Creating Blob storage service

In order to create a blob service, you have to create a container in which the blob service will be stored. To do this, you click on Container to create a new one. However, it is not a straightforward creation process, as you will be asked to specify a name and an access type.

Creating Blob storage service

Here is a short description of the access types:

  • Private: This option means that only the storage account owner has access to the blobs created within this container using the access key; therefore, you can grant access privileges to any other users.
  • Blob: This option means that the blobs created within this container will be accessed from outside by read permissions only.
  • Container: This option means that the blobs created within the container will be publicly available with read and write access.

Since we want to create a blob service that everyone has read/write access to, we will choose Public access level as Container (anonymous read access for containers and blobs) and name it ppcont, as shown in the following screenshot.

Screenshot 2021 08 08 at 7.41.39 AM

The access type of storage containers can be changed even after creation. Once created, you can open the blob and start uploading your data to it, as shown in the following screenshot:

Creating Blob storage service

For further customization of the uploaded blob, click on Advanced and you will see options such as specifying the Blob type, Block size, to which folder it will upload the blob, and so on:

Screenshot 2021 08 08 at 7.46.13 AM

Blob storage key points

The following tips should be considered, as they will help you when designing your storage solution using blob services:

  • Blob storage supports both standards, but only page blobs support premium storage.
  • Block blobs are named as such because files larger than 64 MB are uploaded as smaller blocks, and then get combined into one final blob.
  • You cannot change the type of blob once it has been created. Block blobs are named as such because they provide random read/write access to 512-byte pages.
  • Page blobs can store up to 8 TB.
  • Storage containers built for Blob storage may only contain lowercase letters, hyphens, and numbers, and must begin with a letter or a number. However, the name cannot contain two consecutive hyphens. The name length can vary between three to 63 characters.
  • The maximum number of blocks in a block blob or append blob is 50,000.
  • The maximum size of the block in a block blob is 100 MB. As a result, a block blob can store data of up to 4.75 TB.
  • The maximum size of the block in an append blob is 4 MB. As a result, an append blob can store data of up to 195 TB.

Azure Table storage Service

High availability and scalability are key factors when you want to work with your storage, and that is exactly what is offered by Table storage. Table storage is a Microsoft NoSQL data store that can be used for a massive amount of semi-structured, non-relational data.

Data is stored in tables as a collection of entities, where entities are like rows, and each entity has a primary key and a set of properties, where a property is like a column. The Table storage service is schema-less. Therefore, multiple entities in the same table may have different properties.

An entity has three properties:

  1. PartitionKey.
  2. RowKey.
  3. Timestamp

PartitionKey

The PartitionKey is a sequential range of entities that have the same key value. The way that tables are partitioned is to support load balancing across storage nodes, where table entities are organized by partition. It is considered the first part of an entity’s primary key. It may be a string value with a size of up to 1 KB, and every insert, update, or delete operation must be included in the PartitionKey property.

RowKey

RowKey is the second part of the entity’s primary key. It is a unique identifier for the entity, and every entity in the table is uniquely identified by the combination of PartitionKey and RowKey. Like PartitionKey, it is a string value that may be up to 1 KB, and every insert, update, or delete operation must be included in the RowKey property.

Timestamp

Timestamp is a datetime value, and it is kept on the server side to record when the last modification of the entity occurred. Every time there is a modification of the entity, the timestamp value is increased. This value should not be set on insert or update operations.

Creating Table storage Service

Creating one of the Azure Storage services like table storage is easy. Every storage service is created in Azure Storage. Let’s see how we can create Table storage in the storage account.

  • Navigate to the storage we created earlier in this chapter using the portal, as shown in the following screenshot:

You can see all the storage services in the previous screenshot. To manage tables, you have to click on Tables, and a new blade will appear, as shown below.

Azure Table storage Service
Azure Storage Services 15

In order to create a table service, just click on Table and specify the Table name, as shown below.

Azure Table storage Service

Once done, you will see that the table has been created, as shown below.

Azure Table storage Service
Azure Storage Services 16

 Table storage key points

The following tips should be considered, as they will help you when designing your storage solution using the Table storage service:

  • Table storage supports standard storage, but the premium table storage is available in Azure Cosmos DB.
  • Table storage is significantly lower in cost than traditional SQL.
  • The entity can have up to 252 custom properties, and three system properties (PartitionKey, RowKey, and Timestamp).
  • The entity’s property data cannot exceed 1 MB.
  • Table names must follow the following rules:
    • They are case sensitive.
    • They contain only alphanumeric characters, considering that they cannot begin with a numeric character.
    • They cannot be redundant within the same storage account.
    • You can name a table with another table name written in reverse Their length varies between three and 63 characters.

Azure Queue storage service

Queue storage is one of the Azure storage services that is used to provide persistent and reliable messaging for application components. Generally, it creates a list of messages that process asynchronously, following the first-in, first-out (FIFO) model. Not only this, but asynchronous tasks and building process workflows can be managed with Queue storage too. One of the most common scenarios is passing messages from an Azure web role to an Azure worker role. Queue storage is not the only messaging solution available with Azure; there are also Service Bus queues, which can be used for more advanced scenarios.

Creating Queue Azure storage service

Let’s see how we can create Azure Queue storage service step by step. Navigate to the storage account we created earlier in this chapter using the portal. You can see all the storage services in the previous screenshot. To manage queues, you have to click on Queues, and a new blade will appear, as shown below.

Screenshot 2021 08 08 at 7.38.35 AM
Azure Storage Services 17

In order to create a queue service, just click on Queue and specify the Queue name, as shown in the following screenshot

Screenshot 2021 08 08 at 8.15.31 AM
Azure Storage Services 18

Once done, you will see that the queue has been created.

Screenshot 2021 08 08 at 8.16.57 AM
Azure Storage Services 19

Azure Queue storage key points

The following tips should be considered, as they will help you when designing your storage solution using the queue service:

  • Queue messages can be up to 64 KB in size. However, a queue can contain messages up to the limiting size of the storage account.
  • The maximum lifetime of a message in a queue is 7 days.
  • As mentioned previously, messages follow the FIFO order. However, they can be out of order if an application crash occurs, which is why it would be better to use Azure Service Bus queues for a scenario where the FIFO order is highly important.
  • Messages can be scheduled for delivery later.
  • A queue name may only contain lowercase letters, hyphens, and numbers, and must begin with a letter or number. It cannot contain two consecutive hyphens.
  • Name length varies from between three and 63 characters.

Azure File storage Services

The file storage service is the easiest and coolest service to work with. You can use it to create network file shares on Azure, and access them from anywhere in the world. Server Message Block (SMB) and Common Internet File System (CIFS) are the only protocols that can be used to access these file shares. As a result, multiple Azure VMs and on-premises machines can access the same file share and have read and write privileges on it. Azure file shares can be mounted to different operating systems, such as Windows, Linux, and even macOS, concurrently.

File storage advantages

The following are some of the benefits to be gained from using the file storage service:

  • Software as a Service (SaaS): The Azure file storage service is considered a SaaS service because you do not have to manage the hardware, operating system, patches, and so on. It is simply fully managed.
  • Shareability: It can be shared across multiple machines, providing read and write privileges for all of those machines.
  • Automation: It supports working with PowerShell and the Azure CLI, which can be used to create scripts to automate repetitive tasks with minimal administration.
  • Flexibility and high availability: Using the Azure file storage service eliminates concerns regarding administration and outage issues that you face with traditional file servers.

Creating Azure file storage service

Let’s see how we can create file storage in the storage account we created earlier in this chapter: Navigate to the storage we created in the last chapter using the portal. You can see all the storage services in the previous screenshot. To manage files, you have to click on Files and a new blade will appear.

In order to create a file share, just click on File share and specify the file share Name and its Quota, considering that the quota is optional, as shown below:

Screenshot 2021 08 08 at 8.23.00 AM

Once done, you will see that the file share has been created, as shown in the following screenshot. Considering that we never specified a quota, it used the maximum space the storage account can store; therefore, you have to design your file share properly, according to your needs and with the proper quota, to avoid any future issues caused by the space used. Also, you can change the quota even after file share creation:

You can map the file share to your Windows machine or Linux machine, adding directories within the file share, uploading data to it, and so on if you open it after creation, as shown in the following screenshot:

Screenshot 2021 08 08 at 8.23.32 AM
Azure Storage Services 20
  • To map the file share as a drive on your Windows or Linux machine, click on Connect, which will open a new blade, displaying the commands required to map it to your machine.
  • To upload files to it, click on Upload and browse for the desired file.

File storage key points

The following tips should be considered, as they will help you when designing your storage solution using the file service:

  • Since SMB 2.1 does not support encryption, then only the VMs within the same region as the storage account will be able to access it if you are using SMB 2.1. As a result, you have to consider that you cannot access the read-only data available in another region if you are using RA-GRS as a replication type.
  • Since SMB 3.0 supports encryption, you will be able to mount the file share to any VM around the globe, but port 445 must be opened.
  • At the time of writing, only two versions of macOS were supported for Azure file shares (Sierra 10.12 and El Capitan 10.11).
  • For better performance when working with Azure file shares on macOS, I recommend disabling SMB packet signing.
  • The maximum size of a file share is 5 TB, considering that a file in the file share cannot exceed 1 TB.
  • Every Azure file share supports up to 1,000 IOPS and 60 MB/s throughput.
  • File share names can contain only lowercase letters, numbers, and hyphens, and must begin and end with a letter or number. The name cannot contain two consecutive hyphens.

Leave a Comment

Your email address will not be published.

Scroll to Top