C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Azure blob storageIt 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:
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. ContainerThe 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:
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 ReferencingThe 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
Blob Names
Metadata & SnapshotsWe 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.
Next TopicCreating a container
|