Soru

Zorluk: KolayAzure Cosmos DB and NoSQL Solutions

You are designing an Azure Cosmos DB NoSQL API database to support a global shopping cart service. The database must support a write-heavy workload consisting of 90% writes and 10% reads, provide a 99.999% write availability SLA, and survive a regional outage. You need to recommend a design configuration that prevents hot partitions, meets the SLA, and secures the data access. Which of the following design configurations should you recommend?

  1. Configure the container with a partition key of SessionId and enable multi-region writes.Cevap
  2. B
    Configure the container with a partition key of CartStatus and enable single-region writes.
  3. C
    Configure the Cosmos DB account with Locally Redundant Storage (LRS) replication to meet the regional disaster recovery requirements.
  4. D
    Generate a Shared Access Signature (SAS) token with a five-year lifetime and no stored access policy for database access.

Cevap

Configure the container with a partition key of SessionId and enable multi-region writes.
The correct configuration uses SessionId as a partition key to distribute write-heavy cart updates evenly across partition resources, preventing hot partitions. Enabling multi-region writes allows write operations to be processed in multiple regions simultaneously, which satisfies the 99.999% write SLA and guarantees resilience to a regional outage.

Adım Adım Çözüm

1
Analyze partition key requirements to avoid hot partitions.
A high-cardinality partition key must be selected.
Choosing a high-cardinality property like SessionId distributes write-heavy workloads evenly across logical partitions, preventing hot partitions.
2
Analyze availability and disaster recovery requirements.
Multi-region writes must be enabled.
To achieve a 99.999% write availability SLA and survive a regional outage, Azure Cosmos DB requires a multi-region configuration with multi-region writes enabled.

Anahtar Kavram

Partition key selection and high-availability configuration in Azure Cosmos DB
Bu soruyu puanla