Cluster Setup

Please setup the 3 individual SearchBlox Servers and apply the license keys to all servers before proceeding with the cluster setup instructions.

SearchBlox Cluster Setup

Cluster set up can be done directly from the SearchBlox Admin Console. We recommend 3 SearchBlox Servers ( 1 Index and 2 Search servers) for the cluster setup.

Setup SearchBlox 3 Server Cluster

  1. Install SearchBlox on three different physical or virtual servers.

  2. Confirm that the three servers can see each other on the network, i.e., you should be able to ping the other servers using their IP.

  3. Delete all existing collections in all three servers before configuring the cluster setup.

  4. Upload server licenses in all three servers.

  5. Restart the Indexing and Search Servers.

❗️

Network traffic access between the 3 servers need to be allowed

  • Port 9200 and 9300 should be accessible on all three servers.
  • Traffic must be allowed on ports 9200 and 9300 among these 3 servers.
  • All traffic needs to be open among the servers within cluster without any firewall restrictions.

Configure Cluster Setup in SearchBlox Admin Console

  1. Go to Menu -> Admin -> Cluster for every server in the cluster as shown below:
1132
  1. Select Multi-Node as in the screenshot below:
980
  1. Select one server for the Index server and remaining 2 other servers as Search servers

  2. Add the IP addresses for servers that have to join the cluster, including the current server.

Indexing Server:
Enter the IP address of the server, which is to be the Index server.

Search Server:
Enter the IP addresses of the servers, which are to be the Search servers.

Cluster name: (Optional)
If required, you can provide a unique cluster name for your search cluster setup. Please give the same cluster name for all the servers within the same cluster to enable them to identify and join together.

939
  1. Stop all SearchBlox servers

  2. Edit the file <SEARCHBLOX_INSTALLATION_PATH>/webapps/searchblox/WEB-INF/searchblox.yml in all 3 servers:

searchblox.shards: 1
searchblox.replicas: 0

please change to the following values and save the file:

searchblox.shards: 1
searchblox.replicas: 1

  1. Delete the folder called node within <SEARCHBLOX_INSTALLATION_PATH>/elasticsearch/data path

  2. Start the SearchBlox servers in the cluster starting with the index server followed by the 2 search servers.

  3. Login to the Index server, create a new collection and start indexing the collection. The new collection will now be available on the 2 other search servers within a few minutes if the setup is successful.

Continue with the following troubleshooting steps if the new collection is not shown on the search servers

  1. Run the following command on all servers to check the cluster status:
    curl -XGET 'https://<IP>:9200/_cluster/health?pretty=true'
562

The url can also be accessed at https://:9200/_cluster/health?pretty=true

852
  1. The cluster health status needs to be green or yellow

  2. The number_of_nodes has to be 3 for a three server cluster setup. If the number_of_nodes is 3 and the cluster health is green or yellow, then the setup is successful.

  3. Create more collections on the indexing server, the same collections will automatically get created in search servers. Start the indexing on the Index server, and see if the search results show up on the search servers for the same collection.

❗️

Restart Servers after Cluster setup changes

Please restart all servers after adding the cluster nodes and/or changing the cluster name.

Indexing and Searching in Cluster Setup

  • Indexing is only allowed on the Index server.
  • Search is possible from both Index and Search servers.
  • If the Index server goes down, searching is still possible through search servers until the indexing node recovers.
  • If a search server goes down, indexing and searching are possible through other servers. When the failed search server comes up, the indexed data will be replicated and be in sync.

Set up Analytics for Cluster

Analytics server will use SQLITE by default for the standalone server. For a cluster, you will need to setup an external database using Postgres so search analytics will be stored in a central database.

To setup Postgres in cluster read: Setup Analytics for Cluster

Upgrade Cluster

A clean installation to cluster similar to standalone servers is recommended.

Best Practices for Cluster Setup

  • Load balancer needs to be setup to distribute the load between search servers.
  • Ensure that Index and Search servers are able to connect with each other on the same network.
  • Port 9200 and 9300 should be open across all the three servers. Traffic must be allowed on ports 9200 and 9300 among these 3 servers.
  • Elasticsearch URLs should be accessible across all three servers

What’s Next

You can go through the related sections below