Setting Up Knox Services for HA
This chapter describes how to set up the Knox Gateway for HA (high availability). Knox provides connectivity based failover functionality for service calls that can be made to more than one server instance in a cluster. Knox supports HA for HBase, Hive, Oozie, WebHCat, and WebHDFS.
<provider>
<role>ha</role>
<name>HaProvider</name>
<enabled>true</enabled>
<param>
<name>OOZIE</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>HBASE</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>WEBHCAT</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value>
</param>
<param>
<name>WEBHDFS</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=1000;enabled=true</value>
</param>
<param>
<name>HIVE</name>
<value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true;zookeeperEnsemble=machine1:2181,machine2:2181,machine3:2181;
zookeeperNamespace=hiveserver2</value>
</param>
</provider>
<service>
<role>OOZIE</role>
<url>http://sandbox1:11000/oozie</url>
<url>http://sandbox2:11000/oozie</url>
</service>
<service>
<role>HBASE</role>
<url>http://sandbox3:22000/hbase</url>
<url>http://sandbox4:22000/hbase</url>
</service>
<service>
<role>WEBHCAT</role>
<url>http://sandbox5:33000/webhcat</url>
<url>http://sandbox6:33000/webhcat</url>
</service>
<service>
<role>WEBHDFS</role>
<url>http://sandbox7:44000/webhdfs</url>
<url>http://sandbox8:44000/webhdfs</url>
</service>
<service>
<role>HIVE</role>
</service>