Skip to main content

Setting Up HA Search Environment

To configure a redundant HA search environment, follow these steps. This includes adding search servers and an ingress replicator server, as well as setting up a proxy server to load balance requests to each search server and ingress replicator.

Adding an Ingress Replicator Server

  1. Install the Jive Linux package on the ingress replicator servers that will be part of your HA search service configuration. For more information, see Installing Jive package and starting up.

  2. Enable the ingress replicator to start by typing the following command as the jive user:

    jive enable ingress-replicator
  3. Verify the following properties in the main-args.properties file (located in /usr/local/jive/services/ingress-replicator-service/). An example configuration is shown below:

    PORT=29000
    REPLICATE_INGRESS_TO_THESE_COMMA_SEPARATED_HOST_COLON_PORT_TUPLES=guaranteed:all:search01.yourdomain.com:30000,guaranteed:all:search02.yourdomain.com:30000
    REPLICATE_REBUILD_TO_THESE_COMMA_SEPARATED_HOST_COLON_PORT_TUPLES=search01.eng.yourdomain.com:30000,search02.eng.yourdomain.com:30000
    REPLICATE_INDEX_MANAGE_TO_THESE_COMMA_SEPARATED_HOST_COLON_PORT_TUPLES=search01.eng.yourdomain.com:30000,search02.eng.yourdomain.com:30000
  4. Restart the ingress replicator service using the following command as the jive user:

    jive restart ingress-replicator

Adding a Search Server

  1. Install the Jive Linux package on the search servers that will be part of your HA search service configuration. For more information, see Installing Jive package and starting up.

  2. Enable the search service to start by typing the following command as the jive user:

    jive enable search
  3. Verify that the port is correct for your setup in the main-args.properties file (located in /usr/local/jive/services/search-service/). An example configuration is shown below:

    PORT=30000
  4. Restart the search service using the following command as the jive user:

    jive restart search
  5. Ensure that a JSON services file named serviceDirectory.json is included on each search server in the configuration. This file should be identical for all of the search servers (not the ingress replicators) in your HA configuration.

Important Considerations

As of Jive 7.0, the search index rebuild process has been improved so that you no longer have to rebuild the search index on one node and then copy it to all of the other search nodes. In versions 7.0+, the ingress replicators automatically send rebuild traffic to all search nodes. All of the search nodes must be available before starting a search rebuild to ensure that the search index on the search service nodes is always consistent.

Setting Up the Proxy Server

To configure a proxy server that load balances requests:

  1. Install a proxy server using yum:

    yum install haproxy
  2. Set the proxy to start automatically whenever the server restarts:

    chkconfig haproxy on
  3. Edit the proxy's config file (located in /etc/haproxy/haproxy.cfg) as follows:

    frontend  main
    bind haproxy.yourdomain.com:20000,haproxy.yourdomain.com:19000
    acl ingress-r dst_port 19000
    use_backend ingress-replicator if ingress-r
    default_backend search

    backend search
    balance roundrobin
    option httpchk GET /ping
    server search01 search01.yourdomain.com:30000 check
    server search02 search02.yourdomain.com:30000 check

    backend ingress-replicator
    balance roundrobin
    option httpchk GET /ping
    server ir01 ir01.yourdomain.com:29000 check
    server ir02 ir02.yourdomain.com:29000 check

    listen status haproxy.yourdomain.com:8085
    stats enable
    stats uri /
  4. Restart the haproxy service using the control scripts located in /etc/init.d/haproxy.

  5. Test the setup by sending search queries through curl and ensuring they appear in the destination machine logs.

  6. In the Admin Console, go to System > Settings > Search and update the search service host field to haproxy.yourdomain.com and the search service port to 20000.

  7. Restart the application.

Note: For Jive Cloud users, refer to your cloud provider's documentation for unique configurations that may affect your setup, including VPCs, security groups, and load-balancer settings.