Post by Zheng Lin Edwin YeoFor this clusterstatus, as we are still pointing it at the Solr directly
http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
It is not likely to work if the main replica is down.
Let's say I have 2 replica, one in localhost:8983, and other in another
server, like 192.168.1.2:8984. If the localhost:8983 is down, the query
will not work, and it will not know if the other replica is still running
or not, unless we change the URL to
http://192.168.1.2:8984/solr/admin/collections?action=CLUSTERSTATUS
I'm looking to able to do this automatically without changing the IP
address and URL. The solr.cmd command can do it, but we are finding out if
this can be done via URL?
The healthcheck is able to do this even when servers go down because it
uses CloudSolrClient. This client connects to zookeeper, where it can
learn everything about the cloud, including which servers are working.
To achieve what you want at the HTTP level, so you could type the URL in
a browser or use something that's not cloud-aware, you need to access it
through a load balancer sitting in front of Solr. With a good config, a
load balancer would be able to deal with servers going down. Either
that or you would need to use software that you can configure with at
least two URLs, that is able to try another URL if one doesn't work.
Thanks,
Shawn