run multiple solr instance in single server run multiple solr instance in single server apache apache

run multiple solr instance in single server


Yes, by changing the port no, you can run many instances in a single machine. But it may create a heavy load on your machine, when you'll be having a huge no of indexing and querying for the instances. For production environment, it's better to have single instance in a machine.

To start a separate instance, follow the steps.

  1. Take another copy of example folder.
  2. While starting the new instance (Say port new no is 4983) use the following command.

java -Djetty.port=4983 -jar start.jar


Another option for running Solr is to use Solr-Undertow which is a high performance with small footprint server for running Solr. It is easy to use on local machines for development and also production. It supports simple config files for running instances with different data directories, ports and more.

(note, I am the author of Solr-Undertow)

Link here: https://github.com/bremeld/solr-undertow with releases under the "Releases" tab.