Hi @Willfin David ,
Welcome to Microsoft Q&A forum and thanks for using Azure Services.
As I understand from the question, you want to know "How to read and write from multiple cosmos db database present in different datacenters"
Please let me know if my understanding is otherwise.
We can use the concept of Global Distribution in Cosmos DB. Here is the detailed tutorial for the same: Tutorial: Set up Azure Cosmos DB global distribution using the API for NoSQL
And we can set PreferredLocations
using the API for NoSQL illustrated here Connecting to a preferred region using the API for NoSQL.
Based on the Azure Cosmos DB account configuration, current regional availability and the preference list specified, the most optimal endpoint will be chosen by the SQL SDK to perform write and read operations.
Hope this information helps. If you have any further query do let us know.