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개 답변
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

Winnie
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠