Correct Answer: Use tenantId as the partition key to ensure all data for a tenant is co-located and queries are efficient within a single logical partition
For multi-tenant applications, using tenantId as the partition key ensures that all data belonging to a tenant resides in the same logical partition. This eliminates cross-partitio...
Correct Answer
Use tenantId as the partition key to ensure all data for a tenant is co-located and queries are efficient within a single logical partition
Why This Answer Is Correct
For multi-tenant applications, using tenantId as the partition key ensures that all data belonging to a tenant resides in the same logical partition. This eliminates cross-partition queries for tenant-specific operations, significantly reducing RU/s consumption and latency.
This question evaluates your knowledge of Azure Cosmos DB โ a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Cosmos DB is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
You are designing a multi-tenant SaaS application using Azure Cosmos DB for NoSQL. Each tenant's data must be logically isolated and queries should never cross tenant boundaries. Query performance must be predictable. How should you partition the container?
Your application reads Azure Cosmos DB data globally across three regions. The marketing team needs data to eventually be the same across all regions, and can tolerate reading slightly stale data (up to 5 minutes old) in exchange for lower latency reads. Which consistency level should you configure?
You are developing a high-throughput shopping cart service using Azure Cosmos DB for NoSQL. The service needs to update a customer's shopping cart document by adding an item. To ensure high efficiency, minimize RU/s consumption, and prevent concurrent modification conflicts without loading the entire document first, which feature should you use?
You are building a microservices architecture. You need a data sync solution where changes to documents in your primary Azure Cosmos DB database automatically trigger a downstream search index service to update its records in real-time. Which Cosmos DB feature allows you to listen for changes without polling the database?