Deploy in Cluster Mode
Kylin instances are stateless services, and runtime state information is stored in the Mysql metastore. For load balancing purposes, you can enable multiple Kylin instances that share a metastore, so that each node shares query pressure and backs up each other, improving service availability. The following figure depicts a typical scenario for Kylin cluster mode deployment:
Kylin Node Configuration
If you need to cluster multiple Kylin nodes, make sure they use the same Hadoop cluster. Then do the following steps in each node's configuration file $KYLIN_HOME/conf/kylin.properties
:
- Configure the same
kylin.metadata.url
value to configure all Kylin nodes to use the same Mysql metastore. - Configure the Kylin node list
kylin.server.cluster-servers
, including all nodes (the current node is also included). When the event changes, the node receiving the change needs to notify all other nodes (the current node is also included). - Configure the running mode
kylin.server.mode
of the Kylin node. Optional values includeall
,job
,query
. The default value is all. The job mode means that the service is only used for job scheduling, not for queries; the query pattern means that the service is only used for queries, not for scheduling jobs; the all pattern represents the service for both job scheduling and queries.
Note
By default, only one instance can be used for the job scheduling (ie., kylin.server.mode
is set to all
or job
).