The Hue load balancer not distributing users evenly across various Hue servers

The Hue load balancer redirects the new users to the newly added Hue servers and the existing users to the existing Hue servers on your cluster. Even though you add more Hue servers to meet the growing user base, the resources might not be utilized effectively.

The Hue load balancer is tasked to evenly distribute users across the available Hue servers for effective resource utilization. However, due to session persistence, it does not distribute users evenly. To overcome this issue, you can refresh the cookies from Cloudera Manager.

The load balancer uses the cookie ROUTEID with a random string from your browser and is stored in the hue.conf file. This random string is used to redirect a user to the Hue server. To refresh the cookie and set a new random string every time you add a new Hue server, do the following:

  1. Go to Cloudera Manager > Clusters > Hue > Configuration.
  2. Click Scope > Load balancer and select the Hue Load Balancer Cookie Refresh checkbox.
    This refreshes the cookie value in the hue.conf file to rebalance the Hue backend connections.
  3. In the Instances tab, select all the Hue services and roles, and click Action for Services > Restart.
    This creates a new random string for the cookie which the load balancer can now use to evenly distribute users.
Whenever you restart the Hue server, the load balancer will redistribute users evenly based on the server load.