3

I was reading this PDF: http://2010.lucene-eurocon.org/slides/Solr-In-The-Cloud_Mark-Miller.pdf, and there is a section that talks about CloudSolrServer. In particular, this statement is made:

It keeps a list of both live and dead servers. When a request to a server fails, that server is added to the ‘dead’ list, and another ‘live’ server is queried instead. The ‘dead’ server list is occasionally pinged, and if a server comes back, it is moved back into the ‘live’ list.

This works fine when a SOLR instance or the machine crashes, but for normal maintenance it would be undesirable because requests in progress would be lost. Typically with a normal load balancer, there's a way to shut off traffic to a box, and then normal shutdown can proceed at some interval after that.

Since it appears that CloudSolrServer is intended to replace a traditional load balancer in front of a SOLR cluster, I was wondering about graceful shutdown. What is the recommended way to shutdown a SOLR instance while not losing requests, (while using CloudSolrServer)?

4

1 回答 1

0

如果你想优雅地关闭一个实例,你需要先从 ZooKeeper 中移除相应的节点,然后关闭该实例。您可以使用“DELETEREPLICA”命令从 ZK 中删除节点:

/admin/collections?action=DELETEREPLICA&collection=collection&shard=shard&replica=replica

在 Solr Collections API 文档中查看更多信息

一旦从 ZooKeeper 中删除临时节点,CloudSolrServer 将停止向它发送请求。

于 2015-02-18T18:43:00.023 回答