By using AWS re:Post, you agree to the Terms of Use

DNS not resolving correctly

0

We had a load balancer with one target group rotating between 3 private IPS.

Then used haproxy to tunnel traffic in a round robin way to one of the 3 instances using the nlb something like this in the haproxy config:

backned our-backend
    server          nlb        our-nlb-amazonaws.com:62015 check resolvers awsresolver

But this morning this stopped working, using dig from the haproxy(and locally) it resolves to 3 totally different ips then the ones in the target group.

We've fixed this for now by bypassing the load balancer and listing the 3 instances in the haproxy directly which works fine for now, but it's not the best since deploying or adding more of those instances would mean that this config would have to change as well. This is a bit fragile and the previous approach is preferred.

1 Answers
0

Hi njichev,

I understand your traffic flow is as follows:

Client ----> HaProxy ------> NLB --------> Three targets

So based on your notes, you ran a dig to the NLB DNS and you saw three IP addresses that are not of the targets. Please correct me if I misunderstood.

When running a dig to the ELB DNS, the IP Addresses that appears belong to the NLB nodes and not of the targets, hence you saw different IPs of the targets . For more information on NLB IPs, you can refer to the following document: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html

Enlisting the IP addresses of the targets, it changes your traffic flow as Client ----> HaProxy ---> Three targets. Your HaProxy hits the target directly without going through the load balancer. I would like to suggest, enlisting the NLB DNS name back and then troubleshoot the NLB issue.

You can refer to the following document on troubleshooting issues: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-troubleshooting.html

answered 2 months ago

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