Azure blob storage

Last updated on Oct 07 2022
Keethi Reddy

Table of Contents

Azure blob storage

It is Microsoft’s object storage solution for the cloud. Blob storage is optimized for storing a massive amount of unstructured data, such as text or binary data.

Blob storage usages:

  • It serves images or documents directly to a browser.
  • It stores files for distributed access.
  • We can stream video and audio using blob storage.
  • Easy writing to log files.
  • It stores the data for backup, restore, disaster recovery, and archiving.
  • It stores the data for analysis by an on-premises or Azure-hosted service.

Azure blob storage is fundamental for the entire Microsoft Azure because many other Azure services will store the data within a storage account, inside the blob storage, and act upon that data. And every blob should be stored in a container.

Container

The container is more like a folder where different blobs are stored. At the container level, we can define security policies and assign those policies to the container, which will be cascaded to all the blobs under the same container.

A storage account can contain an unlimited number of containers, and each container can contain an unlimited number of blobs up to the maximum limit of storage account size (up to 500 TB).

To refer this blob, once it is placed into a container inside a storage account, we can use the URL, which looks like http://mystorageaccount.blob.core.windows.net/mycontainer/myblob.

Blob storage is based on a flat storage scheme. So, you can’t create a container within a container. Let’s take an example – once we create a container like videos and if we want to differentiate between professional videos and personal videos. Then we can prefix the blob names with personnel for personal videos and professional for professional videos. The blob name will be shown as personal-video1, personal-video2 for personal videos, and for professional videos – professional-video1, professional-video2. Like this, we can create a virtual hierarchy, but we can’t create a container within a container inside the Azure blob storage service.

Blob Types:

Azure offers three types of blob service:

  • Block blob: It stores text binary data up-to about 4.7 TB. It is the block of data that can be managed individually. We can use block blobs mainly to improve the upload-time when we are uploading the blob data into Azure. When we upload any video files, media files, or any documents. We can generally use block blobs unless they are log files.
  • Append blob: It is made up of blocks like block blobs, but are optimized for append operations. It is ideal for an application like logging data from virtual machines. For example – application log, event log where you need to append the data to the end of the file. So when we are uploading a blob into a container using the Azure portal or using code, we can specify the blob type at that time.
  • Page blob: It stores random access files up-to 8 TB. Page blobs store the VHD files that backs VMs.

Most of the time, we operate with block blob and append blobs. Page blobs are created by default. When we create a virtual machine, the storage account gets created, and the disks associated with the virtual machine will be stored in the storage account. But for most of the storage solutions like we know, we are developing an application like YouTube, or we are developing a monitoring application, in that case, either we use block blobs or append blobs based on the requirement.

Naming and Referencing

The names of container and blob should adhere to some rules. Because the container name and blob name will be a part of the URL when you are trying to access them. They need to adhere to some rules which are specified below.

Container Names

  • The name of containers must start with a letter or a number, and can contain only letters, numbers, and the dash (-) character.
  • All the letters in a container name must be in lowercase.
  • Container names must be 3 to 63 characters long.

Blob Names

  • The name of blobs can contain any combination of characters.
  • The name of blobs must be at least one character long and cannot be more than 1024 characters long.
  • The Azure Storage emulator supports blob names up-to 256 characters long.
  • The name of the blobs is case-sensitive.
  • The reserved URL characters must be escaped properly.

Metadata & Snapshots

We can store some amount of information against a container or blob as metadata. It is a name-value pair associated with the container or blob. Metadata names must adhere to the name rules for C# identifiers. For example – when we are developing any video streaming application with backend as Azure blob storage, then in that case, when the user uploads a video, we want to store the user information as metadata against that video. It is very useful once we start developing an application based on blob storage.

Blob Snapshots

Snapshot is a read-only version of the blob storage. We can use snapshots to create a backup or checkpoint of a blob. A snapshot blob name includes the base blob URL plus a date-time value that indicates the time when the snapshot was created. Again, if we are developing a YouTube-like application and want to retain the previous version of the video, then we can take a snapshot of it and store it once the user updates the video. So, a user like SharePoint can see the previous version of the video and the current version of the video.

To access the snapshot, we have to add a query string at the end of the URL. And a snapshot with a similar date and time when the snapshot was created.

Creating a container and adding a blob to the container.

We have already created a storage account. Now, we are going to create a container in our storage account and upload some files to it.

Step 1: Log-in to your Azure Portal and click the storage account that you have created and added to your homepage/dashboard.

1 20

Step 2: Click on the “Containers” box, as shown in the figure below.

2 19

Step 3: Now, click on “+Container” tab, it will redirect you to the “container form” window.

3 15

Step 4: Here, you need to assign a name to the container, and the name should be in lowercase. And in terms of access level, you can pick any from them. We are selecting blob here. Then click on, OK.

4 14

Step 5: Now, our container has been successfully created.

5 14

Step 6: So, if you click on the context menu, you can see the container properties and the URL using which you can access the container, last modifies Etag, and Lease status.

6 13

As we discussed earlier, we can have metadata at the container level and blob level also, so we can add key-value pairs in the container.

Step 7: Now, let’s click on the container and upload a blob into this container.

7 13

Step 8: Click on the select file option to browse the file you want to upload into the container.

8 11

Step 9: We have selected here a JPEG file, and if we click on the advanced option, we can specify the blob type. We can define that in case if we are uploading a large file. So that the upload performance will be significantly increased because each block will be uploaded in parallel. We are thereby reducing the latency in the upload. Finally, click on the upload button.

9 8

Step 10: A notification will appear once the upload will be completed. As shown in the following figure.

10 8

Step 11: Refresh your portal to see your file if it does not appear automatically. After that, we can see here access tier, blob type. And if we click on the menu drawer, we can see view/edit blob, download the blob, blob properties, and URL, which we can use to access this blob. We can create/view the snapshot of this particular file.

11 5

This is how we can create a container within the storage account and view the properties associated with it. And also, we can upload blobs into that container using the Azure portal.

So, this brings us to the end of blog. This Tecklearn ‘Azure Blob Storage’ blog helps you with commonly asked questions if you are looking out for a job in Azure and Cloud Computing. If you wish to learn Microsoft Azure and build a career in Cloud Computing domain, then check out our interactive, Microsoft Azure Developer and Administrator Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/microsoft-azure-developer-associate-az-203-and-microsoft-azure-administrator-associate-az-103/

Microsoft Azure Developer Associate: AZ-203 and Microsoft Azure Administrator Associate AZ-103 Training

About the Course

This Course provides training for Microsoft Azure Administrator and Azure Developer. Tecklearn’s Azure Administrator training provides you with a deep understanding of the entire administrative lifecycle in Azure environments. This Azure course shows you how to maintain services related to computing, storage, network, and security. Enhance your Azure Administrator skills and prepare to ace the AZ-103 Azure Administrator exam. The Azure Developer certification course prepares you for Microsoft’s Azure Developer certification exam AZ-203. It covers Azure architecture, Azure technology development solutions, Azure storage services, and solutions, Cognitive Services such as Computer Vision, Q&A Maker, Azure service solutions, and API management services.

Why Should you take Azure Developer and Administrator Training?

  • Microsoft certified Azure Associate developer earns salary ranging from $95,000 to $135,000
  • Average salary of Microsoft Certified Azure Administrator is $90,000 – Indeed.com
  • Apple, eBay, Samsung, Citrix, UST Global, Mindtree, TCS, Wipro, Infosys & many other MNC’s worldwide use Azure across industries
  • According to Microsoft, more than 1,000 new sign-ups for Azure occur each day, which equates to approximately 365,000 new sign-ups each year
  • By 2022, 90% of enterprises will use both the IaaS and PaaS capabilities from cloud provider – Gartner

What you will Learn in this Course?

Introduction to Azure Compute Solutions and Cloud Computing

  • Introduction to Microsoft Azure
  • About Azure Certification

Overview of Azure Storage Services

  • Azure Storage
  • Azure File Use Case
  • Azure DNS
  • Azure Site Recovery

Secure and Manage Azure Storage

  • Security Issue
  • Azure Regions
  • Azure Services

Implementing Secure Data Solutions and Integrating Caching & CDN

  • Azure CDN
  • Azure Traffic Manager
  • Azure Load Balancer
  • Azure Scale Set

Implementing Azure App Service Web Apps and Mobile Apps

  • Design and Implement Azure Service Apps
  • Web Apps
  • Pricing Calculator – Azure

Managing Azure Subscriptions and Resource Groups

  • Create Resource Group
  • Create App Service Plan
  • Create Web App and Deploy Angular Application using SCM
  • Deploy .NET Application using SCM
  • Deploy App using Visual Studio
  • Web Job Types
  • Sendgrid

Develop Event-based and Message-based Solutions in Azure

  • Messaging Strategy
  • Design and implement Messaging Strategy
  • Azure Notifications
  • Microsoft Azure Service Bus
  • Queues
  • Topics
  • Create Topic
  • Create Subscription
  • Azure Relay
  • Using EventHubs

Implementing Azure App Service API Apps & Azure Functions

  • Azure PAAS Services
  • API Management
  • Function Apps
  • Logic Apps

Overview of Azure Virtual Machines and Configure Virtual Machines for High Availability

  • Virtual Machines
  • Create VM
  • PowerShell DSC and Custom Script Extension
  • Scale ARM VMS
  • VMSS
  • Monitoring VMs
  • Dev Test Labs
  • VM Storage

Design and implement Azure DevOps

  • CI/CD Pipelines
  • VSTS
  • Deployment in pass and VM’s
  • Scheduled deployments

Manage Azure Active Directory (AD)

  • Manage Identity, Application and Network Services
  • Overview of Azure Active Directory
  • Azure Active Directory B2C
  • Azure Active Directory B2B
  • Key Vault
  • Azure Graph API

Azure Virtual Networks and Network Security

  • Redis Caching
  • Azure search
  • Virtual Networks
  • Configure Virtual Network
  • Hybrid Network Connectivity
  • ARM VM Networking
  • Azure security and recovery services

Developing Solutions That Use Relational Database and Azure Blob Storage

  • Azure DB Services – SQL DB
  • Azure Notifications
  • Backup and Restore
  • Enabling Geo-Replication
  • Export source Database
  • Scale Azure SQL Databases

Developing Solutions That Use Azure Table Storage & Cosmos DB

  • COSMOS DB
  • Azure Key Vault
  • Azure App Insights

Azure Command Line Interface (CLI) and PowerShell

  • Resource management and deployments using PowerShell and CLI
  • ARM templates
  • Implement ARM templates
  • Control Access
  • PowerShell runbooks
  • Azure Automation
  • Real Time Examples

Got a question for us? Please mention it in the comments section and we will get back to you.

 

0 responses on "Azure blob storage"

Leave a Message

Your email address will not be published. Required fields are marked *