Hi, Another question regarding documentation of Solr and Zookeeper.
The manual states: Solr HostnameUse the |SOLR_HOST| variable in the include file to set the hostname of the Solr server.
|SOLR_HOST=solr1.example.com|Setting the hostname of the Solr server is recommended, especially when running in SolrCloud mode, as this determines the address of the node when it registers with ZooKeeper.
Yet, in the example solr.xml, the <solrcloud> stanza defines ... <solrcloud> <str name="host">${host:}</str> <int name="hostPort">${jetty.port:8983}</int> <str name="hostContext">${hostContext:solr}</str> <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool> <int name="zkClientTimeout">${zkClientTimeout:30000}</int><int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int> <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
</solrcloud>More specifically the ${host:} variable. When this variable is filled in from startup execution, Zookeeper seems to obtain the correct hostname in spite of SOLR_HOST having been set. Yet, the docs recommend setting (or additionally setting?) SOLR_HOST with an explicit hostname.
If the <solrcloud> stanza in solr.xml is there to specifically define the setup of solrcloud, is it still recommended to define SOLR_HOST separately and what benefit does this provide over relying on ${host:} in solr.xml? This ${host:} variable at least works without making an explicit declaration of an FQDN. At the same time, ${host:} will auto populate if the hostname of the box changes. If you hardcode SOLR_HOST into a config, this won't dynamically update should the hostname of the box change (not that I'm going to run around changing hostnames, but I can see how explicitly defining SOLR_HOST could become a problem when someone doesn't know that it is defined).
What is the best practice here? Thanks. -- Signature *Brian Wright* *Sr. Systems Engineer * 901 Mariners Island Blvd Suite 200 San Mateo, CA 94404 USA *Email *bri...@marketo.com <mailto:bri...@marketo.com> *Phone *+1.650.539.3530** *****www.marketo.com <http://www.marketo.com/>* Marketo Logo
smime.p7s
Description: S/MIME Cryptographic Signature