Al usar AWS re:Post, aceptas las AWS re:Post Términos de uso

How do I troubleshoot stickiness issues on my Network Load Balancer in Elastic Load Balancing?

3 minutos de lectura
0

I want to troubleshoot stickiness issues on my Network Load Balancer in Elastic Load Balancing.

Short description

Stickiness, or session affinity, routes clients to the same target over the session's duration. The Network Load Balancer's stickiness is activated at the target group level, with a stickiness value of source_ip. For more information, see Sticky sessions.

The following are possible causes of stickiness issues on your Network Load Balancer:

  • An unhealthy sticky target.
  • A target is registered or deregistered with the target group.
  • Cross-zone loading is turned on or off during a sticky session.
  • The client is behind a load balancer or proxy that remaps source IP addresses.
  • The client is on a mobile network and switches between Wi-Fi and cellular data.
  • The client's DHCP-assigned IP address expires and changes during the session.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

To troubleshoot stickiness issues on your Network Load Balancer, complete the following steps:

Check if stickiness is turned on

To check if stickiness is turned on, use one of the following methods:

Use the Amazon EC2 console

Make sure that the target group for your Network Load Balancer is active and stickiness is configured correctly. If stickiness is turned off, then see the To enable sticky sessions using the console section in Sticky sessions.

Note: Stickiness isn't supported in Transport Layer Security (TLS) listeners.

Use the AWS CLI

To check if your Network Load Balancer is configured for stickiness, run the following describe-target-group-attributes command:

$ aws elbv2 describe-target-group-attributes --target-group-arn example-target-group-arn  --region example-region

Note: Replace example-target-group-arn with your target group's ARN and example-region with your AWS Region.

If your Network Load Balancer isn't configured for stickiness, then run the modify-target-group-attributes command with the stickiness.enabled attribute.

Check if the target group is healthy

When a target group's health status changes from healthy to unhealthy, stickiness is broken. Also, when you turn off cross-zone load balancing, stickiness might be broken. Before you turn off cross-zone load balancing, make sure that the sticky target isn't in a different Availability Zone than the Network Load Balancer's IP address. To check the health of your Network Load Balancer target groups, use the Amazon EC2 console or run the following describe-target-health command:

$ aws elbv2 describe-target-health \
--target-group-arn example-target-group-arn

Note: Replace example-target-group-arn with your target group's ARN.

Related information

Target group attributes

elbv2

OFICIAL DE AWS
OFICIAL DE AWSActualizada hace 3 meses