Develop for Azure storage (15–20%) Flashcards
You manage a .Net Core application that manages images for an advertising company.
The images are stored in containers in a storage account with read access geo-zone-redundant storage (RAGZRS) redundancy to achieve high availability and maximum durability. In the event of a regional outage, the application should be able to read data from a secondary storage replication. Secondary storage replication should only be used if primary storage is unavailable.
You develop the following code to create the object responsible for uploading and reading images from blob storage:
string storageConnectionstring $=$ Environment.GetEnvironmentVariable ("storageconnectionstring"); CloudStorageAccount storageAccount = CloudStorageAccount.Parse (storageConnectionString); blobclient $=$ storageAccount.CreateCloudBlobclient () ;
You need to configure the blob client to meet the high availability requirements.
Which location mode option should you use?
blobClient. DefaultRequestoptions.LocationMode =
LocationMode.PrimaryThenSecondary;
You are using the Azure Cosmos DB .NET SDK to add a large number of items to a container.
You would like to maximize the performance of the insertion operations, so that the entire upload completes asap.
How should you configure each setting for best performance?
Connectivity mode: Direct
Call pattern: Asynchronous
AllowBulkExecution: Override default
EnableContentRequestOnWrite: False
You create a blob storage account in Azure.
You need to add metadata to a container in the account.
Which HTTP method should you use?
PUT
What is strong consistency level?
This level ensures that clients never receive a partial write or uncommitted data during a read operation
Consistent prefix consistency level?
This level ensures that reads never see out-of-order writes
Eventual consistency level?
This level provides lowest latency and higher availability for data reads. There is no read guarantee. Clients can potentially receive a partial write or ncommitted data during a read operation. Ideal for static database that will not receive new data writes.