By using AWS re:Post, you agree to the Terms of Use
/ALB DNS name with 3 AZs enabled resolves to 1 IP/

ALB DNS name with 3 AZs enabled resolves to 1 IP

0

Hi,

I created an ALB with a target group pointing to one test webserver EC2 instance. Even though I enabled all 3 AZs in my region, if I lookup the ALB DNS name (*.elb.amazonaws.com), it always resolves to only one IP. Isn't it supposed to assign an IP per AZ and return all those three IPs for the DNS name of the ALB if I enable 3 AZs for the ALB?

Or is it scaling down the AZs automatically due to currently low traffic or due to the fact that we have currently only one EC2 instance as target in the target group? (we are still in the development phase)

Thanks.

1 Answers
2

When you look up the DNS name of the ALB, you'll get the IP address of the ALB, not of the compute resources you configure in the target group (which, in fact, need not even have Internet-routable IP addresses). Whether you have one EC2 instance behind the ALB or 1000, the DNS record for the ALB will always resolve to that single IP address.

Note that if you create your own DNS record in Route 53, you do have the option of assigning multiple IP addresses to it and let Route 53 determine which one to send back as a response to a DNS lookup, but that's not what happens in this case.

answered 2 months ago
  • Yes, I understand that it should resolve the ALB IP(s) and not the target's IPs.

    What I don't understand is: Why does the AWS Web UI (under EC2 -> Load Balancers, when I select the ALB) show the three AZs and subnets and for each of them "IPv4 address: Assigned by AWS". This sounds to me like the ALB has one IP per AZ. How otherwise would there be fault tolerance if one AZ goes down?

    Also: On another ALB of ours (also one target, three AZs enabled) looking up the DNS name of the ALB returns two IPs with the order randomized each time.

  • Depending on a few different factors (mostly scale but sometimes other events) each "single" ALB may have one or more IP addresses. This is normal.

  • Thanks, that makes sense.

  • One additional question: If I lookup the AAAA records of our first ALB, I can see that it's returning an IPv6 address within the eu-central-1a subnet of our VPC. Looking up the second ALB, it returns IPv6 addresses in eu-central-1a and eu-central-1b subnets of our VPC, in random order each lookup. So if it scales down to just one AZ, how does fault-tolerance work in case that particular AZ goes down?

    (Let me know if I should post this as a separate question)

  • When you assign an ALB to targets in multiple subnets, that ALB will get an ENI in each of the subnets so that it can communicate with the instances in each one. Those won't be associated with the client-facing DNS name of the ALB (e.g. *.elb.amazonaws.com).

    These are the IP addresses to which the console refers when you see "Assigned by AWS" in the Description tab for your ALB.

    You can see them if you open the EC2->Network Interfaces pane. The requester ID for these ENIs will be "amazon-elb."

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions