What is Blob?
In computer science, a blob ( Binary Large Object) refers to a collection of binary data that is treated as a single unit. It is commonly used to store and manage unstructured data such as images, videos, audio files, documents, and other binary formats.
A blob is a type of data structure that can hold various types of data without imposing a specific format or structure on it. It is often used to represent large files or objects that cannot be easily stored in traditional relational databases. Blobs can store binary data of any size, ranging from a few bytes to multiple terabytes.
Azure Blob Storage
Azure Blob Storage is Microsoft’s object storage solution for the cloud. Blob Storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn’t adhere to a particular data model or schema, such as text or binary data.
When Should I use it?
blob is basically designed for:
serving images, videos, and audio
storing log files
disaster recovery and backup
Blob Storage Structure in Azure
Blob Storage offers three types of resources:
The storage account
A container in the storage account
A blob in a container
The following diagram shows the relationship between these resources.
reference:https://learn.microsoft.com
Let's understand About storage account and container as you are already familiar with blob:
storage account
A storage account provides a unique namespace in Azure for your data. Every object that you store in Azure Storage has an address that includes your unique account name.
containers
A container organizes a set of blobs, similar to a directory in a file system. A storage account can include an unlimited number of containers, and a container can store an unlimited number of blobs.
Types of blobs:
In the context of Azure Blob Storage, there are three types of blobs that you can work with:
Block Blobs
Block blobs are the most commonly used type of blob in Azure Blob Storage. They are optimized for storing large amounts of unstructured data, such as images, videos, documents, and backup files. Block blobs are made up of a collection of individual blocks, and you can upload blocks in parallel to improve upload performance. You can also modify or append blocks within a block blob. they are suitable for scenarios where data is frequently updated or modified.
Page Blobs
Page blobs are designed for scenarios that require random read and write access to the data, such as virtual machine disks or database files. They are primarily used for storing structured or semi-structured data and provide the ability to read, write, and modify data at the page level. Page blobs have a maximum size limit of 8 TB, making them suitable for large-scale data storage.
Append Blobs
Append blobs are specifically designed for scenarios where data is frequently appended to the end of a blob, such as log files or streaming data. Unlike block blobs, append blobs only support appending new data, and you cannot modify or delete existing data within the blob. Append blobs are well-suited for scenarios that involve continuous data ingestion or logging.
Steps To Create Azure Blob Storage
STEP 1: Log in to Azure Portal (Please make sure you have a subscription before doing all this. If you created a free account for the first time, you’ll get a free trial subscription for 1 month).
Note: If you don’t know how to get a free Azure account then click on Azure Free Trial Account to know more
STEP 2: The first step in creating Blob Storage is setting up the Storage Account. To create one, log in to the Azure portal, then click on Storage Accounts. (If you are not getting an option like this then type storage account in the search bar)
STEP 3: After clicking on Storage Account, click on + Create to proceed further. then the following screen will appear. After that, you have to fill the option to create a storage Account.
Subscription — It tells you about the billing, invoice details, and the current subscription.
Resource Group — If you are creating a new resource group, it will show (New) before the name.
Storage Account name — Specify the name of the account.
Region — Specify your region or location.
Performance — It offers two types of performance options. Standard (uses HDD Hard Disk Drives to store data) Premium ( uses SSD Solid-State Drives to store data)
Redundancy — Through Redundancy, Azure ensures that data is protected at times of failure. Azure Storage Account provides four types of Redundancy Storage. We will go with Geo-redundant Storage (GRS) for the demo purpose.
STEP 4: After that Review your details and click on “Create”.
Your storage account will be created as shown below. Then click on the “Go to Resource” option to get inside your storage account.
STEP 5: After opening Storage Account Click on “containers” Add click on “+ container” to create new container.
Give an appropriate Name to your container And Select the Public Acess level to your container as shown below. I have selected “Private”
Now I have created a container named “customers”. when you create a Storage account “$logs” container will get created by default.
STEP 6: After opening the container Click on “upload” to add files( in that container.
After that, you have to upload files(blobs) in your container.
you will get advanced options for that as shown below like Blob types( we discussed earlier), block size, Access tier(Hot, Cold, Archive)
Finally, we uploaded one file(blob) successfully.
you can upload many files or blobs Inside one container. The maximum size limit for a single blob in Azure Blob Storage depends on the type of storage account you have and the version of Azure Blob Storage that you are using.
Also, you can create many containers in one storage account According to requirements. The maximum limit for containers per storage account is 500,000.
conclusion:
In conclusion, Azure Blob Storage is a versatile and scalable storage solution offered by Microsoft Azure. It allows you to store and manage large amounts of unstructured data, such as text files, images, videos, and more.