Question

Difficulty: Very hardAzure Cosmos DB and NoSQL Solutions

You are designing the data tier for a global telemetry platform that tracks 500,000500,000 container shipments. Sensor devices upload high-frequency environmental metrics to Azure Blob Storage, while metadata and real-time alerts are stored in an Azure Cosmos DB for NoSQL database. The system requirements are:

- Ensure sub-10 ms10\text{ ms} write latencies for Cosmos DB across three regions (East US, West Europe, and East Asia) with a 99.999%99.999\% write availability SLA.
- Support regional failover without data loss for committed Cosmos DB transactions.
- Dynamically authorize device uploads to Azure Blob Storage securely, allowing token revocation if a device is compromised.
- Avoid performance bottlenecks or hot partitions in Cosmos DB during peak traffic.

Which database and storage configuration should you recommend?

  1. Enable multi-region writes in the Azure Cosmos DB account with Session consistency, using a synthetic partition key that combines the device identifier and date. For Azure Blob Storage, configure Geo-Redundant Storage (GRS) and delegate upload access using Shared Access Signatures (SAS) associated with a Stored Access Policy.Answer
  2. B
    Enable multi-region writes in the Azure Cosmos DB account with Session consistency, using the region identifier as the partition key. For Azure Blob Storage, configure Geo-Redundant Storage (GRS) and delegate upload access using Shared Access Signatures (SAS) associated with a Stored Access Policy.
  3. C
    Disable multi-region writes in the Azure Cosmos DB account and configure Locally Redundant Storage (LRS) for the metadata storage. For Azure Blob Storage, configure Locally Redundant Storage (LRS) and delegate upload access using Shared Access Signatures (SAS) associated with a Stored Access Policy.
  4. D
    Enable multi-region writes in the Azure Cosmos DB account with Session consistency, using a synthetic partition key that combines the device identifier and date. For Azure Blob Storage, configure Geo-Redundant Storage (GRS) and delegate upload access using long-lived Shared Access Signatures (SAS) generated directly on the connection string without a Stored Access Policy.

Answer

Enable multi-region writes in the Azure Cosmos DB account with Session consistency, using a synthetic partition key that combines the device identifier and date. For Azure Blob Storage, configure Geo-Redundant Storage (GRS) and delegate upload access using Shared Access Signatures (SAS) associated with a Stored Access Policy.
The configuration using a synthetic partition key and a Stored Access Policy for SAS authorization is correct because multi-region write replication guarantees the sub-10ms write latency and the 99.999% SLA. Session consistency provides read-your-writes guarantees and is supported with multi-region writes. The synthetic partition key ensures high cardinality to prevent hot partitions, and the Stored Access Policy allows security administrators to immediately revoke SAS tokens if a device is compromised.

Step-by-Step Solution

1
Analyze Azure Cosmos DB latency and consistency requirements for multi-region writes.
Confirming multi-region writes are enabled to meet sub-10ms write latency and 99.999% availability. Note that Strong and Bounded Staleness consistency levels are not supported in multi-region write configurations, making Session consistency the highest level that guarantees read-your-writes.
Ensures the database matches performance constraints while choosing the strongest supported consistency level.
2
Design the Cosmos DB partitioning strategy.
Rejecting low-cardinality keys like Region ID, and selecting a high-cardinality synthetic key (combining device ID and date).
Prevents hot partitions and distributes write request units evenly across physical partitions.
3
Select Blob Storage redundancy and security patterns.
Configuring Geo-Redundant Storage (GRS) to survive regional outages, and using Shared Access Signatures (SAS) bound to a Stored Access Policy.
Meets redundancy SLAs and allows revocation of SAS tokens by modifying or deleting the underlying Stored Access Policy if a device is compromised.

Key Concept

Azure Cosmos DB Multi-Region Consistency and Partitioning with Azure Storage SAS Security
Rate this question