I attached an elastic ip to an ec2 instance. When I move the elastic ip to another instance(because of a failure for example), the IP is updated in about 10 seconds to point to the new instance. The problem is, that I reach the elastic ip through its public dns, and it seems that it doesn't update to the new ip for about 3 minutes. How can I make this transition faster without using the ip address directly?
Asked
Active
Viewed 219 times
1 Answers
0
There is a TTL (time to live) on the dns records. It sounds like it has been set to 180 seconds or greater. You need to decrease TTL in your public DNS record.
AWS Route53 Information on TTL
Using the dig command you can see what the current value for amazon.com is 51 seconds. Note, multiple queries to amazon.com will produce different results.
$ dig console.aws.amazon.com
[ OUTPUT REMOVED FOR CLARITY ]
;; ANSWER SECTION:
amazon.com. 51 IN A 205.251.242.103
amazon.com. 51 IN A 176.32.98.166
amazon.com. 51 IN A 176.32.103.205

WaltDe
- 1,715
- 8
- 17