A .NET web app uses the Cosmos DB Core API and must support millions of reads/writes with the account configured for multiple write regions. The app is deployed in East US2 and Central US. What two client-side changes can enable multi-region writes from the application?
Choose an answer
Tap an option to check your answer.
Correct answer: Update the ConnectionPolicy class for the Cosmos client and populate the PreferredLocations property based on the geo-proximity of the application., Update the ConnectionPolicy class for the Cosmos client and set the UseMultipleWriteLocations property to true..
Why this is the answer
To enable multi-region writes from a .NET application using the Cosmos DB Core API, two key client-side configurations are necessary. First, setting the UseMultipleWriteLocations property of the ConnectionPolicy class to true explicitly tells the Cosmos DB client to allow writes to any configured write region. Second, populating the PreferredLocations property in the ConnectionPolicy with a list of preferred Azure regions, ordered by geo-proximity to the application, allows the client to intelligently route requests to the nearest available region, optimizing latency for both reads and writes. Incorrect options: Changing consistency levels (Strong or Session) or adding indexed properties are server-side configurations and do not directly enable multi-region writes from the client. Creating a custom conflict resolution policy is for handling write conflicts, not for enabling multi-region writes themselves.
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