How Failover Works
Step 1. A crawl is running in one Aspire server.
Step 2. The server running the content source failed so the crawl items are restored in the other servers.
Note: Aspire synchronizes the content sources configuration and the workflow libraries, so if you create a content source or a library in one server the other one will install that same content source or library.
Create an Aspire Failover Installation
Install a ZooKeeper server
Aspire by default starts an embedded ZooKeeper server to run in stand-alone mode, you could use this same server but the failover will only work if that Aspire server is always up and running.
We recommend to use external ZooKeeper servers (cluster), so the uptime of the overall failover functionality can be maximized with ZooKeeper failover too.
For ZooKeeper installation go to: http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html
Also check Zookeeper machine requirements at: http://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#Single+Machine+Requirements
Install Aspire in each server
Follow steps at Download and Install in each Server to install Aspire
Failover configuration in each Aspire server
Once you have installed Aspire in each server, edit the config/settings.xml file in each distribution folder.
to Uncomment the line with: And write the zookeeper server that you have installed as follows: If you are using a cluster of zookeeper servers separate each server with a comma: By default if no external server is specified, Aspire will start an embedded ZooKeeper server on the port specified in the <clientPort> tag, and it will not be connected to any other ZooKeeper. This is the default for non-failover installations.
For each Aspire Server make the following change to the <configAdministration> section of the settings.xml file<zookeeper enabled="false" libraryFolder="config/workflow-libraries" root="/aspire" updatesEnabled="false">
<zookeeper enabled="true" libraryFolder="config/workflow-libraries" root="/aspire" updatesEnabled="true">
<!-- <externalServer>127.0.0.1:2182,127.0.0.1:2183,127.0.0.1:2181</externalServer> -->
<externalServer> host:port </externalServer>
<externalServer> host1:port1, host2:port2, host3:port3, ... </externalServer>
Start Aspire servers in failover mode
When you are going to start the Aspire servers make sure the first server you start is the one with the correct configuration (content sources and workflow libraries) because any previous data stored in ZooKeeper will be replaced with this server’s configuration.
All subsequent Aspire servers started after the first one is started will replace their own configurations (content sources and workflow libraries) with the one stored in ZooKeeper (set by the first Asprie Server loaded).
To avoid unwanted losing of configuration make sure the first server you start has the content sources and libraries you want all other servers to share.
To start each Aspire server execute: bin\aspire.bat or bin\startup.sh for linux servers
Verify your installation
- Once you have started all Aspire servers, open the browser and go the Home UI of any particular Aspire server you want. By default the UI address can be accessed by browsing to: http://aspire-server-1:50505
- From the Home UI of Aspire create any content source, configure it and save it.
- Wait until the content source is successfully loaded.
- Open the Home UI of the rest of the servers and make sure they all have the same content source configured.
How Scheduled Crawls Work in a Failover Environment
If you configured a content source to crawl using a schedule of time, the same configuration will be applied to all servers. And when the time comes to crawl by the schedule, only one server will perform the crawl start trigger, the others will eventually start the Distributed Crawl when all the initial setup is done.
Security Concerns
The Failover feature does not enforce Aspire to use security among all Aspire servers, it is completely possible to have a scenario where you have three Aspire Servers in a cluster with only two of them have security access restrictions, the third one will not know about this and will perform its failover crawls without caring about it, so you would end up with an unsecured server crawling your sensitive data.
It is recommended to configure all Aspire servers with security if your project requirements demand it. Go to Aspire Security for more details about how to configure security access restrictions to Aspire.