Hi.

Use Solr Operator :-) 

Yea, I think you could write a placement plugin to act on node up/down events 
as you say. Perhaps with a delay of 10 minutes after a node goes away to call 
the DELETEREPLICA API, since you have to allow for normal node bounces. You 
could also write an external watchdog that monitors live_nodes and state.json 
in order to do the same. 

Personally, I go to Admin UI -> Collections -> myCollection -> shard1 -> 
replicaN -> Delete button before shutting down a  node.

As you may know, the Operator has a "drain pod" kind of hook designed to move 
replicas off of a POD that is being targeted for scaling down, and I think it 
calls some rebalance logic?

Jan

> 11. mars 2026 kl. 22:38 skrev David Eric Pugh via dev <[email protected]>:
> 
> Hey all, I wanted to get some feedback from you'all on a recent usecase I was 
> asked about.   I suspect the answer will be "Use Solr Operator", but here 
> goes!
> I have an environment where I have 5 or so single shard collections.   Much 
> of the time I run just a single node and each collection is a single shard 
> with no replicas.   Sometimes, to support load, I'll add another node or two. 
>   Then I'll add replicas so cover the new nodes, 1 per node.  So with three 
> nodes, I have one leader and two replicas.   Add two more nodes, move to one 
> leader and four replicas.  
> However, when I remove a node by shutting it down, then Zookeeper never get's 
> notified about this, and so the replica is listed as down, and the node is 
> listed as down in red in the UI.  When it isn't really red, it's just we 
> don't need it for now, and it's not coming back.
> I'd like to just declare "For this collection, I want one replica per node 
> based on however many nodes are current".   I don't want to call the various 
> commands myself to add replicas and or remove then as nodes are added or 
> removed.   And I don't want to call various apis or other complex things when 
> I add or remove a node, I just want bin/solr stop and bin/solr start to be 
> run ;-).
> I think this is what Replica Placement Plugins were for maybe?  Could I have 
> a Replica Placement strategy that when ZK sees a new node added, then creates 
> a new replica on it, and vice versa, when a node goes away, it just removes 
> that replica instead of treating it as "down"?
> Thoughts?
> Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to