Cluster set up can be done directly from the SearchBlox Admin dashboard.
To create a 3-server SearchBlox Cluster (1 indexing server and 2 search servers):
- Install SearchBlox on three different physical or virtual servers and apply license keys.
- Confirm the three servers can see each other on the network.
- Delete all existing collections in all three servers before configuring cluster setup.
License key is required
Cluster set up requires license key to be applied on all servers.
Traffic must be allowed on ports 9200 and 9300 between these 3 servers, and disallow external access due to security. Open port 8080 to access the SearchBlox search service.
Traffic should be open between servers within the cluster
All traffic needs to be open between the cluster servers without any firewall restrictions.
- Go to Menu -> Admin -> Cluster for each server in the cluster (shown below).
- Make the same changes in all the SearchBlox servers within the Cluster:
Select Multi Node
- Add the IP addresses for servers that have to join the cluster including the current server.
Enter the IP address of the server which is to be designated as the Indexing server.
Enter the IP addresses of the servers which is to be designated as the Search servers.
Cluster name: (Optional)
If required, you can change the cluster name. However, please note that you need to give the same cluster name for all the servers within the same cluster.
- Restart SearchBlox Servers in the Cluster
Restart all SearchBlox Servers
Please restart all the servers after adding the cluster nodes and/or changing the cluster name.
- Wait 5-7 minutes before going to the SearchBlox Admin console.
- Run the following command on all servers to check the cluster status:
curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
- If the cluster health shows a yellow or green status, then the setup has been successful.
- Create the same collection on both the index server and the search servers. Kick off the crawling on the indexing server, and see if the search results show up on the search servers for the same collection.
Indexing and Searching in Cluster
- Indexing is possible only from the indexing server.
- Searching is possible from both indexing and search servers.
- If the indexing server goes down, searching is still possible through search servers until the indexing node recovers.
- If a search server goes down, indexing and searching is possible through other servers. When the failed search server comes up, the indexed data will be replicated.
A clean upgrade to cluster similar to standalone servers is recommended. However to reduce downtime, follow the steps below. (This upgrade will work with minor upgrades where there is no change in the Elasticsearch version in the new build.)
Servers have to be upgraded one by one. Upgrade the Search servers before the Indexing server.
- Block the network access from search nodes to the indexer (ports 9200/tcp and 9300/tcp).
- Disable shard allocation as per Elastic documentation (found here: https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html).
- Upgrade SearchBlox. Start the server and check whether it joins the cluster and replication happens. If successful, proceed to Step 4.
- Shut down all the other search servers one by one and upgrade SearchBlox.
- Shut down the indexing server and upgrade SearchBlox.