Soru

Zorluk: OrtaAzure Cosmos DB and NoSQL Solutions

An organization is designing a globally distributed IoT stream processing application that will ingest telemetry data from 100,000100,000 smart grid sensors deployed across two geographic regions. The workload is write-heavy, generating over 50,00050,000 writes per second. You need to design an Azure Cosmos DB for NoSQL solution that ensures write scalability, prevents hot partitions, and maintains high availability even during a regional outage. Which configuration should you recommend?

  1. Configure the Cosmos DB container with a partition key of deviceId and enable multi-region writes for the Cosmos DB account across the deployed regions.Cevap
  2. B
    Configure the Cosmos DB container with a partition key of region and configure the Cosmos DB account with Locally Redundant Storage (LRS) to handle local replication.
  3. C
    Configure the Cosmos DB container with a partition key of deviceId and authenticate the devices using a Shared Access Signature (SAS) token with a five-year expiration date hardcoded in the device firmware.
  4. D
    Configure the Cosmos DB container with a partition key of deviceType and disable multi-region writes while using Locally Redundant Storage (LRS) to minimize consumption costs.

Cevap

Configure the Cosmos DB container with a partition key of deviceId and enable multi-region writes for the Cosmos DB account across the deployed regions.
The configuration utilizing deviceId as the partition key and enabling multi-region writes is correct because deviceId has high cardinality, which distributes the 50,00050,000 writes per second evenly across the physical partitions. Multi-region writes provide the necessary high availability and write performance in both regions to survive regional outages.

Adım Adım Çözüm

1
Analyze partition key requirements for write scalability.
Identify deviceId as a high-cardinality attribute (100,000100,000 unique values) compared to region (2 values) or deviceType (low variety).
A high-cardinality partition key ensures even distribution of write requests across physical partitions, avoiding hot partitions.
2
Evaluate high availability and disaster recovery requirements.
Select multi-region writes rather than locally redundant storage options.
Locally Redundant Storage (LRS) is vulnerable to regional datacenter outages, whereas multi-region write replication guarantees high availability and regional failover capabilities.
3
Verify security best practices for credentials.
Avoid hardcoded long-lived Shared Access Signature (SAS) tokens.
Hardcoded secrets with long lifetimes violate the principle of least privilege and complicate rotating credentials or revoking access if compromised.

Anahtar Kavram

Azure Cosmos DB partitioning, multi-region replication, and secure credential design.
Tahmini Süre:1m 30s
Bu soruyu puanla