Soru

Zorluk: OrtaAzure Cosmos DB and NoSQL Solutions

An Azure Solutions Architect is designing the database tier for a global e-commerce shopping cart service. The system must support millions of concurrent users globally, demanding write and read latencies under 10 ms10\text{ ms} for 99%99\% of requests. The workload is read-heavy with a 70:30 read-to-write ratio. The architect must ensure a 99.999%99.999\% availability SLA for both read and write operations, and the database must survive a regional outage with a recovery point objective (RPO) of less than 5 minutes.

Which two configuration options should you select to meet these requirements?

  1. Enable multi-region writes and set the default consistency level to Bounded Staleness.Cevap
  2. Select the userId attribute as the partition key for the shopping cart container.Cevap
  3. C
    Configure the Cosmos DB account with Locally Redundant Storage (LRS) only to minimize multi-region replication latency and reduce costs.
  4. D
    Select the cartStatus attribute as the partition key to optimize queries that filter by status.

Cevap

To meet the requirements, you should enable multi-region writes and set the default consistency level to Bounded Staleness, and select the userId attribute as the partition key for the shopping cart container.
Enabling multi-region writes satisfies the 99.999% write availability SLA requirement. Since strong consistency is not supported with multi-region writes, Bounded Staleness is the best option because it ensures that replication lag is strictly bounded (e.g., to a few seconds or operations), which guarantees the RPO of less than 5 minutes is met. Additionally, selecting the userId attribute provides a high-cardinality partition key that distributes the workload evenly across logical partitions, preventing hot partitions.

Adım Adım Çözüm

1
Analyze availability and latency requirements to determine the database replication and consistency configuration.
To achieve a 99.999% SLA for both read and write operations, Cosmos DB must be configured with multi-region writes. Strong consistency cannot be used with multi-region writes, so Bounded Staleness is selected because it bounds the lag (staleness window) to easily satisfy the 5-minute RPO requirement.
Azure Cosmos DB requires multi-region writes to guarantee a 99.999% write availability SLA, and Bounded Staleness enforces a maximum lag limit for secondary regions.
2
Evaluate the partition key selection to prevent hot partitions under high concurrent user load.
A high-cardinality partition key such as userId is selected because it distributes requests evenly across physical partitions, whereas low-cardinality options would cause performance bottlenecks.
Choosing a high-cardinality partition key is a best practice to avoid hot partitions and ensure horizontal scalability in Azure Cosmos DB.

Anahtar Kavram

Designing high-availability, multi-region Azure Cosmos DB databases with optimal partitioning and consistency levels.
Tahmini Süre:2m 0s
Bu soruyu puanla