Question 42 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question 42 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question

HOTSPOT - You are developing a ticket reservation system for an airline.

The storage solution for the application must meet the following requirements: -> Ensure at least 99.99% availability and provide low latency.

-> Accept reservations even when localized network outages or other unforeseen failures occur.

-> Process reservations in the exact sequence as reservations are submitted to minimize overbooking or selling the same seat to multiple travelers.

-> Allow simultaneous and out-of-order reservations with a maximum five-second tolerance window.

You provision a resource group named airlineResourceGroup in the Azure South-Central US region.

You need to provision a SQL API Cosmos DB account to support the app.

How should you complete the Azure CLI commands? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Answer Area

resourceGroupName= ‘airlineResourceGroup’
name= ‘docdb-airline-reservations’
databaseName= ‘docdb-tickets-database’
collectionName= ‘docdb-tickets-collection’
consistencyLevel= lv

Strong
Eventual
ConsistentPrefix
BoundedStaleness

az cosmosdb create \
name $name \

--enable-virtual-network true \
--enable-automatic-failover true \
--kind ‘GlobalDocumentDB’ \
~-kind ‘MongoDB’ \
resource-group $resourceGroupName \
max-interval 5 \

iv

--locations ‘southcentralus’

--locations ‘eastus’

--locations ‘southcentralus=0 eastus=1 westus=2"

--locations ‘southcentralus=0"
--default-consistency-level = $consistencylevel

Explanations

Answer Area

resourceGroupName= ‘airlineResourceGroup’
name= ‘docdb-airline-reservations’
databaseName= ‘docdb-tickets-database’
collectionName= ‘docdb-tickets-collection’
consistencyLevel= lv

Strong
Eventual
ConsistentPrefix
BoundedStaleness

az cosmosdb create \
name $name \

--enable-virtual-network true \
~-enable-automatic-failover true \
--kind ‘GlobalDocumentDB’ \
~-kind ‘MongoDB’ \
resource-group $resourceGroupName \
max-interval 5 \

iv

--locations ‘southcentralus’

--locations ‘eastus’

|-locations ‘southcentralus=0 eastus=1 westus=2’

--locations ‘southcentralus=0"
--default-consistency-level = $consistencylevel

Box 1: BoundedStaleness - Bounded staleness: The reads are guaranteed to honor the consistent-prefix guarantee.

The reads might lag behind writes by at most "K" versions (that is, "updates") of an item or by "T" time interval.

In other words, when you choose bounded staleness, the "staleness" can be configured in two ways: The number of versions (K) of the item The time interval (T) by which the reads might lag behind the writes Incorrect Answers: Strong - Strong consistency offers a linearizability guarantee.

Linearizability refers to serving requests concurrently.

The reads are guaranteed to return the most recent committed version of an item.

A client never sees an uncommitted or partial write.

Users are always guaranteed to read the latest committed write.

Box 2: --enable-automatic-failover true\ For multi-region Cosmos accounts that are configured with a single-write region, enable automatic-failover by using Azure CLI or Azure portal.

After you enable automatic failover, whenever there is a regional disaster, Cosmos DB will automatically failover your account.

Question: Accept reservations event when localized network outages or other unforeseen failures occur.

Box 3: --locations'southcentralus=0 eastus=1 westus=2 Need multi-region.

https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/cosmos-db/manage-with-cli.md