5

It seems that both the load balancer url and the elastic beanstalk point to the same ip address.

thomasreggi$ nslookup aws-load-balancer-url.us-east-1.elb.amazonaws.com
Server:        8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:    aws-load-balancer-url.us-east-1.elb.amazonaws.com
Address: 100.00.000.0
Name:    aws-load-balancer-url.us-east-1.elb.amazonaws.com
Address: 100.000.000.000

thomasreggi$ nslookup elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Server:        8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:    elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Address: 100.00.000.0
Name:    elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Address: 100.000.000.000

I was wondering if there was any specific advantage using one url over the other.

ThomasReggi
  • 621
  • 2
  • 10
  • 25
  • ...such as????? - it has the same IP because the load balancer is serving the cluster, i.e. it should resolve to the load balancer, otherwise it won't be load balanced - even if the cluster scaled up and down in some sort of elastic fashion it would still resolve to the load balancer – Sum1sAdmin Apr 22 '16 at 23:07

1 Answers1

8

Your Elastic Beanstalk URL points to the Elastic Load Balancer URL. This is intentional.

It is better to create a DNS CNAME pointing to your Elastic Beanstalk URL rather than the ELB URL. The reason being that in Elastic Beanstalk, you can start multiple environments within the same application, then swap the URLs around.

This way, if you want to move people to a new environment, you just swap the EB URL and you won't need to make any DNS changes yourself.

For example, you could have a "stable" URL pointing to your production environment and a "staging" URL pointing to a staging environment. Then, when you want to move your staging environment to production, you would just swap the URLs. After that, your "stable" URL is then pointing to your old staging (the new production) environment. You can either terminate the old production environment or use it as the new staging environment.

Matt Houser
  • 10,053
  • 1
  • 28
  • 28