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 for of requests. The workload is read-heavy with a 70:30 read-to-write ratio. The architect must ensure a 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?
- Enable multi-region writes and set the default consistency level to Bounded Staleness.Cevap
- Select the userId attribute as the partition key for the shopping cart container.Cevap
- CConfigure the Cosmos DB account with Locally Redundant Storage (LRS) only to minimize multi-region replication latency and reduce costs.
- DSelect 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
Anahtar Kavram
Designing high-availability, multi-region Azure Cosmos DB databases with optimal partitioning and consistency levels.
Tahmini Süre:2m 0s