Develop Solutions with Blob Storage Flashcards
Blob Storage
Types of unstructured data
Text
(1) Text
(2) Log
Binary
(3) Images/Videos
(4) Virtual Disks
Blob Storage
Storage account name restrictions
(1) 3 - 24 characters
(2) lower case letters and numbers only
Blob Storage
Does Blob support sub folders
No, but can use “virtual” folders by prepending a name
i.e., /mysubfolder/myblob.txt
Blob Storage
Two kinds of performance
(1) Standard > magnetic disks
(2) Premium > SSD
Blob Storage
Account Kinds
(1) Storage V2
(2) Storage V1
(3) Basic
Basic doesn’t have queues, fileshare and table storage
Storage V1 is previous version and not recommended for new accounts
Blob Storage *
Create a storage account using CLI
az storage account create –name $acctname
–resource-group $rgname
[–location $loc
–sku $sku (Standard_RAGRS)
–kind StorageV2]
Blob Storage *
Create a storage account using Powershell
New-AzStorageAccount
-Name $accountname
-ResourceGroupName $rgname
-Location $loc
-SkuName $sku (Standard_RAGRS)
[-Kind StorageV2]
Azure Blob
Types of authorization
(1) Shared Key (Storage Account Key)
(2) Shared Access Signature
(Token applied to a blob URL)
(3) Azure Active Directory
(4) Anonymous Public Read Access
(At container level)
Azure Blob *
Types of Blobs
(Note the difference between Standard/Premium)
(1) Block Blob
(2) Append Blob
(3) Page Blob
Blob blobs => stores its contents in seperate blocks and files are overwritten
Append Blobs => Use for logging
Page Blobs => for VHD, must have random read/writes
Azure Blob *
What are the replication strategies?
(1) LRS
(2) ZRS
(3) GRS
(4) GZRS
(5) RA-GRS
(6) RA-GZRS
Failover takes about an hour
Blob Storage
Basic objects used in SDK to connection to a blob?
(1) BlobServiceClient (storage account)
(2) BlobContainerClient (Blob Container)
(3) BlobClient (blobs)
Blob Storage
Understanding properties and metadata
What are the Blob Container System Properites?
What are the Blob System Properites?
What metadata do they share?
Blob Container System Properties
(1) ETag
(2) Last Modified
Blob
(1) ETag
(2) LastModified
(3) Content-Type
(4) Content-Length
(5) x-ms-blob-type
Common
User defined metadata and string-based key-value pairs
i.e. metadata.Add(“Category”, “Landscapes”);
What are the tiers and costs associated?
(1) Hot
storage high, transaction cost low
(2) Cool
storage medium, transaction cost medium
(3) Archive
storage low, transaction cost high
Can set the access tier individually for blob blobs
Archived blobs are offline. You can see the properites but not the blob itself until its access level has been changed. Rehydrating can take several hours
Example of setting access tier to a blob in code: await blobclient.SetAccessTierAsync(AccessTier.Cool)
Blob Storage
What is the Azure CLI for changing tier level?
az storage blob set-tier
–account-key $acctkey
–accountname $accountname
–container-name $containername
–name myphoto.jpg
–tier Cool
Blob Storage
What is lifecylce management?
Allows you to create rules such as checking last modified date and moving blob(s) to another tier or deleting them.
Can be filtered for specific blobs
Runs once a day