Configuring high availability for SHS with an internal load balancer
Learn how to configure high availability for Spark History Server (SHS) using an internal load balancer. The authentication method for the internal load balancer uses a username and password through Apache Knox Gateway. The Cloudera Distributed Hadoop (CDH) stack includes the Apache Knox Gateway which has a built-in load balancer and failover mechanism.
The
following Knox topology configuration is automatically generated if there are two
Spark History Server clusters in a Cloudera Manager cluster:
knox.example.com:/var/lib/knox/gateway/conf/topologies/cdp-proxy.xml
<param>
<name>SPARK3HISTORYUI</name>
<value>enabled=true;maxFailoverAttempts=3;failoverSleep=1000</value>
</param>
<param>
<name>SPARKHISTORYUI</name>
<value>enabled=true;maxFailoverAttempts=3;failoverSleep=1000</value>
</param>
<service>
<role>SPARK3HISTORYUI</role>
<url>https://shs1.example.com:18489</url>
<url>https://shs2.example.com:18489</url>
</service>
<service>
<role>SPARKHISTORYUI</role>
<url>https://shs3.example.com:18488</url>
<url>https://shs4.example.com:18488</url>
</service>