AWS re:Post을(를) 사용하면 다음에 동의하게 됩니다. AWS re:Post 이용 약관

Uneven traffic from NLB to the targets in a target group

0

I have an NLB -> Target Group -> Targets setup. I added a new target which is healthy. However, the traffic distribution is not even after 4 hours. I came across a couple of posts indicating possibilities around:

  • Target IP caching
  • Long-lived TCP connections

As I don't have control over the client, is there a way I can reach a balanced distribution?

3개 답변
1

I wanted to address your specific question around how the traffic is distributed across targets. From the documentation located HERE, we see the following:

...For TCP traffic, the load balancer selects a target using a flow hash algorithm based on the protocol, source IP address, source port, destination IP address, destination port, and TCP sequence number. The TCP connections from a client have different source ports and sequence numbers, and can be routed to different targets. Each individual TCP connection is routed to a single target for the life of the connection.

For UDP traffic, the load balancer selects a target using a flow hash algorithm based on the protocol, source IP address, source port, destination IP address, and destination port. A UDP flow has the same source and destination, so it is consistently routed to a single target throughout its lifetime. Different UDP flows have different source IP addresses and ports, so they can be routed to different targets...

Depending on the timeframe in which you are examining your traffic, you could very well see an imbalanced distribution, based on the number of connections and how they map across the flow hash algorithm described above. Have you tried testing with a larger group of source IPs against your NLB? In my experience, as the number of unique flows are established, this "imbalance" is rectified.

profile pictureAWS
답변함 2년 전
  • Yes, I think the key was to restart the services to give it an opportunity to establish new connections

0

Do you have stickyness enabled on the TG?

Using sticky sessions can lead to an uneven distribution of connections and flows, which might impact the availability of your targets. For example, all clients behind the same NAT device have the same source IP address. Therefore, all traffic from these clients is routed to the same target.

profile picture
전문가
답변함 2년 전
0

No, it isn't. I ended up restarting the entire service, which broke the long connections, it is more even now.

답변함 2년 전

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

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

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

관련 콘텐츠