From the course: Microsoft Azure Cosmos DB Developer Specialty (DP-420) Cert Prep by Microsoft Press
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Choose when to use multi-region writes
From the course: Microsoft Azure Cosmos DB Developer Specialty (DP-420) Cert Prep by Microsoft Press
Choose when to use multi-region writes
The more review stuff that we've looked at earlier in the course but it's good to go over again, that Cosmos DB supports more than one read-write region. We know that when you do this, that is when you have more than one writer, Microsoft isn't able to give you strong consistency. The main point here of this lesson, that's an exam -- for exam DP-420 is that as an application developer, you can create a prioritized list of regions for writes via the SDK. So as you can see, when you're setting up your Cosmos client, you can create an array here, a regions list where you specify in descending order of priority what regions a client should connect to first, second, third, et cetera. And there are some latency measurements and this sort of thing baked into the SDK as well. Again, the use case here is that you have your Cosmos DB account replicated in more than one region, you've enabled write on those regions. And then depending upon…