The order of task termination when scaling down is determined by the go's map iteration order when all other things (node balance and running state) are equal. For example, when all the nodes are running only a task of a service and states of all the tasks are equal to running, tasks are removed by the map iteration order, i.e., randomly.
If the replicated orchestrator scales down a service by removing tasks in a deterministic order (e.g., in reverse order of slot numbers), it would be really helpful to scale down stateful services with minimal impact of scaling down. For example, an operator can move data in tasks to be removed to another tasks before scaling down to prevent data loss.
The order of task termination when scaling down is determined by the go's
mapiteration order when all other things (node balance and running state) are equal. For example, when all the nodes are running only a task of a service and states of all the tasks are equal to running, tasks are removed by themapiteration order, i.e., randomly.If the replicated orchestrator scales down a service by removing tasks in a deterministic order (e.g.,
in reverse order of slot numbers), it would be really helpful to scale down stateful services with minimal impact of scaling down. For example, an operator can move data in tasks to be removed to another tasks before scaling down to prevent data loss.