Read response time from Read only replicas are high in Cosmos DB

Dubey, Yogesh Vishnudev 41 Reputation points
2022-07-01T09:24:08.65+00:00

Hi All,

We have configured one write and 3 read regions in the cosmos db account. The read write (primary region) is located in Us east 2 , while read only regions are West europe and Japan east. We are reading data from Cosmos account using Web API's which are also deployed globally in this same regions. When i hit the Us E2 api the reponse time is expected approx (150-200 ms), however when we hit the same API's deployed in Japan or West europe the response time is 4 secs on average. I was expecting it would fetch the data from read only replica deployed in west europe and east japan region

Note :- I am using Read only keys to fetch data from Cosmos in all geo's. But now i am blocked because of high response time in EMA and APA region.
We are using replicate data globally feature of the Cosmos to configure read and write regions.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,448 questions
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 27,642 Reputation points Microsoft Employee
    2022-07-05T09:49:44.467+00:00

    Hi, @Anonymous Welcome to the Microsoft Q&A forum, and sorry for the delay in my response as I was on vacation.
    It seems that you did not set region preference and it keeps hitting the US East 2 region from any application instance deployed anywhere in the world.

    The following article explains how to set the PreferredLocations option and has examples for different SDK versions. Tutorial: Azure Cosmos DB global distribution tutorial for the SQL API | Microsoft Learn

    Regards
    Geetha


0 additional answers

Sort by: Most helpful