參考:
hue的load balance官網:
https://www.cloudera.com/documentation/enterprise/6/6.2/topics/hue_use_add_lb.html
HA:
https://www.cloudera.com/documentation/enterprise/6/6.2/topics/hue_sec_ha.html
CDH啟用hue的load balance:
Hue-->添加角色
選擇一台做為load balance的主機
Hue服務器可以與Load Balancers共享主機。但Hue服務器必須位於與其他Hue服務器不同的主機上.
在hue server中再添加一台hue的主機.
重啟服務.
通過web訪問load balancer所在主機的8889端口(注意不是hue的8888端口了)
http://192.189.142.89:8889
一個問題:啟用load balance的會話保持問題:
源IP持久性
如果沒有IP持久性,您可能會遇到錯誤“ 結果已過期,如果需要,請重新運行查詢。
Hue通過“負載均衡器”向HiveServer2和Impala支持高可用性。由於底層Hue thrift庫重用池中的TCP連接,因此單個用戶會話可能沒有相同的TCP連接。如果TCP連接與HiveServer2或Impalad實例保持平衡,則用戶會話及其查詢(運行或返回)可能會丟失並觸發“結果已過期”錯誤。
https://www.cloudera.com/documentation/enterprise/6/6.2/topics/hue_sec_ha.html