Azure Storage – Part 2 – BLOB Storage

Santosh Gaikwad

Santosh Gaikwad

Connect on LinkedIn      Follow SCI Page

Write to admin@sharecareinspire.com
Santosh Gaikwad

Latest posts by Santosh Gaikwad (see all)

<< Part 1      >>Part 3      >> Part 4      >> Part 5

Cloud computing enables new scenarios for applications, which require scalable, durable, and highly available storage for their data, which is supported by Azure Storage, It makes possible for developers to build large-scale applications to support new scenarios.

What is BLOB Storage?

BLOB is an acronym for Binary Large Object, which is a collection of binary data stored as a single entity.

Azure Blob storage is a service that stores unstructured data in the cloud as objects/blobs. Blob storage can store any type of text or binary data, such as a document, media file, or application installer. Blob storage is also referred to as object storage.

BLOB storage can be accessed from anywhere in the world via HTTP or HTTPS. You can use Blob storage to expose data publicly to the world, or to store application data privately.

What is USE of Blob storage?

Common uses of Blob storage is as follows.

  • Storing Documents
  • Social data such as photos, videos, music, and blogs
  • Backups of files, computers, databases, and devices
  • Images and text for web applications
  • Configuration data for cloud applications
  • Big data, such as logs and other large datasets

What are the components of BLOB Storage?

Following are basic components of BLOB Storage Service

Components of BLOB Storage
Components of BLOB Storage

 

Account: All access to Azure Storage is done through a storage account. For more details please refer article Azure Storage – Part 1

Container: A container provides a grouping of a set of blobs.

Blob: A file of any type and size. Azure Storage offers two main types of blobs: block blobs, page blobs.

Block blobs are ideal for storing text or binary files, such as documents and media files. A single block blob can contain up to 50,000 blocks of up to 100 MB each, for a total size of slightly more than 4.75 TB (100 MB X 50,000).

Append blobs are similar to block blobs in that they are made up of blocks, but they are optimized for append operations, so they are useful for logging scenarios.

Page blobs can be up to 1 TB in size, and are more efficient for frequent read/write operations. Azure Virtual Machines use page blobs as OS and data disks.

How data is structured in BLOB storage?

Every blob is organized into a container. Containers also provide a useful way to assign security policies to groups of objects. A storage account can contain any number of containers, and a container can contain any number of blobs, up to the 500 TB capacity limit of the storage account.

BLOB storage data access scenarios

During creation of storage account you can specify what type of data (access tier) will be stored in BLOB storage, there are two types of access tiers that can be specified based on data access pattern:

Hot: indicates that the objects in the storage account will be more frequently accessed. This allows you to store data at a lower access cost.

Cool: indicates that the objects in the storage account will be less frequently accessed. This allows you to store data at a lower data storage cost.

If there is a change in the usage pattern of your data, you can also switch between these access tiers at any time.

How to Create BLOB storage using ARM Portal

Step 1: Create Storage Account of type BLOB

Follow the link on portal to create new storage account. New (+) -> Storage -> Storage Account.

Provide the name of storage account; you need to make two important selections in the properties below.

Account kind: This field has two options, Blob Storage and General Purpose. This article focused on Blob storage, hence select Blob storage value from dropdown. For more details about these two types please refer article Azure Storage – Part 1

Replication: This is a solution for high availability and disaster recovery of your data, what is your primary data center fails because of some natural disaster or disks/racks on which your data was stored fails. There are three options for replication as follows.

Read-application-geo-redundant storage (RA-GRS): This is default selection. This is geo-redundant storage plus the ability to read the data in the secondary data center. You can change your application to read your data from the secondary data center, in case primary data center is not responding. Also, if you have an application where only a few users can write data, but lots of people read the data, you could point the application that writes to storage at the primary data center, and then do all the reads from the secondary.
Geo-redundant-storage (GRS):  This replicates your data three times in your chosen data center, and then replicates it three times in a secondary data center that is far away.

Locally-redundant-storage (LRS): Three copies of your blobs are stored in a single facility in a single region. The replicas reside in separate fault domains and upgrade domains. This means that data is available even if the rack where your data is stored fails or is taken offline to be updated. Data is always updated in all three copies.

Access Tier: This field has two options, cool and hot. Default is hot, you make selection are per your requirement. For more details about these two types please refer article Azure Storage – Part 1

Create Storage Account
Create Storage Account

Click on Create button and storage account will be provisioned and will be shown in all resources list.

Step 2: Create Container

A container provides a grouping of a set of blobs. All blobs must be in a container. To create container, open properties blade for blob storage and select overview.

Blob Storage Containers
Blob Storage Containers

Add new container with access type as Blob, click on ok to create new container.

Add Blob Storage Container
Add Blob Storage Container

All available containers will be shown in the list, select the container and you will be able to upload blob data in the container. Following screen snap shows option to upload data and one text file is already uploaded in the container.

Upload Files in Container
Upload Files in Container

Access Keys

Azure provides APIs to work with storage account programmatically. The account name and key values are used to create a StorageCredential class instance, which is then used to create an instance of the CloudStorageAccount. The CloudStorageAccount object represents a storage account that you will be accessing. From this object you can obtain references to BLOBs  within the storage account.

StorageCredentials cred = new StorageCredentials(accountName, accessKey);
CloudStorageAccount account = new CloudStorageAccount(cred, useHttps: true);
Blob Storage Access Keys
Blob Storage Access Keys

<< Part 1      >>Part 3      >> Part 4      >> Part 5


Check Articles From Categories      Health and Parenting      Inspiring Stories      Technology      Microsoft Azure      SharePoint O365

Leave a Reply

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