As part of SLIDER-799, I'm trying to get the policy of how to pick nodes best 
for reuse.

We have a list of nodes onto which we can explicitly request containers. 
For each node we have (per component):
 -number of active containers
 -recent failure count
 -age since last used

policy in 0.60 for component types that care about placement:
 1. skip all nodes with >1 active container for that role
 2. sort by most recently used
 3. pick that most recently used one.

policy in .70
  -use 0.60 policy to pick a node.
  -downgrade to relaxed placement if it failed recently.

I'm changing the policy in 0.80 to have a sort that takes failures and age into 
account.

My current proposed sort priority is

 1. Skip all nodes with >1 active instance
 2. pick the node with the lowest (recent) failure count
 3. when comparing two nodes with the same failure count, pick the one used 
most recently.

This implies we prefer reliable over newer -always. Which may be 
over-aggressive. What if we have a node that hasn't been used for a month 
(hence no failure history), vs a node used recently but which failed?

At the same time, I'd like to pick a node that was reliable over one that was 
used recently but failed over a slightly older one that's more reliable.

Can anyone come with a good Java comparator here?

-steve

Reply via email to