What I currently have is the following
EC2x2 Instance in Tokyo (1 Proxy 1 Application)
EC2x2 Instance in Singapore (1 Proxy 1 Application)
With another another provider we have geo dns, so Tokyo users go to Tokyo instance and Singapore to Singapore.
I'm looking at moving to Route53 (I already have other DNS zones with Amazon) because I'd like to take advantage of the failover with Health Check. Having looked at the examples of how to configure it, I'm still unsure how to configure what I want, which is as follows.
I've configured 2 health checks one for each location, and these are working.
I've configured 2 DNS entries both called proxy.domain.com each with a routing policy of GeoLocation and selected Japan and Singapore and add the relevant EC2 IP to each.
I'm now trying to configure the cname site.domain.com so that if either location is unavailable users will fail over to the other instance.
However what seems to happen is what I also expect to happen. Even when the DNS fails over because the secondary target is the same DNS name as the primary target, the location of the user always wins and the other instance IP is never returned. Example
Japan ip: 1.1.1.1 Singapore ip: 2.2.2.2
From Singapore Ping site.domain.com > 2.2.2.2
Turn off Singapore (Health check confirms unhealthy)
Waiting for TTLs to expire, flushdns.
From Singapore Ping site.domain.com > 2.2.2.2 (At this point I want this to return 1.1.1.1)