You manage a read-heavy product catalog in Azure Cosmos DB SQL API. The app issues many identical read and query requests repeatedly. You can tolerate results up to 60 seconds stale to reduce RU costs and latency. Currently, clients use Direct mode. What should you do? (Select two)
Choose an answer
Tap an option to check your answer.
Correct answer: Provision a dedicated gateway for the Cosmos DB account and update clients to use Gateway mode via the dedicated gateway endpoint., Set MaxIntegratedCacheStaleness (or equivalent) to 60 seconds on read and query requests to allow results to be served from the integrated cache..
Why this is the answer
To optimize for read-heavy workloads with tolerable staleness, leveraging the integrated cache is key. Provisioning a dedicated gateway and updating clients to use Gateway mode via its endpoint enables the integrated cache for SQL API accounts. This cache stores frequently accessed data, reducing RU consumption and latency for repeated requests. Setting MaxIntegratedCacheStaleness (or its equivalent in your SDK) to 60 seconds explicitly instructs the integrated cache to serve cached results up to that age, aligning with the acceptable staleness requirement. Keeping Direct mode would bypass the integrated cache, as it's primarily used with Gateway mode. Reducing the indexing policy would save RUs on writes but wouldn't inherently leverage the integrated cache for reads. Item TTL is for data expiration within Cosmos DB, not for controlling cache staleness.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed