Mobile app version of vmapp.org
Login or Join
Yeniel560

: How to handle Database Latency in Cross Region? AWS I am working on a project with below setup The users from USA are receiving much faster response, but for the users from INDIA/China, it

@Yeniel560

Posted in: #Scalability

I am working on a project with below setup



The users from USA are receiving much faster response,
but for the users from INDIA/China, it takes more time to Load.

How can this issue be addressed?
Based on my search, some suggest it was due to database latency, since
Server from China has to contact RDS in USA and render result.

But i am not sure if that's the real cause.
Please suggest.

Note : I am using Amazon RDS as database and PHP as backend.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Yeniel560

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

The issue you have identified (database latency) is most definitely the issue. Some people assume that because AWS is a cloud provider all data and services is available across the whole world, but its not quite like that. RDS (Relational Database Service) is region specific. What that means is that your database is hosted within a single data center in a single geographic region. There is however a way to resolve this issue and it is called Cross-Region Read Replicas.

Cross region read replicas are good for disaster recovery, migrating between regions, and scaling out globally. In your instance it resolved number 3 (scale out globally). You will be unable to handle database writes from the read replica and it will require a slight change to your code to ensure database read requests go to the local instance and write requests go to the master instance (USA).
aws.amazon.com/blogs/aws/cross-region-read-replicas-for-amazon-rds-for-mysql/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme