3

I have a sub domain and pointed this to an amazon elastic load balancer which includes a few EC2 instances. To point the sub domain we created a CNAME record and put the value of the DNS name of the load balancer.

Now my question is:

You know the IP address of elastic load balancer changes randomly.

So if I request to resolve DNS of my sub domain from any application is there any possibility that there will be a DNS propagation delay issue (which can cause to return me old IP address of the load balancer) if the load balancer's IP has changed.

Should I wait for the propagation of the new IP? Or will the new IP be propagated real time even if the elastic load balance changes just before the DNS request gets resolved?

Bas Peeters
  • 3,269
  • 4
  • 33
  • 49
user3011768
  • 191
  • 2
  • 3
  • 11

2 Answers2

0

You need not worry about the IP address of the ELB and its tendency of changing IP address. Instead of the IP address in the CNAME record you just need to put one of the DNS Names (IPv4 or IPv6) an ELB would provide ex: Test-ELB-12345678.us-east-1.elb.amazonaws.com

Quote from the ELB info page

Note: Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an "A" record with any specific IP address. If you want to use a friendly DNS name for your load balancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone. For more information, see Using Domain Names With Elastic Load Balancing.

Naveen Vijay
  • 15,928
  • 7
  • 71
  • 92
0

There seems to have been such concerns some years ago. You can read the following interesting article which describes some of the potential issues: Elastic Load Balancer: An Elasticity Gotcha

  • A new ELB IP is added to your ELB pool. The clients of another application that keep the old DNS entry will hit your application:

The problem is that DNS resolution is cached at many layers across the internet. When the ELB scales up and gets a new virtual appliance IP address from the global pool, some client somewhere might still be using that IP address as the resolution of a different ELB’s DNS name. This other ELB might not even belong to you. A few hours ago, another ELB with a different DNS name returned that IP address from a DNS lookup. Now, that IP address is serving your ELB. But some client somewhere may still be using that IP address to attempt to reach an application that is not yours.

  • An ELB IP is removed from your ELB pool and assigned to some other application's ELB pool. Your clients that keep the old DNS entry will end up hitting that other application:

The flip side occurs when the ELB scales down and releases a virtual appliance IP address back to the global pool. Some client somewhere might continue resolving your ELB’s DNS name to the now-relinquished IP address. When the address is returned to the pool, that client’s attempts to connect to your service will fail. If that same virtual appliance IP is then put into service for another ELB, then the client working with the cached but no-longer-current DNS resolution for your ELB DNS name will be directed to the other ELB virtual appliance, and then onward to back-end instances that are not yours.

Now, this article is from 2009 and as of March 2010, Amazon has partially addressed this concern:

ELB IP addresses will continue to direct traffic to the ELB for one hour after being withdrawn from that ELB’s DNS pool

Keep in mind that some clients that cache DNS entries for longer periods of time could still be affected.

Andrei G
  • 76
  • 1
  • 5