Soru

Zorluk: OrtaAzure Cosmos DB and NoSQL Solutions

A logistics company is designing a global shipment tracking system that will run on Azure Cosmos DB for NoSQL. The application must process real-time coordinate updates from 500,000 active delivery vehicles. The workload is highly write-heavy, with an expected write-to-read ratio of 95:5. The system must support global distribution across three Azure regions with a 99.999% availability SLA for both reads and writes, keeping write latency under 10 milliseconds. You need to design the Cosmos DB configuration and choose a partition key to prevent hot partitions while meeting the SLA. Which configuration should you recommend?

  1. A
    Enable multi-region writes, configure the account with Service-Managed Failover, and set the partition key to shipmentStatus.
  2. B
    Configure a single write region with read-only replicas in the other two regions, and set the partition key to vehicleId with Locally Redundant Storage (LRS) enabled for the primary region.
  3. Enable multi-region writes, configure the account with Service-Managed Failover, and set the partition key to vehicleId.Cevap
  4. D
    Enable multi-region writes, configure client authentication using a single Shared Access Signature (SAS) token with a 5-year lifetime embedded in the mobile application, and set the partition key to vehicleRegion.

Cevap

Enable multi-region writes, configure the account with Service-Managed Failover, and set the partition key to vehicleId.
The correct configuration enables multi-region writes to achieve the necessary sub-10ms write latency and 99.999% SLA across multiple regions. By partitioning on vehicleId, which possesses high cardinality, the platform ensures that the heavy write workload is distributed uniformly across physical partitions, avoiding throughput bottlenecks and hot partitions.

Adım Adım Çözüm

1
Evaluate write latency and SLA requirements.
Identified that multi-region writes are required.
With a write-to-read ratio of 95:5 and a sub-10ms global write latency target across three regions, clients must write to their closest local region. This setup is also necessary to meet the 99.999% write availability SLA.
2
Determine the partition key to prevent hot partitions.
Selected vehicleId as the partition key.
With 500,000 active delivery vehicles, vehicleId provides high cardinality. This ensures that the massive write volume is evenly distributed across many logical partitions, preventing physical partition limits from being exceeded.
3
Assess high availability and security configurations.
Discarded configurations utilizing LRS or long-lived SAS tokens.
Service-Managed Failover provides disaster recovery. LRS fails to support regional failover, and long-lived SAS tokens embedded in clients introduce major security management and revocation vulnerabilities.

Anahtar Kavram

Azure Cosmos DB partition key selection and global write replication configuration
Tahmini Süre:1m 30s
Bu soruyu puanla