Please setup the 3 individual SearchBlox Servers and apply the license keys to all servers before proceeding with the cluster setup instructions.
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.
Install SearchBlox on three different physical or virtual servers and apply server license keys.
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.
Delete all existing collections in all three servers before configuring the cluster setup.
Upload server licenses in all three servers.
Edit the file
<SEARCHBLOX_INSTALLATION_PATH>/webapps/searchblox/WEB-INF/searchblox.ymlin all 3 servers:
please change to the following values and save the file:
- 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.
- Go to Menu -> Admin -> Cluster for every server in the cluster as shown below:
- Select Multi-Node as in the screenshot below:
Select one server for the Index server and remaining 2 other servers as Search servers
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 the Index 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.
Stop all SearchBlox servers
Delete the folder called node within
Start the SearchBlox servers in the cluster starting with the index server followed by the 2 search servers.
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
- Run the following command on all servers to check the cluster status:
curl -XGET 'https://<IP>:9200/_cluster/health?pretty=true'
The url can also be accessed at https://:9200/_cluster/health?pretty=true
The cluster health status needs to be green or yellow
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.
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 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.
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.
Setup a centralized Analytics database with the following steps:
Download and install Postgres. You can download Postgres from the official site https://www.postgresql.org/download/
Create a new database called sbanalytics within Postgres
Provide the details of the analytics database in .../webapps/searchblox/WEB-INF/searchblox.yml in all 3 cluster servers. This configuration will log the user search queries into this central database.
<SEARCHBLOX_INSTALLATION_PATH>/analytics/.envin all 3 servers to update the connection information to your database.
Restart SearchBlox servers. You can restart the Index server followed by the 2 Search servers.
Restart Analytics server and try test searches from Search servers to see the queries being logged in the database. You will see 3 tables within the database - autosuggest_click_logs, click_logs, query_logs.
A clean installation to cluster similar to standalone servers is recommended.
- 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
Updated 15 days ago
You can go through the related sections below
|Setting up HAProxy for Cluster Setup|