Configuring high availability for Cloudera Lakehouse Optimizer

Configure high availability (HA) for Cloudera Lakehouse Optimizer in Cloudera Manager by deploying multiple Cloudera Lakehouse Optimizer service instances and setting HA properties on each instance.

Before you configure HA, ensure the following requirements are met:
  • ZooKeeper is running and healthy on at least three hosts in the cluster or Data Hub.
  • Multiple Cloudera Lakehouse Optimizer service instances deployed on separate hosts within the same cluster or Data Hub.
  • All Cloudera Lakehouse Optimizer instances connect to the same shared database (PostgreSQL or MySQL).
  • All Cloudera Lakehouse Optimizer instances can reach ZooKeeper and the shared database.
  • Apache Knox is configured if you use Knox for REST API access.
Configure HA on every Cloudera Lakehouse Optimizer instance in the cluster or Data Hub. All instances must use the same ZooKeeper connection string, leader latch path, and shared database settings.

To configure HA on a Cloudera Lakehouse Optimizer instance:

  1. On Cloudera Base on premises, download, distribute, and activate the Cloudera Lakehouse Optimizer parcel, and deploy multiple service instances.
    1. Download the Cloudera Lakehouse Optimizer parcel from Cloudera.
    2. In Cloudera Manager > Hosts > Parcels, configure the remote parcel repository, download the parcel, distribute it to the cluster hosts, and activate it.
      For instructions, see Managing Parcels.
    3. Add the Cloudera Lakehouse Optimizer service to an existing Cloudera Base on premises cluster, or create a dedicated cluster and add the service.
      Ensure that the cluster contains the required dependent services, including ZooKeeper and Knox.
    4. In Cloudera Manager > Clusters > [***CLOUDERA LAKEHOUSE OPTIMIZER***], assign Cloudera Lakehouse Optimizer roles to at least two separate hosts so that multiple service instances are running.
  2. Navigate to Configuration > conf/dlm-client.properties_role_safety_valve.
    1. Set dlm.ha.enabled to true.
    2. Set dlm.ha.zookeeper.connect to the ZooKeeper connection string for your cluster. For example, zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181.
    3. Set dlm.ha.zookeeper.latch.path to the ZooKeeper path for leader election. For example, /dlm/leader.
    If you access Cloudera Lakehouse Optimizer through Apache Knox, configure the Knox discovery properties so the elected leader updates the Knox service descriptor. For the complete list of HA properties, see Cloudera Lakehouse Optimizer high availability configuration properties.
  3. Optionally, set dlm.ha.advertise.address on each instance if the auto-detected API URL is not reachable by other Cloudera Lakehouse Optimizer instances or API clients.
  4. Restart the Cloudera Lakehouse Optimizer service on all instances.
  5. Verify HA status using the GET /config/health API with scope=full.
    When HA is enabled, the health check response includes a High Availability entry that reports whether the instance is the leader or a standby.

After you configure HA:

  • Test failover by stopping the leader instance and verifying that a standby instance becomes the leader.
  • Monitor Cloudera Lakehouse Optimizer logs for leader election messages.
  • Restore ZooKeeper and restart Cloudera Lakehouse Optimizer if an instance starts in degraded mode.