Skip to main content

Home

Configuring load balancing for Log Receiver (LR)

You must enable the load balancer if multiple instances of LR are deployed. Deploy each instance of LR on a different node and ensure that the processing of logs is properly coordinated across all nodes.

Enabling Log Receiver (LR) load balancing

You must enable LR load balancing for a new installation or upgrade from the previous version of Unravel to the new version.

  1. Enable the NGINX for load balancing multiple instances of the log receiver.

    /<unravel_installation_directory>/unravel/manager service enable nginx --permanent
  2. Make Unravel daemons reachable over the network.

    By default, most Unravel daemons are set up to be accessible only within the local network. Configure the daemons to enable communication between a log receiver on a second server and the daemons to be reachable from the wider network.

    /<unravel_installation_directory>/unravel/manager config multinode public-listen enable 
  3. Add the additional LR node definition in the unravel.yaml file on the main server.

    /<unravel_installation_directory>/unravel/manager config multinode add <hostkey> <label> <hostname> --role log_receiver

    Where:

    • <hostkey> is an internal Unravel reference. For example lr-2

    • <label> is the display name to identify the node. For example, ACME's second log receiver

    • <hostname> is the hostname that runs the log receiver, which is used for generating the configuration.

      If the internal and external hostnames differ, add an optional --host-alias <hostname> parameter to look up the configuration.

  4. Apply the configuration.

    <Unravel installation directory>/unravel/manager config apply
  5. Start Unravel.

    <Unravel installation directory>/unravel/manager start

    Unravel starts, and the load balancer sends traffic to the log receiver on the main Unravel server.

Installing Unravel using LR configuration

After you set up the LR configuration on the main node, do the following:

  1. Copy the unravel.yaml file from the main node to the new server.

    For example: /home/unravel

  2. Install Unravel on the LR server. Use unravel.yaml as a parameter.

    <Unravel installation directory>/unravel/versions/<Unravel version>/setup --config /home/unravel/unravel.yaml
  3. Set Unravel license.

    <Unravel installation directory>/unravel/manager config license set <path of a license file>

    Example: /opt/unravel/manager config license set /tmp/license.txt

    For more information, see Setting Unravel license.

  4. Start Unravel on the LR server.

    <Unravel installation directory>/unravel/manager start

    After the load balancer detects that the LR is available, the load balancer starts sending traffic to the log receiver.

Disabling Log Receiver (LR) load balancing

Prerequisite

You must first uninstall Unravel from the LR server.

Perform the following steps on the LR server, assuming the LR server location is /opt/unravel:

  1. Stop Unravel.

    /opt/unravel/manager stop
    
  2. Uninstall Unravel.

    /opt/unravel/manager uninstall

Perform the following steps on the main server:

  1. Stop Unravel.

    <unravel_installation_directory>/unravel/manager stop
    
  2. Disable NGINX.

    <unravel_installation_directory>/unravel/manager service disable nginx --permanent
    
  3. Remove the second node configuration.

    <unravel_installation_directory>/unravel/manager config multinode remove <host-key>

    Where <host-key> is an internal Unravel reference used when adding the node. For example lr-2

  4. Make Unravel daemons reachable within the local network.

    <unravel_installation_directory>/unravel/manager config multinode public-listen disable
  5. Apply the configuration.

    <unravel_installation_directory>/unravel/manager config apply
  6. Start Unravel using one LR.

    <unravel_installation_directory>/unravel/manager start