Search code examples
dnsgeolocationamazon-route53

How does Geolocation Route 53 and DNS caching behave if the server IP changes?


I have very little experience in administration, so my question may seem silly. Sorry in advance.

My site uses Geolocation in Route 53. That is, I specify the IP address of the server for each user region. For example, users from Japan log in to server1, users from the US log in to server2, and users from Europe log in to server3.

Everything is fine at the moment, but I'm worried about the risks if something goes wrong with different servers. As far as I know, DNS records are cached from the user. Out of concern about this, I have a few questions:

  1. What happens if server1 or server2 goes down? Will Route 53 forward to server3? Or will it not do this automatically and I need to somehow configure Route 53 additionally?

  2. What happens if the IP address of server1 changes? In DNS, of course, I will specify a new IP for Geolocation with the region Japan, but if DNS is cached, then a user who visited the site a week ago from Japan will not be able to get to the site today. Right? That is, I believe that the old IP address of my server will be saved on his computer (cached), and that is where the request will go from the user's computer. That is, it will not know that the IP address has changed. Do I understand correctly? And if that's the case, how do I fix it?


Solution

  • What happens if server1 or server2 goes down? Will Route 53 forward to server3? Or will it not do this automatically and I need to somehow configure Route 53 additionally?

    You need to select a health check. Please read this in detail.

    What happens if the IP address of server1 changes? In DNS, of course, I will specify a new IP for Geolocation with the region Japan, but if DNS is cached, then a user who visited the site a week ago from Japan will not be able to get to the site today. Right?

    Yes

    That is, I believe that the old IP address of my server will be saved on his computer (cached), and that is where the request will go from the user's computer. That is, it will not know that the IP address has changed. Do I understand correctly?

    Yes, your understanding is correct. The solution is to set a relatively low TTL.