Avatar of myyis
myyis
 asked on

DNS and IP location problem

I have 2 sites: site.com and us.site.com
site.com (1.1.1.1) is hosted in Asia and us.site.com (2.2.2.2) is hosted in USA

The majority of  the visitors located in USA go to us.site.com
A few visitors located in USA  and using site.com are directed  to us.site.com with code using GeoIP location.
The problem is when the site.com fails those few users get an error.

I may use 2 A records for site.com (1.1.1.1 and 2.2.2.2) to overcome this problem but in this case lots of visitors (may be the majority) located in Asia will be redirected to 2.2.2.2 depending on the browser behaviour.

I can redirect the Asian visitors to 1.1.1.1 with code but this solution is very inefficient.

How can I solve this problem?
Cloud ComputingDNSPHP

Avatar of undefined
Last Comment
Kimputer

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Kimputer

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Kaiser Anwar

myyis

ASKER
This service https://cloud.google.com/dns/what-is-cloud-dns 
is cheap but I am not sure if it has a function for problem. I have read it but I have little knowledge about the subject.
Can you have a look?
Thank you
Kimputer

That's just the basic DNS functions, no real geo traffic redirection/ fail over / dynamic updates logic built in.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23