No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


HUAWEI CLOUD Stack 6.5.0 Troubleshooting Guide 02

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Invalid Sticky Session

Invalid Sticky Session


The sticky session enabled for a load balancer is invalid.

Possible Causes

  • The client source IP address has changed.

    For layer-4 load balance using TCP, the sticky session determines whether the visitor is the same based on the source IP address. If the IP address is the same and the sticky session does not time out, all connections are forwarded to the same backend Cloud Server. If IP addresses are different, connections are forwarded to different backend Cloud Servers based on the load balancing policy.

    If the client network environment changes, source IP addresses of requests received by the backend Cloud Servers are different and sessions are not held. The client source IP address may change in the following cases:

    • The client PC's network changes from the wired network to the wireless network, or from the 4G network to the wireless network.
    • Some carriers set some policies for user access. When end users use the network, their public IP addresses may change.
  • The sticky session times out.

    If the sticky session is enabled, requests from the same user within the configured timeout duration will be sent to the same backend Cloud Server for processing. If the timeout duration configured for the sticky session is 60s, request after 60s will be sent to another backend Cloud Server.


For layer-4 (TCP or UDP) services, the load balancer maintains sessions based on the IP address. It means that requests from the same IP address are forwarded to the same backend Cloud Server for processing. For layer-7 (HTTP or HTTPS) services, the load balancer maintains sessions based on the cookie.


  1. Collect information about the faulty load balancer, including the load balancer IP address, listening port, weight configuration, and listener protocol.
  2. Check logs of all backend Cloud Servers or capture network packets from the backend Cloud Servers, and check whether the source IP address of the client changes when the fault occurs.

    If the source IP address change results in the session timeout, handle the fault using the following method:

    • If your service is a website,

      you are advised to change the forwarding mode of the load balancer to the layer-7 HTTP mode, which checks whether requests are from the same user by cookie (including the insert and server modes).

    • If your service is based on TCP,

      you are advised to make some logical judgment about the user identity at the application layer based on the data sent by users, rather than their IP addresses.

    • If the service on the backend Cloud Server has no status, you can disable the TCP sticky session at layer 4.

      For a service that has no status, there is no need to distribute requests from the same client to the same backend Cloud Server.

    If the problem persists, contact technical support for assistance.

Updated: 2019-06-01

Document ID: EDOC1100062375

Views: 2014

Downloads: 12

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next